Jump to content

Full of trouble...


Recommended Posts

I've used till now Presta without any problem, today after some weeks I wanted to add a product, red line with the error... So I tried to update all the modules but few of them are impossible to be updated and are disabled by presta.

Now the situation is that nobody can buy, if you try "You already have the maximum quantity available for this product" and I've absolutely no idea about how to solve it. I wanted also to disable the shop but the links on my webpages are still in function so everybody can see this mess :(

Do you know what happened without doing anything? And above all, can you help me?

Thanks a lot!

Link to comment
Share on other sites

Hello,

WHat kind of error are you getting when you update a product? Are you using combinations? Do you allow out of stock orders? Lastly, are you using the advanced stock management system?

 

Hi Nemo, thanks a lot to take care about this hell :)

When I try to insert a new product the error is "error happened during the creation of the object: product" I'm on the first page of the product, what I really don't understand is why something has changed since the last time, btw this is the minor problem, now these modules are not in use cause it's impossible to upgrade:

1- navigation block

2- tags block

3- bank block

4- paypal block

5- top menu

If you now try to order something if you click on add to cart you can't proceed cause: "You already have the maximum quantity available for this product."

The search function doesn't work anymore so a real tragedy.

 

I've also another prestashop and also for the other one I've the same problem even if I didn't push any update.

From day to day this is something really strange, the last order is of the 09/06/2015, now nobody can order from my prestashop. This time I'm quite worried :(

Thanks once again, have a nice day

Link to comment
Share on other sites

Try enabling dev mode (see my signature) first. it should spawn a good amount of errors

 

This is the report, alien language for me :D

 

 

Notice: Constant _THEME_IMG_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 32 Notice: Constant _THEME_CSS_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 33 Notice: Constant _THEME_JS_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 34 Notice: Constant _PS_IMG_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 61 Notice: Constant _PS_ADMIN_IMG_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 62 Notice: Constant _THEME_CAT_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 64 Notice: Constant _THEME_PROD_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 65 Notice: Constant _THEME_MANU_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 66 Warning: Cannot modify header information - headers already sent by (output started at /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php:32) in /web/htdocs/www.ordomcm.com/home/prestashop/classes/controller/FrontController.php on line 793 Warning: Cannot modify header information - headers already sent by (output started at /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php:32) in /web/htdocs/www.ordomcm.com/home/prestashop/classes/exception/PrestaShopException.php on line 37

[PrestaShopDatabaseException]

INSERT command denied to user 'Sql556685'@'62.149.145.81' for table 'ps_connections'

 

INSERT INTO `ps_connections` (`id_guest`, `id_page`, `ip_address`, `http_referer`, `id_shop`, `id_shop_group`, `date_add`) VALUES ('39323', '1', '95053778', '', '1', '1', '2015-06-13 11:00:55')

at line 635 in file classes/db/Db.php

