Jump to content

Problems in the BO with PS_MODE_DEV set to Flase


Recommended Posts

I have been struggling with my back office, the main issue is that I am getting the permanent spin in the save button when editing a product (it works fine with new products). 

 

The odd behavior is that the button works perfectly when I set PS_MODE_DEV to true. Then I set it up to false and the spiny button comes back.

 

Right now I am running the store with PS_MODE_DEV to true, but I don't think that is a good idea. Any clues why this is happening? I am on PS 1.6.0.14

 

My defines.inc.php file looks like this when experience the problem:

/* Debug only */
if (!defined('_PS_MODE_DEV_'))
define('_PS_MODE_DEV_', false);
/* Compatibility warning */
define('_PS_DISPLAY_COMPATIBILITY_WARNING_', false);
if (_PS_MODE_DEV_ === false)
{

I get the following error message in the Chrome console and the Save button in the product page never stops spinning.

Uncaught SyntaxError: Invalid or unexpected token
(anonymous function) @ jquery-1.11.0.min.js:2
globalEval @ jquery-1.11.0.min.js:2
domManip @ jquery-1.11.0.min.js:3
append @ jquery-1.11.0.min.js:3
(anonymous function) @ jquery-1.11.0.min.js:3
n.access @ jquery-1.11.0.min.js:3
html @ jquery-1.11.0.min.js:3
success @ products.js:130j @ jquery-1.11.0.min.js:2
fireWith @ jquery-1.11.0.min.js:2
x @ jquery-1.11.0.min.js:4
b @ jquery-1.11.0.min.js:4

I just need to change define('_PS_MODE_DEV_', false); to define('_PS_MODE_DEV_', true); and everything works great.

 

Thanks,

Link to comment
Share on other sites

  • 6 months later...

I would start the developer tools in the browser. In firefox or edge as an examples, you enable this feature by pressing F12.

Check you have the network tab selected.

Then try to login with PS_DEV_MODE set to false.

After the page stops loading, look at the developer tool.

 

If you see lines flagged red or lines with status 404 (not found) - it will give you some information on what the client could not load.

I think, jquery or some javascript is the problem to search for.

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...