Block ajax requests to the shop while a process runs#1523
Merged
Quetzacoalt91 merged 2 commits intoPrestaShop:devfrom Nov 24, 2025
Merged
Block ajax requests to the shop while a process runs#1523Quetzacoalt91 merged 2 commits intoPrestaShop:devfrom
Quetzacoalt91 merged 2 commits intoPrestaShop:devfrom
Conversation
M0rgan01
reviewed
Nov 12, 2025
Comment on lines
+24
to
+44
| const dataSet = [ | ||
| { | ||
| urlRequest: '/admin-dev/common/notifications/ack?_token=', | ||
| urlShop: | ||
| 'http://localhost:8001/admin-dev/?controller=AdminSelfUpgrade&token=&route=restore-page-post-restore', | ||
| expectedValue: false | ||
| }, | ||
| { | ||
| urlRequest: 'http://localhost:8001/admin-dev/common/notifications?_token=', | ||
| urlShop: | ||
| 'http://localhost:8001/admin-dev/?controller=AdminSelfUpgrade&token=&route=restore-page-post-restore', | ||
| expectedValue: false | ||
| }, | ||
| { | ||
| urlRequest: | ||
| '/admin-dev/autoupgrade/ajax-upgradetab.php?route=restore-page-backup-selection', | ||
| urlShop: | ||
| 'http://localhost:8001/admin-dev/?controller=AdminSelfUpgrade&token=&route=restore-page-post-restore', | ||
| expectedValue: true | ||
| } | ||
| ]; |
Contributor
There was a problem hiding this comment.
Can we add a test on an external API?
5ebddab to
09950ed
Compare
09950ed to
8ec5fbc
Compare
|
M0rgan01
approved these changes
Nov 18, 2025
ingridusta
approved these changes
Nov 24, 2025
ingridusta
left a comment
There was a problem hiding this comment.
hi @Quetzacoalt91,
I reproduced the bug thanks to ur tips, and tested ur pr. It works as expected, no more failed backup/updates/restore and in the console, a message is displayed to show that request are filtered then when the backup/updates/restore is over, the requests are allowed again.
5 ⭐, it's QA approved ✅
Contributor
|
Thank you for this PR @Quetzacoalt91 |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



devbranch, you can trigger it when you want and this makes the update fail if called at the end of the update database, while on this PR no ajax request will appear on the network tab.Note: If requests are sent to the shop from other sources (API, probably front end as well...), Update Assistant won't be able to block them.
Capture.video.du.2025-11-11.16-36-11.mp4