-
Notifications
You must be signed in to change notification settings - Fork 56
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
Fix for issue where sortable is trying to load when not needed #84
Conversation
Prestaworks
commented
Mar 30, 2023
•
edited by kpodemski
Loading
edited by kpodemski
Questions | Answers |
---|---|
Description? | Fix for issue where sortable is trying to load when not needed. |
Type? | bug fix |
BC breaks? | no |
Deprecations? | no |
Fixed ticket? | Fixes PrestaShop/PrestaShop#31980. |
How to test? | Follow instructions in ticket. |
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.
I think combining with existing condition is better
if (Tools::getValue('controller') !== 'AdminModules'
|| Tools::getValue('configure') !== $this->name
|| Tools::getValue('id_slide')) {
return;
}
Hi @Prestaworks I agree with @leemyongpakvn suggestion :-) |
ps_imageslider.php
Outdated
Tools::getValue('configure') !== $this->name || | ||
Tools::getIsset('id_slide')) { | ||
return; | ||
} |
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.
It looks like lack of 1 space at line 625
Update ps_imageslider.php Update ps_imageslider.php
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.
We have Tools::
on both sides now ;)
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.
Hello @Prestaworks
I have checked your PR.
Check on PS8.0.3 : An error is displayed which is related to permission. It's Ok when giving permission to the shop
- Check on BO : OK
- Check on FO : OK
8.0.3_permission.probl.mp4
Check on PS1.7.8.8 : The JS error is still displayed when editing the slide
pr84._.1788.mp4
Could you please check it ?
Thank You!
Hi @HanaRebaiQA , |
I guess HanaRebaiQA need fresh installs of PS 8.0.3, PS 1.7.8.8, and ps_imageslider dev to make sure this PR is not affected by other PR. I rarely test other contributors' PR, then I see this PR works as supposed on my nearly fresh PS 8.1 :) |
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.
Hello @Prestaworks ,
Tested WITH PS 8.0.3 : OK ✔️
803imageslider.webm
WITH PS 1.7.8.8 : OK ✔️
1788imageslider.webm
LGTM ,it's QA approved
Thank you 🚀 !
Thank you @Prestaworks ! |
I have added this extra condition also, because it was problem when you wanted to add new slider Tools::getIsset('addSlide') ; This condition has worked well till error messages shows up. When there is an error message in URL you don't gave any GET variable, so the best option is check if var |