Page MenuHomePhabricator

(Codex)TablePager's limit selector should respect default query
Open, In Progress, Needs TriagePublic

Description

The navigation bar in TablePager and CodexTablePager correctly respects getDefaultQuery, adding those parameters to each link. However, the same is not done for the limit form. So, setting a different limit will lose all the default query parameters.

Not sure if there are examples of this in beta/prod, but it can be tested with the CampaignEvents extension, with an event with over 50 associated contributions, from

http://localhost:8080/w/index.php?limit=20&title=Special%3AEventDetails%2F{EVENTID}

Where using the limit selector will lose the tab parameter that controls the view.

Screen Recording 2025-10-30 at 1.21.43 PM.gif (1×2 px, 1 MB)

Event Timeline

Daimona renamed this task from Results limiter on Contributions tab should not redirect user to Event details tab to (Codex)TablePager's limit selector should respect default query.Oct 30 2025, 11:55 PM
Daimona edited projects, added MediaWiki-Special-pages; removed CampaignEvents.
Daimona updated the task description. (Show Details)

@vaughnwalters Are there automated tests to validate navigation on this? Either UI, integration or unit tests? If we can set up data appropriately for this situation in Catalyst this would be a decent opportunity to create a test automation ticket for future work to make sure it doesn't happen again

@vaughnwalters Are there automated tests to validate navigation on this? Either UI, integration or unit tests? If we can set up data appropriately for this situation in Catalyst this would be a decent opportunity to create a test automation ticket for future work to make sure it doesn't happen again

@SLong-WMF I can't speak to integration or unit tests, but there's no UI automation for this in the Campaign events extension as this is a greenfield feature and is not even released to betacluster yet. So this isn't (as far as campaign events extension goes anyway) a regression but just something that needs fixed before going live. Also why it didn't get the "bug" tag on it (or on any of the tasks in the Collaborative contributions fix it tasks epic T408256)

But as far as tests on this elsewhere outside of the extension, I am not sure if there are other examples where it might be being used elsewhere in prod. This could definitely be automated, given that we could set up a Catalyst env with the correct consistent data (which I believe will can happen, just not quite yet), though even then I am not sure that this ticket would be my top candidate for that.

Hi @vaughnwalters, I have tested it on the maser branch, and I was not able to reproduce it anymore, I think this was fixed in some of the other tasks we did, let me know if you can still reproduce it, thank you!

Hi @vaughnwalters, I have tested it on the maser branch, and I was not able to reproduce it anymore, I think this was fixed in some of the other tasks we did, let me know if you can still reproduce it, thank you!

Are you sure? I can still reproduce in master using the instructions in the task description. I don't think this can have been fixed without a core change.

Hi @vaughnwalters, I have tested it on the maser branch, and I was not able to reproduce it anymore, I think this was fixed in some of the other tasks we did, let me know if you can still reproduce it, thank you!

Are you sure? I can still reproduce in master using the instructions in the task description. I don't think this can have been fixed without a core change.

Heya @cmelo Yes I have pulled down the latest master and am still able to reproduce

Screen Recording 2025-11-14 at 6.13.45 AM.gif (1×3 px, 1 MB)

Not sure if it's that, but also worth noting: use the URL in the task description to reproduce. You don't want to use a URL that already contains the tab=ContributionsPanel parameter, else it won't reproduce. You need a URL without the tab parameter.

Change #1217616 had a related patch set uploaded (by Cmelo; author: Cmelo):

[mediawiki/extensions/CampaignEvents@master] limit form losing default query params in EventContributionsPager

https://gerrit.wikimedia.org/r/1217616

Thanks @vaughnwalters and @Daimona, I was able to reproduce it now, I created a patch to fix it, will move this task to code review