629. 			WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);630. 		}631. 		else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))632. 		{633. 			if ($sql)634. 				throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');635. 			throw new PrestaShopDatabaseException($this->getMsgError());636. 		}637. 	}638. 639. 	/**
Link to comment
Share on other sites

I would truncate these three tables (note you can back them up first), I have never experienced issue truncating them.  

 

06.13.2015-08.14.png

http://screencast.com/t/9uAOmVet

 

I'm quite worrried to do it on the other hand the shop is getting worse every hour (no idea why). On the other shop the situation is better, I can't create new product, people can't buy cause ""You already have the maximum quantity available for this product." but at least the layout is still ok. Can I restore the previous version or do something similar or I need to reinstall everything losing all my work?

 

Guys I've seen how to fix the trouble with the max quantity reached = sql then Alter ... but also in this case I've a problem cause when I click "go" on mysql this error message appears:

#1142 - ALTER command denied to user 'Sql5566..'@'62.149.150.2..' for table 'ps_product'

Edited by matloki (see edit history)
Link to comment
Share on other sites

it would appear that your user 'Sql5566' doesn't have the right permissions. you can check this via phpmyadmin which probably has different user.  You will need to research how to check/set the user on your hosting to allow update to your db ps tables.  Or you can contact your hosting company and explain the permission issue.  I hope this helps.

https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=prestashop+%231142+-+ALTER+command+denied+to+user

Link to comment
Share on other sites

it would appear that your user 'Sql5566' doesn't have the right permissions. you can check this via phpmyadmin which probably has different user.  You will need to research how to check/set the user on your hosting to allow update to your db ps tables.  Or you can contact your hosting company and explain the permission issue.  I hope this helps.

https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=prestashop+%231142+-+ALTER+command+denied+to+user

 

Ok, I've just seen that sql was disabled cause I didn't see the email of "warning" coming from my host. I've paid just now but still doesn't work, I'll wait a while and I'll try again.

 

Making another test and I've the same trouble with my main shop, the graphic has completely random, the report says the same; THEMES are already defines on the file defines_uri.inc.php, plus another error:

 

Warning: Cannot modify header information - headers already sent by (output started at /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php:32) in /web/htdocs/www.ordomcm.com/home/prestashop/classes/controller/FrontController.php on line 793

 

+ trouble on:

 

INSERT command denied to user 'Sql556685'@'62.149.145.79' for table 'ps_connections'

 

+ trouble on:

 

at line 635 in file classes/db/Db.php

 

I've absolutely no idea how all this mess happened and also no idea if all these errors are linked each other. Dunno where to start... Can I disinstall prestashop? Or can I write over a new prestashop? Thanks once again for your time

Link to comment
Share on other sites

I've used till now Presta without any problem, today after some weeks I wanted to add a product, red line with the error... So I tried to update all the modules but few of them are impossible to be updated and are disabled by presta.

Now the situation is that nobody can buy, if you try "You already have the maximum quantity available for this product" and I've absolutely no idea about how to solve it. I wanted also to disable the shop but the links on my webpages are still in function so everybody can see this mess :(

Do you know what happened without doing anything? And above all, can you help me?

Thanks a lot!

 

WORKS! On the other shop... So probably there were trouble related to mysql BUT with the main shop it's still a nightmare. You can have a look: http://www.ordomcm.com/prestashop/index.php

The other one is now perfect, this one has some trouble, where can I start to solve its?

Edited by matloki (see edit history)
Link to comment
Share on other sites

WORKS! On the other shop... So probably there were trouble related to mysql BUT with the main shop it's still a nightmare. You can have a look: http://www.ordomcm.com/prestashop/index.php

The other one is now perfect, this one has some trouble, where can I start to solve its?

 

Sos :) Someone knows how can I restore this mess? http://www.ordomcm.com/prestashop/index.php

Now everything show works but of course I can't use the shop at the moment. Thanks a lot in advance

Link to comment
Share on other sites

Yes. the mess is that you css is destroyed or not available, due to misconfiguration of your URL.

 

You made changes on css files ? If not. than check on your back-office the correctness of your URL on tab "preferences > SEO & URL's". on mid of page you should add the URL of your shop.

 

URI: http://www.ordomcm.com

SSL: http://www.ordomcm.com

Uri base /prestashop/

Link to comment
Share on other sites

Yes. the mess is that you css is destroyed or not available, due to misconfiguration of your URL.

 

You made changes on css files ? If not. than check on your back-office the correctness of your URL on tab "preferences > SEO & URL's". on mid of page you should add the URL of your shop.

 

URI: http://www.ordomcm.com

SSL: http://www.ordomcm.com

Uri base /prestashop/

 

Thank you very much, the URL are corrects so probably is the css the problem, don't know how it happened btw cause I didn't change it. I'm using default boostrap, there is a standard css that I can use to replace mine "destroyed"? And which is exactly the file I've to change? Thanks once again, really appreciate!

Link to comment
Share on other sites

For to replace the css of your theme you should download the PS version in use and extract it from there by uploading it to your FTP /themes/default-bootstrap.

 

Here you will find all Prestashop versions for download: https://www.prestashop.com/en/developers-versions#previous-version

 

Thanks once again!

