-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Issue 36563: Remember Category Pagination causes a Document Expired/form submission error #36595
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
base: 2.4-develop
Are you sure you want to change the base?
Changes from 4 commits
bf30926
d0eb79f
9c67990
d0b0009
3d4b5d9
51033d3
1e155c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -179,6 +179,11 @@ define([ | |
formKey.value = this.options.formKey; | ||
form.appendChild(formKey); | ||
|
||
input = document.createElement('input'); | ||
input.name = 'redirect_url'; | ||
input.value = this.options.url; | ||
form.appendChild(input); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You don't actually need to create an input to pass the current URL to your request. You can do this with PHP, directly in app/code/Magento/Catalog/Controller/Category/View.php controller. Example: You can set the respose redirect before the
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank for your review. I added some change in new commit. |
||
paramData = $.param(paramData); | ||
baseUrl += paramData.length ? '?' + paramData : ''; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't actually need this. I think a private method that would determine if you need to redirect or not (returns boolean) would be more suitable. Please also specify the method return type.