Skip to content

Conversation

@dereuromark
Copy link
Member

@dereuromark dereuromark commented Oct 22, 2025

…ize.

The problem is clear: it doesnt magically merge existing ones in the URL with the ones Form posted.
So 'action' => '/batches?owner=billy&expected=1&page=1' is actually always 'action' => '/batches'.

Resolves limitControl() when filters (e.g. Search plugin) are applied, but then would be resettet as a GET form result without all query string filters as hidden fields would make them removed.

@dereuromark dereuromark added this to the 5.2.9 milestone Oct 22, 2025
}

$url = $this->_View->getRequest()->getPath();
$out = $this->Form->create(null, ['type' => 'get', 'url' => $url]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The form URL defaults to current URL, so we can skip setting $url.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we remove the key, it generates the long ones again:

/posts?filter%5Bdate%5D%5Bstart%5D=2024-01-01&filter%5Bdate%5D%5Bend%5D=2024-12-31&filter%5Bstatus%5D=active

which are somewhat overkill, since it skips the query string anyway.

Using 'url' => [] seems the best way, since it defaults to the current route URL.

@markstory markstory modified the milestones: 5.2.9, 5.2.10 Oct 24, 2025
@markstory markstory merged commit 87b366c into 5.x Oct 26, 2025
15 checks passed
@markstory markstory deleted the 5.x-limit-control branch October 26, 2025 13:39
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.

4 participants