No way, I did it (I've 1.6.0.9) uploaded all the files but still no success. I've tried to uninistall and reinstall the default theme but no way too. Now if I wanna check the errors using "defines_inc.php" this is the message:

 

Notice: Constant _THEME_IMG_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 32 Notice: Constant _THEME_CSS_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 33 Notice: Constant _THEME_JS_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 34 Notice: Constant _PS_IMG_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 61 Notice: Constant _PS_ADMIN_IMG_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 62 Notice: Constant _THEME_CAT_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 64 Notice: Constant _THEME_PROD_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 65 Notice: Constant _THEME_MANU_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 66 Warning: Cannot modify header information - headers already sent by (output started at /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php:32) in /web/htdocs/www.ordomcm.com/home/prestashop/classes/controller/FrontController.php on line 793 Fatal error: Uncaught --> Smarty: Unable to load template file '/web/htdocs/www.ordomcm.com/home/prestashop/themes/themes/header.tpl' <-- thrown in /web/htdocs/www.ordomcm.com/home/prestashop/tools/smarty/sysplugins/smarty_internal_templatebase.php on line 129

 

What can I do? What do you suggest me? I'm ready to disinstall and reinstall everything even if it means restart from zero but I don't know how to do it... I'm crying... :P

Link to comment
Share on other sites

  • 2 weeks later...

Thanks once again!

No way, I did it (I've 1.6.0.9) uploaded all the files but still no success. I've tried to uninistall and reinstall the default theme but no way too. Now if I wanna check the errors using "defines_inc.php" this is the message:

 

Notice: Constant _THEME_IMG_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 32 Notice: Constant _THEME_CSS_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 33 Notice: Constant _THEME_JS_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 34 Notice: Constant _PS_IMG_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 61 Notice: Constant _PS_ADMIN_IMG_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 62 Notice: Constant _THEME_CAT_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 64 Notice: Constant _THEME_PROD_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 65 Notice: Constant _THEME_MANU_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 66 Warning: Cannot modify header information - headers already sent by (output started at /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php:32) in /web/htdocs/www.ordomcm.com/home/prestashop/classes/controller/FrontController.php on line 793 Fatal error: Uncaught --> Smarty: Unable to load template file '/web/htdocs/www.ordomcm.com/home/prestashop/themes/themes/header.tpl' <-- thrown in /web/htdocs/www.ordomcm.com/home/prestashop/tools/smarty/sysplugins/smarty_internal_templatebase.php on line 129

 

What can I do? What do you suggest me? I'm ready to disinstall and reinstall everything even if it means restart from zero but I don't know how to do it... I'm crying... :P

 

I still didn't resolve my trouble, I've updated to the latest version 14, this is still the problem:

 

Notice: Constant _THEME_IMG_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 32 Notice: Constant _THEME_CSS_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 33 Notice: Constant _THEME_JS_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 34 Notice: Constant _PS_IMG_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 61 Notice: Constant _PS_ADMIN_IMG_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 62 Notice: Constant _THEME_CAT_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 64 Notice: Constant _THEME_PROD_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 65 Notice: Constant _THEME_MANU_DIR_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php on line 66 Notice: Constant _PS_PRICE_DISPLAY_PRECISION_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/config.inc.php on line 118 Warning: Cannot modify header information - headers already sent by (output started at /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php:32) in /web/htdocs/www.ordomcm.com/home/prestashop/classes/controller/FrontController.php on line 815 Warning: Cannot modify header information - headers already sent by (output started at /web/htdocs/www.ordomcm.com/home/prestashop/config/defines_uri.inc.php:32) in /web/htdocs/www.ordomcm.com/home/prestashop/classes/controller/FrontController.php on line 816 Notice: Use of undefined constant PS_ROUND_HALF_DOWN - assumed 'PS_ROUND_HALF_DOWN' in /web/htdocs/www.ordomcm.com/home/prestashop/classes/Tools.php on line 1624 Notice: Use of undefined constant PS_ROUND_HALF_EVEN - assumed 'PS_ROUND_HALF_EVEN' in /web/htdocs/www.ordomcm.com/home/prestashop/classes/Tools.php on line 1625 Notice: Use of undefined constant PS_ROUND_HALF_ODD - assumed 'PS_ROUND_HALF_ODD' in /web/htdocs/www.ordomcm.com/home/prestashop/classes/Tools.php on line 1626 Notice: Use of undefined constant PS_ROUND_HALF_UP - assumed 'PS_ROUND_HALF_UP' in /web/htdocs/www.ordomcm.com/home/prestashop/classes/Tools.php on line 1628 Notice: Use of undefined constant PS_ROUND_HALF_UP - assumed 'PS_ROUND_HALF_UP' in /web/htdocs/www.ordomcm.com/home/prestashop/classes/Tools.php on line 1630 Notice: Use of undefined constant PS_ROUND_HALF_DOWN - assumed 'PS_ROUND_HALF_DOWN' in /web/htdocs/www.ordomcm.com/home/prestashop/classes/Tools.php on line 1624 Notice: Use of undefined constant PS_ROUND_HALF_EVEN - assumed 'PS_ROUND_HALF_EVEN' in /web/htdocs/www.ordomcm.com/home/prestashop/classes/Tools.php on line 1625 Notice: Use of undefined constant PS_ROUND_HALF_ODD - assumed 'PS_ROUND_HALF_ODD' in /web/htdocs/www.ordomcm.com/home/prestashop/classes/Tools.php on line 1626 Notice: Use of undefined constant PS_ROUND_HALF_UP - assumed 'PS_ROUND_HALF_UP' in /web/htdocs/www.ordomcm.com/home/prestashop/classes/Tools.php on line 1628 Notice: Use of undefined constant PS_ROUND_HALF_UP - assumed 'PS_ROUND_HALF_UP' in /web/htdocs/www.ordomcm.com/home/prestashop/classes/Tools.php on line 1630 Notice: Use of undefined constant PS_ROUND_HALF_DOWN - assumed 'PS_ROUND_HALF_DOWN' in /web/htdocs/www.ordomcm.com/home/prestashop/classes/Tools.php on line 1624 Notice: Use of undefined constant PS_ROUND_HALF_EVEN - assumed 'PS_ROUND_HALF_EVEN' in /web/htdocs/www.ordomcm.com/home/prestashop/classes/Tools.php on line 1625 Notice: Use of undefined constant PS_ROUND_HALF_ODD - assumed 'PS_ROUND_HALF_ODD' in /web/htdocs/www.ordomcm.com/home/prestashop/classes/Tools.php on line 1626 Notice: Use of undefined constant PS_ROUND_HALF_UP - assumed 'PS_ROUND_HALF_UP' in /web/htdocs/www.ordomcm.com/home/prestashop/classes/Tools.php on line 1628 Notice: Use of undefined constant PS_ROUND_HALF_UP - assumed 'PS_ROUND_HALF_UP' in /web/htdocs/www.ordomcm.com/home/prestashop/classes/Tools.php on line 1630 Notice: Use of undefined constant PS_ROUND_HALF_DOWN - assumed 'PS_ROUND_HALF_DOWN' in /web/htdocs/www.ordomcm.com/home/prestashop/classes/Tools.php on line 1624 Notice: Use of undefined constant PS_ROUND_HALF_EVEN - assumed 'PS_ROUND_HALF_EVEN' in /web/htdocs/www.ordomcm.com/home/prestashop/classes/Tools.php on line 1625 Notice: Use of undefined constant PS_ROUND_HALF_ODD - assumed 'PS_ROUND_HALF_ODD' in /web/htdocs/www.ordomcm.com/home/prestashop/classes/Tools.php on line 1626 Notice: Use of undefined constant PS_ROUND_HALF_UP - assumed 'PS_ROUND_HALF_UP' in /web/htdocs/www.ordomcm.com/home/prestashop/classes/Tools.php on line 1628 Notice: Use of undefined constant PS_ROUND_HALF_UP - assumed 'PS_ROUND_HALF_UP' in /web/htdocs/www.ordomcm.com/home/prestashop/classes/Tools.php on line 1630

 

I've downloaded the latest version and copied CLASSES to the server overwriting the previous one but the result is still the same. Then I don't see and drop menu on my admin page. Going into advanced parameters everything seems ok but I saw this on the top page: _PS_PRICE_DISPLAY_PRECISION_ already defined in /web/htdocs/www.ordomcm.com/home/prestashop/config/config.inc.php on line 118

 

Someone asked me money to fix the troubles, I'm thinking about it but also I wanna try to solve it by myself, the solution coudn't be so hard; on the other shop once restored the mysql everything turned well...

Link to comment
Share on other sites

Ah another maybe useful info... When I've upgrade I saw the images for example the pics on the login page, then I changed all the permission to all the files and cartels to 755 and now I don't see the pics anymore. A real nightmare for a non professional webman...

Link to comment
Share on other sites

I think there is a clue here in all the Constant Already Defined errors...   defines_uri has the location where, e.g., the css files are held, which is usually set to _THEME_DIR_.'css/'  .... it is saying this has already been set somewhere else, presumably to css.ordomcm.com/...

 

There's not much that gets included before that, so check config/defines.inc.php and config/autoload.php initially to see if there is anything different to the stock files, particularly anything relating to THEME_.....

  • Like 1
Link to comment
Share on other sites

I think there is a clue here in all the Constant Already Defined errors...   defines_uri has the location where, e.g., the css files are held, which is usually set to _THEME_DIR_.'css/'  .... it is saying this has already been set somewhere else, presumably to css.ordomcm.com/...

 

There's not much that gets included before that, so check config/defines.inc.php and config/autoload.php initially to see if there is anything different to the stock files, particularly anything relating to THEME_.....

 

REALLY THANKS A LOT!  The problem is far to be solved but now the shop is "acceptable", I still don't have the drop menu on the BO, any idea about how they're (I mean with files I need to check?)

The trouble on the page came from:

 

if ( $_SERVER['REMOTE_ADDR'] != '127.0.0.1' )

{

  define( '_THEME_IMG_DIR_',   'http://img2.ordomcm.com/prestashop/'       );

  define( '_THEME_CSS_DIR_',   'http://css.ordomcm.com/prestashop/'        );

  define( '_THEME_JS_DIR_',    'http://js.ordomcm.com/prestashop/'         );

  define( '_THEME_CAT_DIR_',   'http://img1.ordomcm.com/prestashop/c/'     );

  define( '_THEME_PROD_DIR_',  'http://img1.ordomcm.com/prestashop/p/'     );

  define( '_THEME_MANU_DIR_',  'http://img1.ordomcm.com/prestashop/m/'     );

  define( '_PS_IMG_',          'http://img1.ordomcm.com/prestashop/'       );

  define( '_PS_ADMIN_IMG_',    'http://img1.ordomcm.com/prestashop/admin/' );

} else {

  define( '_THEME_IMG_DIR_',   _THEMES_DIR_ . _THEME_NAME_ . '/img/' );

  define( '_THEME_CSS_DIR_',   _THEMES_DIR_ . _THEME_NAME_ . '/css/' );

  define( '_THEME_JS_DIR_',    _THEMES_DIR_ . _THEME_NAME_ . '/js/'  );

  define( '_THEME_CAT_DIR_',   __PS_BASE_URI__ . 'img/c/'            );

  define( '_THEME_PROD_DIR_',  __PS_BASE_URI__ . 'img/p/'            );

  define( '_THEME_MANU_DIR_',  __PS_BASE_URI__ . 'img/m/'            );

  define( '_PS_IMG_',          __PS_BASE_URI__ . 'img/'              );

  define( '_PS_ADMIN_IMG_',    _PS_IMG_.'admin/'                     );

}

 

But who added it to the config/defines???

Making another test using TRUE on the defines no error appears I can't only see the miniatures with a strange written "Notice: Use of undefined cons" repeated.

Btw thank you very much now it seems work, need to resolve the trouble related to my BO drop menu but I'm happy :D

Link to comment
Share on other sites

When you installed your theme this was added. If I where you, I will drop the theme and use another one on a fresh install. BO problem could come too from a bad coded module you are using.

 

Themes using overrides or adding new rules to files should be discard. Next upgrade you will make and core files are overwritten (defines.inc is one of them) and you will get again troubles.

Edited by selectshop.at (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...