After $_GET['q'] is better rewritten dynamically

Created on 23 March 2012, over 12 years ago
Updated 6 July 2023, over 1 year ago

Hi, in my site I displayed the message list in a block, I include'privatemsg.pages' as the content of the block, which means the url of this block page is not something like 'messages/xx', but 'node/xxx'.
The pager is generated with the $_GET['q'], and it's correct (with url 'node/xxx')
The issue is that when I choose an action 'Mark as read' or 'Mark as unread', the $_GET['q'] is directly rewritten to 'messages/xx', so the pager is no longer correct.
Therefore I'm thinking shall we set the $_GET['q'] to something dynamic, like '$_SERVER["HTTP_REFERER"]'
The 'undo' function also come with this issue.
Here is a patch I wrote, is that OK? It works on my site, but I'm not sure I'll cause other issues in different situation.
Thanks!

🐛 Bug report
Status

Closed: outdated

Version

1.2

Component

Code

Created by

🇨🇳China Lang Wu Jane

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024