adamthomson123 Posted September 13, 2015 Share Posted September 13, 2015 After upgrade from 1.6.0.11 to 1.6.1.1. I am facing one issue, when I am uploading new product or when I am uploading images for the products, this error comes "Error while creating additional image" and I cannot upload images. I need help to solve this error. Screenshot Attcahed. Many Thanks Link to comment Share on other sites More sharing options...
NemoPS Posted September 14, 2015 Share Posted September 14, 2015 Are you sure the format is really jpg? Is it lower or uppercase? Link to comment Share on other sites More sharing options...
adamthomson123 Posted September 15, 2015 Author Share Posted September 15, 2015 (edited) Are you sure the format is really jpg? Is it lower or uppercase? Many thanks for your reply, Yes the image format is Jpeg.and image name is "Mallorca-white-bed" before it was all upper case then I tried to upload images by changing their name to lower case. but still failed to upload. , and this error started coming 2 weeks ago when I was trying to upload images to a product. and then I added a new user (Employee) in back end, and i signed in with that id, and then I tried. with that new ID I have uploaded 4 images for that product. and it was successful. but next time when i wanted to upload images for another product. this error start Coming and still I cannot find the solution. Please help me to solve this issue. Many thanks Edited September 15, 2015 by adamthomson123 (see edit history) Link to comment Share on other sites More sharing options...
yannfanch Posted September 16, 2015 Share Posted September 16, 2015 Maybe a problem with your access rights in the ftp folder... Link to comment Share on other sites More sharing options...
NemoPS Posted September 16, 2015 Share Posted September 16, 2015 I guess that user has enough rights? What about the superadmin one? Also, you could try opening the debug console, fire the upload and keep an eye to the network tab, looking for the upload request's response Link to comment Share on other sites More sharing options...
adamthomson123 Posted September 16, 2015 Author Share Posted September 16, 2015 (edited) I guess that user has enough rights? What about the superadmin one? Also, you could try opening the debug console, fire the upload and keep an eye to the network tab, looking for the upload request's response One user is super admin, and other user is logician. If You want I can sent you both login details and you can have a look. I am stucked now. can't go ahead until the issue is solved. Please help me to get it solved. I don't know how to turn on debug console. please help me to open it and get it fixed. Many thanks Edited September 16, 2015 by adamthomson123 (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted September 18, 2015 Share Posted September 18, 2015 Just hit f12 on chrome, then tab to network and try uploading Link to comment Share on other sites More sharing options...
adamthomson123 Posted September 18, 2015 Author Share Posted September 18, 2015 Just hit f12 on chrome, then tab to network and try uploading Hi, Tried that way, but same error exists. if you want, can I send you login details for back end? and you can have a look please. Many Thanks Link to comment Share on other sites More sharing options...
NemoPS Posted September 19, 2015 Share Posted September 19, 2015 Sorry, I can't check it directly at the moment. That is just supposed to display the debug console on chrome. Link to comment Share on other sites More sharing options...
adamthomson123 Posted September 20, 2015 Author Share Posted September 20, 2015 (edited) Sorry, I can't check it directly at the moment. That is just supposed to display the debug console on chrome. Ok Thanks! can you help me with another error, which is 404 error. its keep coming always on back end of my website. how to get rid of this issue? it is too much every time it take too long to resolve. 404 Error. Please help me with that. I cannot add product combinations, i cannot add more products, it is every where coming. Many thanks Edited September 20, 2015 by adamthomson123 (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted September 21, 2015 Share Posted September 21, 2015 When are you getting the 404 exactly? Link to comment Share on other sites More sharing options...
adamthomson123 Posted September 22, 2015 Author Share Posted September 22, 2015 When are you getting the 404 exactly? 404 error Comes on Whenever i login back end. whenever i add new product whenever i add combinations of any product whenever i edit orders. and sometimes when customer try to make payment on order page. it gives 404 error, than customer call me and place order over the phone. whenever I try to send message to customer from back-end, it is always failed to send a message to customer and comes 404 error. Link to comment Share on other sites More sharing options...
NemoPS Posted September 23, 2015 Share Posted September 23, 2015 Very odd, could you ask your hosting company? If you are using friendly urls for the front office, try disabling them and see if it helps, although it should not really interfere. It might as well be mod_security Link to comment Share on other sites More sharing options...
adamthomson123 Posted September 23, 2015 Author Share Posted September 23, 2015 Very odd, could you ask your hosting company? If you are using friendly urls for the front office, try disabling them and see if it helps, although it should not really interfere. It might as well be mod_security and why i cannot send messages to the customers from back end? it is also giving error. will you suggest me to install the fresh prestashop and upload old database in that? will it work and solve all the errors? I really need help with these issues, as i dont have programming skills. Link to comment Share on other sites More sharing options...
NemoPS Posted September 25, 2015 Share Posted September 25, 2015 It really depends on the issue. You can try to install a whole separate new version first, see how that works (on the same server). If it does, try hooking it up to your old database (given it's the same prestashop version) Link to comment Share on other sites More sharing options...
adamthomson123 Posted September 25, 2015 Author Share Posted September 25, 2015 It really depends on the issue. You can try to install a whole separate new version first, see how that works (on the same server). If it does, try hooking it up to your old database (given it's the same prestashop version) After Fresh Install, Shall I copy all the tables with data from old database to new database? hooking means? will it work? Link to comment Share on other sites More sharing options...
NemoPS Posted September 26, 2015 Share Posted September 26, 2015 I just mean connecting. You don't need to copy tables, just modify the database name in config/settings.inc.php so that it is not destructive, and you can always change it back Link to comment Share on other sites More sharing options...
adamthomson123 Posted September 28, 2015 Author Share Posted September 28, 2015 I just mean connecting. You don't need to copy tables, just modify the database name in config/settings.inc.php so that it is not destructive, and you can always change it back Many thanks for your help, I have installed a fresh prestashop and connected the database as you said, everything is fine just there are two errors, 1. in the top right contact us on front page, that is not working, i am attaching a screenshot of that error, customers cannot send messages through contact us form. Please help me to solve this and 2. when I click on messages in back end dashboard, it cannot open messages and keep giving 404 error. and Internal Server Error. Screenshot attached. please help me to fix it aswell. Many Many thanks Link to comment Share on other sites More sharing options...
NemoPS Posted September 30, 2015 Share Posted September 30, 2015 Is dev mode enabled already? Link to comment Share on other sites More sharing options...
adamthomson123 Posted October 1, 2015 Author Share Posted October 1, 2015 (edited) Is dev mode enabled already? Please help me to get is sorted, My business is getting affected with these errors now. customer cannot place orders and the complaint about the errors all the time. Yes it is enabled, and error comes like this: (This errors comes , when I Click on Orders in Back End, and similar error comes when I click on Messages.). [PrestaShopDatabaseException] Unknown column 'id_shop' in 'where clause' SELECT * FROM `ps_ganalytics` WHERE sent = 0 AND id_shop = '1' AND DATE_ADD(date_add, INTERVAL 30 minute) < NOW() at line 791 in file classes/db/Db.php 786. if ($webservice_call && $errno) {787. $dbg = debug_backtrace(); 788. WebserviceRequest::getInstance()->setError(500, ' '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);789. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {790. if ($sql) {791. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');792. }793.794. throw new PrestaShopDatabaseException($this->getMsgError());795. }796. } DbCore->displayError - [line 425 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 643 - classes/db/Db.php] - [1 Arguments] DbCore->executeS - [line 675 - modules/ganalytics/ganalytics.php] - [1 Arguments] Ganalytics->hookBackOfficeHeader - [line 587 - classes/Hook.php] - [1 Arguments] HookCore::coreCallHook - [line 544 - classes/Hook.php] - [3 Arguments] HookCore::exec - [line 2733 - classes/controller/AdminController.php] - [2 Arguments] AdminControllerCore->init - [line 170 - classes/controller/Controller.php] ControllerCore->run - [line 367 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 58 - admin/index.php] Edited October 1, 2015 by adamthomson123 (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted October 2, 2015 Share Posted October 2, 2015 It seems the google analytics module is missing a column named id_shop, you need to add it to the database using phpmyadmin Link to comment Share on other sites More sharing options...
adamthomson123 Posted October 3, 2015 Author Share Posted October 3, 2015 (edited) It seems the google analytics module is missing a column named id_shop, you need to add it to the database using phpmyadmin Thanks i have done that and the error on the orders page has been solved. but the other error is still there, when i click on messages in back end > dashboard> messages. it is keep giving 404 error. and i cannot find the solution for that. I have turned on error reporting in defines.inc.php. but nothing comes up. and only comes "404 page not found" i have to many messages from customers to read and reply them and same error comes when I login back end , i always see 404 error and i refresh the page 6, 7 times then i get to the back end. Please help me to solve these errors. Many Many Thanks Edited October 3, 2015 by adamthomson123 (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted October 5, 2015 Share Posted October 5, 2015 You might be running out of resources at this point. Check the error log inside prestashop. If nothing pops out, you can ask your hosting to check your server's logs Link to comment Share on other sites More sharing options...
adamthomson123 Posted October 5, 2015 Author Share Posted October 5, 2015 You might be running out of resources at this point. Check the error log inside prestashop. If nothing pops out, you can ask your hosting to check your server's logs Thanks for your help, Following is the Error log from 2nd of October to 4th of October 2015. Please if you can guide me to catch the error. Many Thanks [02-Oct-2015 18:35:57 UTC] PHP Warning: require_once(/home/brixton/public_html/config/defines.inc.php): failed to open stream: No such file or directory in /home/brixton/public_html/config/config.inc.php on line 33 [02-Oct-2015 18:35:57 UTC] PHP Fatal error: require_once(): Failed opening required '/home/brixton/public_html/config/defines.inc.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/brixton/public_html/config/config.inc.php on line 33 [02-Oct-2015 18:36:24 UTC] PHP Warning: require_once(/home/brixton/public_html/config/defines.inc.php): failed to open stream: No such file or directory in /home/brixton/public_html/config/config.inc.php on line 33 [02-Oct-2015 18:36:24 UTC] PHP Fatal error: require_once(): Failed opening required '/home/brixton/public_html/config/defines.inc.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/brixton/public_html/config/config.inc.php on line 33 [02-Oct-2015 18:58:21 GMT] PHP Fatal error: Call to undefined method CompareController::getProduct() in /home/brixton/public_html/modules/socialsharing/socialsharing.php on line 161 [02-Oct-2015 18:58:50 GMT] PHP Fatal error: Call to undefined method CompareController::getProduct() in /home/brixton/public_html/modules/socialsharing/socialsharing.php on line 161 [03-Oct-2015 16:12:56 GMT] PHP Fatal error: Call to undefined method CompareController::getProduct() in /home/brixton/public_html/modules/socialsharing/socialsharing.php on line 161 [04-Oct-2015 08:47:05 GMT] PHP Fatal error: Call to undefined method CompareController::getProduct() in /home/brixton/public_html/modules/socialsharing/socialsharing.php on line 161 [04-Oct-2015 10:47:18 GMT] PHP Fatal error: Call to undefined method CompareController::getProduct() in /home/brixton/public_html/modules/socialsharing/socialsharing.php on line 161 [04-Oct-2015 20:40:12 GMT] PHP Fatal error: Call to undefined method CompareController::getProduct() in /home/brixton/public_html/modules/socialsharing/socialsharing.php on line 161 [04-Oct-2015 20:40:17 GMT] PHP Fatal error: Call to undefined method CompareController::getProduct() in /home/brixton/public_html/modules/socialsharing/socialsharing.php on line 161 Link to comment Share on other sites More sharing options...
NemoPS Posted October 7, 2015 Share Posted October 7, 2015 I don't have that in my socialsharing module, yours might be newer. I guess it's not compatible with the version you run it on Link to comment Share on other sites More sharing options...
adamthomson123 Posted October 7, 2015 Author Share Posted October 7, 2015 I don't have that in my socialsharing module, yours might be newer. I guess it's not compatible with the version you run it on and when I try to create an order from the cart in back end. following error comes [PrestaShopException]Property Order->total_paid is not valid at line 909 in file classes/ObjectModel.php 904. }905. 906. $message = $this->validateField($field, $this->$field);907. if ($message !== true) {908. if ($die) {909. throw new PrestaShopException($message);910. }911. return $error_return ? $message : false;912. }913. }914. ObjectModelCore->validateFields - [line 246 - classes/ObjectModel.php] ObjectModelCore->getFields - [line 304 - classes/order/Order.php] OrderCore->getFields - [line 487 - classes/ObjectModel.php] ObjectModelCore->add - [line 309 - classes/order/Order.php] - [2 Arguments] OrderCore->add - [line 341 - classes/PaymentModule.php] PaymentModuleCore->validateOrder - [line 1160 - controllers/admin/AdminOrdersController.php] - [9 Arguments] AdminOrdersControllerCore->postProcess - [line 178 - classes/controller/Controller.php] ControllerCore->run - [line 367 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 58 - admin/index.php] [PrestaShopException]Property Order->total_paid is not valid at line 909 in file classes/ObjectModel.php 904. }905. 906. $message = $this->validateField($field, $this->$field);907. if ($message !== true) {908. if ($die) {909. throw new PrestaShopException($message);910. }911. return $error_return ? $message : false;912. }913. }914. ObjectModelCore->validateFields - [line 246 - classes/ObjectModel.php] ObjectModelCore->getFields - [line 304 - classes/order/Order.php] OrderCore->getFields - [line 487 - classes/ObjectModel.php] ObjectModelCore->add - [line 309 - classes/order/Order.php] - [2 Arguments] OrderCore->add - [line 341 - classes/PaymentModule.php] PaymentModuleCore->validateOrder - [line 1160 - controllers/admin/AdminOrdersController.php] - [9 Arguments] AdminOrdersControllerCore->postProcess - [line 178 - classes/controller/Controller.php] ControllerCore->run - [line 367 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 58 - admin/index.php] Link to comment Share on other sites More sharing options...
NemoPS Posted October 9, 2015 Share Posted October 9, 2015 Could you recap the steps you followed? I think I got lost. That shouldn't happen if you still use the same database. There are no huge changes between the 2 versions as far as I know Link to comment Share on other sites More sharing options...
adamthomson123 Posted October 9, 2015 Author Share Posted October 9, 2015 (edited) I have upgraded from 1.6.0.11 to 1.6.1.1. by clicking on One Click Upgrade Module. and all the upgrade was done, at the end it said 404 error. but when I checked it was upgraded and was showing the version 1.6.1.1. my customers are complaining about the order process , it is giving error and they cannot make payments. then they call and we process their orders. Please guide me , how to get access to the messages in the back end, whenever i click on messages, 404 error comes up all the time. and i Have to read more than 35 messages and reply to customers, but i cannot open them. please help me to solve all these issues. many thanks Edited October 9, 2015 by adamthomson123 (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted October 10, 2015 Share Posted October 10, 2015 It's really hard to tell what's going on. Of course, the upgrade failed, that's given. You'd have to check the db entries and see why it's spawning a broken value Link to comment Share on other sites More sharing options...
adamthomson123 Posted October 10, 2015 Author Share Posted October 10, 2015 (edited) How to check Database Entries? is there any option available, that I can get back the previous Database before upgrade (If i could install a fresh prestashop and import all the previous data to new database? ( I have tried by connecting the old database with fresh install , but is giving too many errors).? or what do I need to do to solve the errors. customers cannot make payments and they keep complaining all the time, it is effecting the business badly. I have tried by installing a fresh prestashop 1.6.0.11 and connecting the old database. but still facing many errors. many product's images lost. need to upload images again. Need your suggestion and guide to get the website in perfect condition. i need to take some positive actions asap. please guide me. Many Thanks Edited October 12, 2015 by adamthomson123 (see edit history) Link to comment Share on other sites More sharing options...
Dasher3000 Posted December 17, 2015 Share Posted December 17, 2015 We have at least temporarily solved this by DROPping and editing INDEXes related to "cover" image. 1. We DROPped INDEX id_product_cover from ps_image indexes. 2. Also: we set to IGNORE the "cover" field of the INDEX id_image in the ps_image_shop table. This allowed us to upload, but I think you will need to recreate these indexes to get all the functionality to work. We noticed this created a bug (but it all works fine once you know the bug): 1. The "COVER" checkbox will DELETE that image -- so you can use it for that - Click SAVE and STAY to delete the selected image. 2. The LAST image you upload will be your COVER image. ** All your uploaded images will be marked "Cover" image... Hope that helps someone. - Dasher Link to comment Share on other sites More sharing options...
musicmaster Posted December 18, 2015 Share Posted December 18, 2015 We have at least temporarily solved this by DROPping and editing INDEXes related to "cover" image. 1. We DROPped INDEX id_product_cover from ps_image indexes. 2. Also: we set to IGNORE the "cover" field of the INDEX id_image in the ps_image_shop table. This allowed us to upload, but I think you will need to recreate these indexes to get all the functionality to work. We noticed this created a bug (but it all works fine once you know the bug): 1. The "COVER" checkbox will DELETE that image -- so you can use it for that - Click SAVE and STAY to delete the selected image. 2. The LAST image you upload will be your COVER image. ** All your uploaded images will be marked "Cover" image... This will set you up for problems with future upgrades. With 1.6.1 PS went to a different way of treating the cover field. In the old setup all images that were not cover had the value "0" for the cover field. In the new setup the value is "NULL". That allows PS to set a unique index on that field. I get the impression that something has gone wrong in your database with the conversion from "0" to "NULL". Link to comment Share on other sites More sharing options...
Miss_Strangelove Posted March 29, 2016 Share Posted March 29, 2016 I had the same issue. For me the problem was with class Objectmodel.php formatfields function Link to comment Share on other sites More sharing options...
mysterion Posted April 28, 2016 Share Posted April 28, 2016 I had the same issue. For me the problem was with class Objectmodel.php formatfields function I'm really struggling with this issue now on a site that was uploading images fine and has suddenly stopped. I've reviewed all permissions, applied the suggested MySQL "fixes". Can you elaborate on what changes you made to the "Objectmodel.php formatfields function"? Link to comment Share on other sites More sharing options...
Miss_Strangelove Posted April 28, 2016 Share Posted April 28, 2016 First, you need to check that in you ddbb tables value for not cover images is NULL on ps_image and ps_image_shop. For me all the suggested fixes (dropping tables etc..) didn't work. What I changed on objectmodel.php is function formatfields as this: protected function formatFields($type, $id_lang = null) { $fields = array(); // Set primary key in fields if (isset($this->id)) $fields[$this->def['primary']] = $this->id; foreach ($this->def['fields'] as $field => $data) { // Only get fields we need for the type // E.g. if only lang fields are filtered, ignore fields without lang => true if (($type == self::FORMAT_LANG && empty($data['lang'])) || ($type == self::FORMAT_SHOP && empty($data['shop'])) || ($type == self::FORMAT_COMMON && (!empty($data['shop']) || !empty($data['lang'])))) continue; if (is_array($this->update_fields)) if ((!empty($data['lang']) || !empty($data['shop'])) && (empty($this->update_fields[$field]) || ($type == self::FORMAT_LANG && empty($this->update_fields[$field][$id_lang])))) continue; // Get field value, if value is multilang and field is empty, use value from default lang $value = $this->$field; if ($type == self::FORMAT_LANG && $id_lang && is_array($value)) { if (!empty($value[$id_lang])) $value = $value[$id_lang]; else if (!empty($data['required'])) $value = $value[Configuration::get('PS_LANG_DEFAULT')]; else $value = ''; } $purify = (isset($data['validate']) && Tools::strtolower($data['validate']) == 'iscleanhtml') ? true : false; // Format field value //$fields[$field] = ObjectModel::formatValue($value, $data['type']); $fields[$field] = ObjectModel::formatValue($value, $data['type'], false, false, !empty($data['allow_null'])); } return $fields; } Let me know if you want me to take a look Link to comment Share on other sites More sharing options...
mysterion Posted April 28, 2016 Share Posted April 28, 2016 @Miss_Strangelove Thanks so much for the quick and helpful response - I'll report back shortly.. Link to comment Share on other sites More sharing options...
mysterion Posted April 28, 2016 Share Posted April 28, 2016 (edited) Unfortunately this didn't work for me. Can you clarify what you mean by the following? "First, you need to check that in you ddbb tables value for not cover images is NULL on ps_image and ps_image_shop." If you look at the attached screen none of fields for column cover image is "null". Should I change them all to null? Thanks Edited April 28, 2016 by mysterion (see edit history) Link to comment Share on other sites More sharing options...
mysterion Posted April 28, 2016 Share Posted April 28, 2016 (edited) Actually even changing all to null for both tables has made no difference Edited April 28, 2016 by mysterion (see edit history) Link to comment Share on other sites More sharing options...
Miss_Strangelove Posted April 28, 2016 Share Posted April 28, 2016 I do not see the Unfortunately this didn't work for me. Can you clarify what you mean by the following? "First, you need to check that in you ddbb tables value for not cover images is NULL on ps_image and ps_image_shop." If you look at the attached screen none of fields for column cover image is "null". Should I change them all to null? Thanks I do not see the attachment. What version of prestashop are you using? Also, can you enable dev mode and try to upload image and tell me the error you are getting? Link to comment Share on other sites More sharing options...
mysterion Posted April 28, 2016 Share Posted April 28, 2016 Apologies - please refresh the page. I'll enable dev mode now Link to comment Share on other sites More sharing options...
mysterion Posted April 28, 2016 Share Posted April 28, 2016 After enabling dev mode the error is now (using your updated ObjectModel.php) "Unexpected token < in JSON at position 0" Link to comment Share on other sites More sharing options...
Miss_Strangelove Posted April 28, 2016 Share Posted April 28, 2016 Please, attach screenshot of both tables (ps_image and ps_image_shop) values and also table structure. Link to comment Share on other sites More sharing options...
mysterion Posted April 28, 2016 Share Posted April 28, 2016 Rather than waste more of your time I've just PM'd you access details. I greatly appreciate you help and am happy to pay you for your time. Link to comment Share on other sites More sharing options...
Miss_Strangelove Posted April 28, 2016 Share Posted April 28, 2016 Ok, I'll take a look and let you know 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