Jump to content

Backoffice buttons not working


contactovisual

Recommended Posts

I've been struggling for a couple of weeks searching for a peculiar problem in the backoffice: some buttons and links do not respond.
This happens after an update of Prestashop 1.7.7.4 to 1.7.7.8 and 1.7.8.0
Current PHP version is 7.2

Examples not working (in the backoffice):
- Order page: buttons Print Order, Add Product
- Product (edit): buttons Save, Add a Feature, Preview, ...
- Modules listing: link View More
- Design > Theme:  link to switch to the default theme

...  just to name a few.  It's a nightmare!
I believe it must be a JS or AJAX problem, but can't find what is causing the issue.

Cloned the Prestashop installation and in that clone disabling modules, recover the Admin folder, classes, controllers, js, src, vendor, ... , even forcing the theme to the default by changing in the database, nothing fixed the problem.
Tested changing the PHP version (current is 7.2, but tested with 7.3 and 7.4)


I did a backup when updating from 17.7.4 to 17.7.8, but the rollback did not work, so I'm stuck on finding a solution to fix this issue.

Also tried a clean Prestashop 1.7.8.0 installation, no themes (just the default), no custom modules, and it works just fine. But, how would I recover the site withing this installation?


Any clues?

I would appreciate any help.

Nelson / Contacto Visual

Link to comment
Share on other sites

Thank you for the suggestion.

Switching to PHP 7.4 did no solve the issue. Still have the same problem.
Cleared the cache and deleting the var/cache/dev and varc/cache/prod folders, did not help either

Analyzing with the Firefox Development I get this red alerts:
 

Quote

Uncaught TypeError: $(...).tooltip is not a function    .../admin/themes/default/js/bundle/default.js?1.7.7.8:7

Quote

 

Uncaught TypeError: n(...).popover is not a function

    .../admin/themes/new-theme/public/form_popover_error.bundle.js?1.7.7.8:25

 

Quote

 

Uncaught TypeError: A(...).fancybox is not a function

    value .../admin/themes/new-theme/public/order_view.bundle.js?1.7.7.8:121

    e .../admin/themes/new-theme/public/order_view.bundle.js?1.7.7.8:121

    order_view .../admin/themes/new-theme/public/order_view.bundle.js?1.7.7.8:145

value .../admin/themes/new-theme/public/order_view.bundle.js?1.7.7.8:121

    e .../admin/themes/new-theme/public/order_view.bundle.js?1.7.7.8:121

    order_view .../admin/themes/new-theme/public/order_view.bundle.js?1.7.7.8:145

 

all referring jQuery

 

 

 

Link to comment
Share on other sites

Did try that either. Not only the js folder, but also the admin folder, the classes, controllers, src, vendor and webservice.

No luck.

Going to try the reverse. I have a functional basic 1.7.8 installation. Will try to copy there the theme, modules, img, translations and database. Not sure if this is a good strategy to rebuild the site, but...  no more ideas.
 

Link to comment
Share on other sites

29 minutes ago, Are said:

Having the same problem, some buttons unresponsive. not all

Good to know I'm not alone on this issue. And because its not all but only some buttons, that what makes the situation even more strange.
My theme developer said the theme has nothing to do with the problem, it's an admin/Prestashop problem.
Could be some module, but I disabled all but the Prestashop set, and it did not solve.

Link to comment
Share on other sites

1 minute ago, Nickz said:

Would you mind telling us the reason for this update policy?

Had the site with Prestashop 1.7.7.4, and used the built-in One Click Update to update to the latest Prestashop version, which was 17.7.8. Made a manual backup and the update. That's when the problem came up. When trying to rollback, it went wrong, and couldn't do it. So I got stuck with the 1.7.7.8
Then I made a clone of the Prestashop installation to verify and test, and in this one I made the update to 1.7.8.0, the current latest version. The problem remains.
So now, I have the main and active site with Prestashop 1.7.7.8, and PHP 7.3, and a clone with Prestashop 1.7.8.0 where I am testing all possible solutions.
Good to know that in the public site it works OK, as much as I checked (https://casaalves.pt/). The problem with the failing buttons is in the backoffice.

Link to comment
Share on other sites

2 minutes ago, contactovisual said:

Had the site with Prestashop 1.7.7.4, and used the built-in One Click Update to update to the latest Prestashop version,

I think a majority of people prefer the vs 1.6 Prestashop. Its not only that you update Presta, you need to see if the 30 to 100 modules also are able to move with you. So, What forced you to begin the update route?

  • Like 1
Link to comment
Share on other sites

2 minutes ago, Nickz said:

So, What forced you to begin the update route?

There was no "forcing". I support other clients sites in Prestashop and running smoothly with the latest versions, including this 1.7.8.0. But you're right about the modules and theme. I might made a big mistake not checking first the modules and/or theme compatibility. Over-confidence.
The theme developer already told me the theme is compatible. So now I have to review one by one the modules.
Just tested by creating a new Prestashop 1.7.8.0 clean installation, and copying the modules one by one, followed by a admin test. The backoffice went well until I finished the modules, and I thought I was going to succeed, but then I had to check the database and update it, where some tables require new columns. Now I'm back to the issue. The backoffice buttons problem is back. I have no idea why the database update took me back to the issue.

Link to comment
Share on other sites

40 minutes ago, contactovisual said:

The backoffice went well until I finished the modules,

Basically your error was not to check after each module install.

Dot them down and after each install empty caches. Than a check mark and do the next one.

Link to comment
Share on other sites

52 minutes ago, Nickz said:

Basically your error was not to check after each module install.

Actually, I did. And when I tested the last one, I thought I got it solved.

Then I went to check the database. Because I had to import the active site content, some tables required update (ps_log, ps_hook). I fixed those and went back to test the site. And the issue was there again.

Going to disable all non-prestashop modules again, and re-start the checking.

Link to comment
Share on other sites

To close this topic...
I got an update of the module, upload it to the site, and the problem is gone.
Nothing wrong with the module, only I had an outdated version, not working with Prestashop 1.7.7.8 or 1.7.8.0.
Finding the one module causing the problem took me a couple of weeks of work.

So in resume:
NEVER update Prestashop version of your site without first making sure you have access to all custom modules updates.
Also make sure you have the option to rollback, or recover from a backup.
This is valid to me and anyone with the same situation.

Thanks to Nickz for a wise reminding:

On 10/19/2021 at 12:58 PM, Nickz said:

I think a majority of people prefer the vs 1.6 Prestashop. Its not only that you update Presta, you need to see if the 30 to 100 modules also are able to move with you.

 

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...