vm0824 Posted April 24, 2017 Share Posted April 24, 2017 (edited) Hello, I am working in my test environment to try and upgrade a few modules. No matter what module, when I click the Upgrade button from the Module Notifications pages, I get a 500 error. I attached a screenshot of the output from debug mode. Interestingly, this works fine from my production page. But, when I copy the site to my test server, it causes an error. So, I suspect its an issue with my test servers settings, or with my refresh process. Please help! Thanks, Vinnie EDIT: The error is a MethodNotAllowedHttpException on the POST method. It says there is no route. I dont know enough about PHP to understand what its trying to do, but I see there are many hits on Google for similar errors. So, it appears not limited to just Prestashop, but an issue related to allowed "routes". Edited April 25, 2017 by vm0824 (see edit history) Link to comment Share on other sites More sharing options...
vm0824 Posted April 26, 2017 Author Share Posted April 26, 2017 I have been really trying to understand the \app\cache\prod\appProdUrlMatcher.php and how its matching the url to various if statements. The file is exactly the same in prod and test. The urls that are being generated when I click UPGRADE are exactly the same in prod and test. prod /adminxxxxxxxxx/index.php/module/manage/action/upgrade/ps_wirepayment?_token=QCaP4MuXexqcNNj-ZSW-EJgujRrPgAxdXuLLnbkl3oA test /adminxxxxxxxxx/index.php/module/manage/action/upgrade/ps_wirepayment?_token=wW8cMV7zZOs0c8eL6JRGEjN2_vIzfP_nK3oyyilD_Sk I'm thinking it should get caught correctly on the IF statement on line 365 (see screenshot). Help! Still cant figure out why its different in PRD vs TST. Link to comment Share on other sites More sharing options...
vm0824 Posted April 26, 2017 Author Share Posted April 26, 2017 (edited) I tried to debug both \app\cache\prod\appProdUrlMatcher.php in prd and tst. I found that each one, if opened on its own page, would throw the same error. However, in prod I seem to be able to stay on the Module notifications page after clicking Upgrade. Whereas in test I am brought to that error page. I cannot figure out why one does this and not the other. In either case, the module upgrade does not occur correctly because it still claims to need upgrade afterwards. EDIT: The issue in on line 366 of appProdUrlMatcher.php where it checks if the method is not POST. It is always GET for me. Thus, it throws the error. So either the code needs to allow GETs, or the call itself is supposed to be a POST. Edited April 26, 2017 by vm0824 (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now