Nay Thiha Posted January 21, 2013 Share Posted January 21, 2013 I just got startet on PS. I can't add products as a blank page shows up when I click add new. Here is the screen shot: https://www.dropbox.com/s/1ofoeqrtyi5dyb5/Prestashop%20New%20Product%20Error.JPG Other users have the same problem with me: http://www.prestashop.com/forums/topic/193820-i-cant-add-new-product/ http://forge.prestashop.com/browse/PSCFV-5687?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel#issue-tabs http://forge.prestashop.com/browse/PSCFV-6010 http://forge.prestashop.com/browse/PSCFV-6612 Where can I find the solution? Best Regards Nay Thiha Link to comment Share on other sites More sharing options...
El Patron Posted January 21, 2013 Share Posted January 21, 2013 whenever you get a blank page, then there was an error. to discover the true error you need to turn on error reporting or look at your webhosting error log you can turn on prestashop error so that you can see them on the screen config/defines.inc.php find define('_PS_MODE_DEV_', false); change to: define('_PS_MODE_DEV_', true); reproduce the problem, then you should see the error message Link to comment Share on other sites More sharing options...
carsiparts Posted January 22, 2013 Share Posted January 22, 2013 [PrestaShopDatabaseException] Unknown column 'redirect_type' in 'field list'INSERT INTO `ps_product` (`id_shop_default`, `id_manufacturer`, `id_supplier`, `reference`, `supplier_reference`, `location`, `width`, `height`, `depth`, `weight`, `quantity_discount`, `ean13`, `upc`, `cache_is_pack`, `cache_has_attachments`, `is_virtual`, `id_category_default`, `id_tax_rules_group`, `on_sale`, `online_only`, `ecotax`, `minimal_quantity`, `price`, `wholesale_price`, `unity`, `unit_price_ratio`, `additional_shipping_cost`, `customizable`, `text_fields`, `uploadable_files`, `active`, `redirect_type`, `id_product_redirected`, `available_for_order`, `available_date`, `condition`, `show_price`, `indexed`, `visibility`, `cache_default_attribute`, `advanced_stock_management`, `date_add`, `date_upd`) VALUES ('1', '0', '0', '', '', '', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '2', '0', '0', '0', '0', '1', '0', '0', '', '0', '0', '0', '0', '0', '1', '404', '0', '1', '0000-00-00', 'new', '1', '0', 'both', '0', '0', '2013-01-22 16:48:18', '2013-01-22 16:48:18') at line 605 in file classes/db/Db.php 599. WebserviceRequest::getInstance()->setError(500, ' '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);600. }601. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))602. {603. if ($sql)604. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');605. throw new PrestaShopDatabaseException($this->getMsgError());606. }607. }608. 609. /**[b]DbCore->displayError[/b] - [line 307 - classes/db/Db.php] - [1 Arguments] [b]DbCore->query[/b] - [line 581 - classes/db/Db.php] - [1 Arguments] [b]DbCore->q[/b] - [line 372 - classes/db/Db.php] - [2 Arguments] [b]DbCore->insert[/b] - [line 464 - classes/ObjectModel.php] - [3 Arguments] [b]ObjectModelCore->add[/b] - [line 477 - classes/Product.php] - [2 Arguments] [b]ProductCore->add[/b] - [line 1584 - controllers/admin/AdminProductsController.php] - [size=3][0 Argument][/size] [b]AdminProductsControllerCore->processAdd[/b] - [line 629 - classes/controller/AdminController.php] - [size=3][0 Argument][/size] [b]AdminControllerCore->processSave[/b] - [line 541 - classes/controller/AdminController.php] - [size=3][0 Argument][/size] [b]AdminControllerCore->postProcess[/b] - [line 1171 - controllers/admin/AdminProductsController.php] - [size=3][0 Argument][/size] [b]AdminProductsControllerCore->postProcess[/b] - [line 158 - classes/controller/Controller.php] - [size=3][0 Argument][/size] [b]ControllerCore->run[/b] - [line 348 - classes/Dispatcher.php] - [size=3][0 Argument][/size] [b]DispatcherCore->dispatch[/b] - [line 50 - admin123/index.php] - [size=3][0 Argument][/size] Is the problem wen i try to add a product.... Link to comment Share on other sites More sharing options...
carsiparts Posted January 22, 2013 Share Posted January 22, 2013 Can you help me? please. Link to comment Share on other sites More sharing options...
El Patron Posted January 22, 2013 Share Posted January 22, 2013 from the error report I would say that you are missing field redirect_type from table ps_product...but this is a guess as there may be more missing else where...is this an upgrade? there is an open report on this found here; http://forge.prestashop.com/browse/PSCFV-6424 Link to comment Share on other sites More sharing options...
carsiparts Posted January 23, 2013 Share Posted January 23, 2013 hello Thanks for the reply. I did the upgrade and thereafter never worked correctly. Link to comment Share on other sites More sharing options...
El Patron Posted January 23, 2013 Share Posted January 23, 2013 (edited) if you are familiar with phpmyadmin you could add the field to the table...unzip a new ps of your installed version and search for that field in the install folder. you will see the sql do you have access to you db phpmyadmin? Edited January 23, 2013 by elpatron (see edit history) Link to comment Share on other sites More sharing options...
Nay Thiha Posted January 23, 2013 Author Share Posted January 23, 2013 I'm okay with my problem cz I've just uninstall and reinstall the prestashop 1.5. I'm lucky that I'm just on trial for my new online store. But I'm thinking to use Volusion cz it has 24/7 support. If I've added many products a lot and if the problem reoccur I will be dead. I'm not a technician. So I don't know about the terms of web developing. Link to comment Share on other sites More sharing options...
Nay Thiha Posted January 23, 2013 Author Share Posted January 23, 2013 Thanks for all who helped and comment on this topic. Hoping to resolve this problem by just easy way.... Best Regards Nay Thiha Link to comment Share on other sites More sharing options...
kiran4prestashop Posted March 26, 2013 Share Posted March 26, 2013 (edited) Hi Elpatron, Actually i am having the same problem like same error [PrestaShopDatabaseException] Unknown column 'countries' in 'field list'INSERT INTO `ps_product_lang` (`id_product`, `meta_description`, `meta_keywords`, `meta_title`, `countries`, `link_rewrite`, `name`, `description`, `description_short`, `available_now`, `available_later`, `id_lang`, `id_shop`) VALUES ('10', '', '', '', 'In', 'ipod-nano123', 'iPod Nano123', 'dadadasda', 'asdasda', '', '', '1', '1') at line 605 in file classes/db/Db.php I have the "countries" field in ps_product_lang but still it is saying that unknown column. Please help me Thanks Inadvance.. Edited March 26, 2013 by kiran4prestashop (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted March 26, 2013 Share Posted March 26, 2013 Hi Elpatron, Actually i am having the same problem like same error [PrestaShopDatabaseException] Unknown column 'countries' in 'field list'INSERT INTO `ps_product_lang` (`id_product`, `meta_description`, `meta_keywords`, `meta_title`, `countries`, `link_rewrite`, `name`, `description`, `description_short`, `available_now`, `available_later`, `id_lang`, `id_shop`) VALUES ('10', '', '', '', 'In', 'ipod-nano123', 'iPod Nano123', 'dadadasda', 'asdasda', '', '', '1', '1') at line 605 in file classes/db/Db.php I have the "countries" field in ps_product_lang but still it is saying that unknown column. Please help me Thanks Inadvance.. what version of ps? Link to comment Share on other sites More sharing options...
kiran4prestashop Posted March 26, 2013 Share Posted March 26, 2013 (edited) I am using prestashop_1.5.3.1 version. Edited March 26, 2013 by kiran4prestashop (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted March 26, 2013 Share Posted March 26, 2013 prestashop_1.5.3.1 is this an upgraded shop? Link to comment Share on other sites More sharing options...
kiran4prestashop Posted March 26, 2013 Share Posted March 26, 2013 I have added one field at admin products adding page and i am trying to update that in Product.php in classes. /** @var enum Product countries */ public $countries; 'countries' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString'), Here countries is a dropdown selections for selecting list of countries.. <table> <td class="col-left"><label>Countries</label></td> <td> <select name="countries" id="countries" size="2" multiple="multiple"> <option value="All">All</option> <option value="In">India</option> <option value="US">United States</option> <option value="UK">United Kingdom</option> </select> </td> </table> In seo.tpl page. Is the way i am coded correct please let me know Don't know but i found this version in prestashop official site only. http://www.prestashop.com/ Link to comment Share on other sites More sharing options...
El Patron Posted March 26, 2013 Share Posted March 26, 2013 is this an upgraded shop? you would be better off downloading a native prestashop of your version and comparing files, rather than trying to make coding changes.... Link to comment Share on other sites More sharing options...
kiran4prestashop Posted March 26, 2013 Share Posted March 26, 2013 Actually my requirement is to add one countries field for each product and i have sent you the code for which i have used for extra fiel, i think there is no relation between versions. And the version which i am using is downloaded from the prestashop official portal only and it is using by many people. Do you know how to code for adding one extra field in product adding/editing page and adding that field content to database when product is submitted. Link to comment Share on other sites More sharing options...
El Patron Posted March 26, 2013 Share Posted March 26, 2013 Actually my requirement is to add one countries field for each product and i have sent you the code for which i have used for extra fiel, i think there is no relation between versions. And the version which i am using is downloaded from the prestashop official portal only and it is using by many people. Do you know how to code for adding one extra field in product adding/editing page and adding that field content to database when product is submitted. it's pretty simple back office-->catalog-->products edit a product click customization here you can add a text field, required/not-required play with that and see if it meets your requirements... do not modify the ps unless you have no other choice, otherwise you will have problems later upgrading to get new ps features Link to comment Share on other sites More sharing options...
kiran4prestashop Posted March 26, 2013 Share Posted March 26, 2013 I want drop down option not text field. Link to comment Share on other sites More sharing options...
El Patron Posted March 26, 2013 Share Posted March 26, 2013 I want drop down option not text field. you should open a post in the development forum...this has now gone off topic Link to comment Share on other sites More sharing options...
kiran4prestashop Posted March 26, 2013 Share Posted March 26, 2013 where can i get developer forum, can you please give the link. Link to comment Share on other sites More sharing options...
El Patron Posted March 26, 2013 Share Posted March 26, 2013 where can i get developer forum, can you please give the link. http://www.prestashop.com/forums/forum/116-development/ Link to comment Share on other sites More sharing options...
Recommended Posts