PrestaShop 9.0.3 Upgrade Breaks Back Office: A Module Dependency Issue
PrestaShop 9.0.3 Upgrade Leads to Back Office Redirection Issues
A PrestaShop user, Mostyma, reported a critical issue after upgrading from version 9.0 to 9.0.3. The back office (BO) became inaccessible, redirecting to the front office instead. Debug mode and cache clearing did not resolve the problem.
The user further investigated and found a potential error related to the PayPal module when attempting to rename it. The error message pointed to a file system issue:
RecursiveDirectoryIterator::__construct(/usr/local/lsws/mt.com/http/current/public/modules/paypal): Failed to open directory: No such file or directory
UnexpectedValueException
in /usr/local/lsws/mt.com/http/current/public/src/PrestaShopBundle/DependencyInjection/Compiler/ModuleControllerRegisterPass.php (line 56)
The user also noted that all payment modules were deactivated or unavailable after the upgrade.
Possible Solutions and Discussions
The thread received several helpful replies that pinpointed the root cause and offered a solution:
- GitHub Issue Reference: Mediacom87 linked to a relevant GitHub issue (https://github.com/PrestaShop/PrestaShop/issues/40688), suggesting a known problem within PrestaShop.
- PrestaShop Version Clarification: Prestashop Addict inquired about whether the user was using the open-source version or the Classic Edition of PrestaShop.
- Root Cause and Solution: Yama identified the issue as being related to the
ps_apiresourcesmodule and recommended updating it to version 0.4.0. A link to the module's release page on GitHub was provided: https://github.com/PrestaShop/ps_apiresources/releases/tag/v0.4.0
Summary
The issue was traced to a dependency on the ps_apiresources module, which needed to be updated to version 0.4.0 after the upgrade to PrestaShop 9.0.3. This update resolved the back office redirection problem and restored the functionality of payment modules.
Key Takeaway: Always check for module updates after a major PrestaShop version upgrade, especially for modules related to core functionalities like payment processing and API integrations. Reviewing GitHub issues related to the upgrade can provide valuable insights into potential problems and solutions.