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

AjaxFlickrBatchNavigation needs to override selectBatchSize() #946

Merged

Conversation

paulhoadley
Copy link
Contributor

If you use AjaxFlickrBatchNavigation, you may have noticed frequent warnings logged to the console:

WARN  er.ajax.AjaxUpdateLink - An Ajax request attempted to return the page, which is almost certainly an error.

This happens when the user selects a new batch size from the batch size hyperlinks, e.g. by clicking on "50". What's happening is that ERXFlickrBatchNavigation.selectBatchSize() (which isn't overridden in AjaxFlickrBatchNavigation) is returning context().page(): correct for a regular component, but wrong in the Ajax setting. This pull request simply overrides that method to return null instead of the page.

The parent class's implementation of selectBatchSize() returns
context().page(), which is wrong for an Ajax action. This override
returns null instead.
@hugithordarson hugithordarson merged commit f76b455 into wocommunity:master May 21, 2021
@paulhoadley paulhoadley deleted the fix-select-batch-size branch June 9, 2021 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants