Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#4245 stay on correct page after editing paginated topic #4742

Merged
merged 1 commit into from
Apr 2, 2022
Merged

#4245 stay on correct page after editing paginated topic #4742

merged 1 commit into from
Apr 2, 2022

Conversation

Jimmi08
Copy link
Contributor

@Jimmi08 Jimmi08 commented Apr 2, 2022

CLOSES #4245

Tested with PHP 8.1

Description:
When you edit a post on the next page (with the paginated topic), after saving you are redirected to the first page and you don't see that edited message then.

Changes

added p parameter to edit URL in post options and edit image shortcodes
used this parameter when redirecting after reply is updated
it is not needed when updating the thread because you are always on the first page
added check if it is the first page, then the parameter is not used (to have the same behavior as with thread).
Tested

PHP 7.4. + PHP 8
core bootstrap5 theme and custom theme with custom forum templates
Important Note::
Updating/Fixing postoptions are/will be separated issues (more than one). It needs some changes but they are not related to this issue. So now just changed links, nothing more.

CLOSES #4245

Tested with PHP 8.1

Description:
When you edit a post on the next page (with the paginated topic), after saving you are redirected to the first page and you don't see that edited message then.

Changes

added p parameter to edit URL in post options and edit image shortcodes
used this parameter when redirecting after reply is updated
it is not needed when updating the thread because you are always on the first page
added check if it is the first page, then the parameter is not used (to have the same behavior as with thread).
Tested

PHP 7.4. + PHP 8
core bootstrap5 theme and custom theme with custom forum templates
Important Note::
Updating/Fixing postoptions are/will be separated issues (more than one). It needs some changes but they are not related to this issue. So now just changed links, nothing more.

Enhancement Note: $_GET['p'] could be replaced by saving the actual page in post data (like thread works - that information should be available) but it is too complicated now for me and there is a bigger risk that something will not work. Free do it this way if you have time.
@CaMer0n CaMer0n merged commit da7c1b0 into e107inc:master Apr 2, 2022
@Jimmi08 Jimmi08 deleted the correct-url-after-editing-post-in-paginated-topic branch April 18, 2022 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Forum: Editing message bring back to first message of the thread
2 participants