PeterVajda Posted March 19, 2017 Share Posted March 19, 2017 Hi, after upgrading to 1.7.0.6 I lost attributes list in admin product page. See screenshot: There is no attributes list being generated to the template, however, attributes are still working fine. Any ideas? Thank you! Link to comment Share on other sites More sharing options...
PeterVajda Posted March 25, 2017 Author Share Posted March 25, 2017 Okay, I discovered the cause. Attributes column in administration disappears when I delete one of languages (Czech and Slovak languages are both installed at one time). When Czech is deleted, attributes column disappear. I strongly suggest solving this in next PS 1.7 release. Link to comment Share on other sites More sharing options...
nikosg Posted March 27, 2017 Share Posted March 27, 2017 I have the same problem but i dont remember to have any language deleted. Did you solve it somehow? Link to comment Share on other sites More sharing options...
cherepaxa Posted March 29, 2017 Share Posted March 29, 2017 I have same problem. And backup to old $( Link to comment Share on other sites More sharing options...
cherepaxa Posted March 29, 2017 Share Posted March 29, 2017 Solution for this problem open in /src/PrestaShopBundle/Controller/Admin/ProductController.php $attributeGroups = $this ->getDoctrine() ->getManager() ->getRepository('PrestaShopBundle:Attribute') ->findByLangAndShop(1, 1); set in FindByLangAndShop(you language id, you shop id) 3 2 Link to comment Share on other sites More sharing options...
PeterVajda Posted April 2, 2017 Author Share Posted April 2, 2017 Thank you, that solved my problem. Link to comment Share on other sites More sharing options...
Jorge Aramuni Posted July 23, 2017 Share Posted July 23, 2017 Solution for this problem open in /src/PrestaShopBundle/Controller/Admin/ProductController.php $attributeGroups = $this ->getDoctrine() ->getManager() ->getRepository('PrestaShopBundle:Attribute') ->findByLangAndShop(1, 1); set in FindByLangAndShop(you language id, you shop id) Excelent!! Link to comment Share on other sites More sharing options...
AlbertoPyme Posted October 2, 2017 Share Posted October 2, 2017 Solution for this problem open in /src/PrestaShopBundle/Controller/Admin/ProductController.php $attributeGroups = $this ->getDoctrine() ->getManager() ->getRepository('PrestaShopBundle:Attribute') ->findByLangAndShop(1, 1); set in FindByLangAndShop(you language id, you shop id) Sir, you are my hero, problem solved Link to comment Share on other sites More sharing options...
homeuk Posted November 7, 2017 Share Posted November 7, 2017 This works for me but I have to do it every time there is a minor update performed. Is there any way to stop this happening? Link to comment Share on other sites More sharing options...
Jorge Aramuni Posted November 7, 2017 Share Posted November 7, 2017 13 hours ago, homeuk said: This works for me but I have to do it every time there is a minor update performed. Is there any way to stop this happening? In this last line FindByLangAndShop (1, 1); edit the first number of the parentheses, changing to the default language ID. To find out what the default language ID is, go to the INTERNATIONAL - LOCATION - LANGUAGES menu, and to the left of the default language flag you can see the ID column. In my case, the default language ID for English is 2. So I changed the line to the following:-> findByLangAndShop (2, 1); Link to comment Share on other sites More sharing options...
homeuk Posted December 6, 2017 Share Posted December 6, 2017 Hi Jorge, Yes that works for me but as soon as there is a minor update I have to do it again. Is there a way to stop it being affected with every update? Thanks, Maff Link to comment Share on other sites More sharing options...
Tribble Posted January 30, 2018 Share Posted January 30, 2018 Thanks for this. I deleted a language and my attributes have stopped working, so I'm hopeful I can fix it now! Thankful for a partner who knows how to do code Link to comment Share on other sites More sharing options...
stuffedhippo Posted May 2, 2018 Share Posted May 2, 2018 Have things changed in 1.7.2.4 as I can not find that file or that line of code? Any help, please. Thanks Link to comment Share on other sites More sharing options...
Tribble Posted May 24, 2018 Share Posted May 24, 2018 StuffedHippo, Where are you looking? I'm pretty sure mine is up to date and I just did the fix on mine, Link to comment Share on other sites More sharing options...
amieetcopain Posted January 29, 2019 Share Posted January 29, 2019 Hi, May I seek for your help that I can't edit the products when I have multistore condition of 1.7.2.1 the log messages: Matched route "admin_product_form".Context: { "route_parameters": {"_controller": "PrestaShopBundle\\Controller\\Admin\\ProductController::formAction", "_legacy_controller": "AdminProducts", "_legacy_param_mapper_class": "PrestaShop\\PrestaShop\\Adapter\\Product\\AdminProductDataProvider", "_legacy_param_mapper_method": "mapLegacyParametersProductForm", "id": "2416", "_route": "admin_product_form" },"request_uri": "https://amieetcopain.com/kids/index.php/product/form/2416?_token=XWVBiLwteZtIH3HubBbingZ8rUthNfeZGZ3U783OfyY" } Hope that you could help. Thank you Link to comment Share on other sites More sharing options...
amieetcopain Posted January 29, 2019 Share Posted January 29, 2019 On 3/30/2017 at 2:41 AM, cherepaxa said: Solution for this problem open in /src/PrestaShopBundle/Controller/Admin/ProductController.php $attributeGroups = $this ->getDoctrine() ->getManager() ->getRepository('PrestaShopBundle:Attribute') ->findByLangAndShop(1, 1); set in FindByLangAndShop(you language id, you shop id) Sorry I cam't find "findByLangAndShop" in my php file, may I know how to find it? Thank you Link to comment Share on other sites More sharing options...
ican Posted February 1, 2019 Share Posted February 1, 2019 On 1/29/2019 at 3:38 PM, amieetcopain said: Sorry I cam't find "findByLangAndShop" in my php file, may I know how to find it? Thank you Are you using which version of prestashop? You can find it in prestashop version 1.7.5 at approx line 612 $doctrine = $this->getDoctrine()->getManager(); $attributeGroups = $doctrine->getRepository('PrestaShopBundle:Attribute')->findByLangAndShop(1, 1); $doctrine = $this->getDoctrine()->getManager(); $attributeGroups = $doctrine->getRepository('PrestaShopBundle:Attribute')->findByLangAndShop(1, 1); Just replace it with $doctrine = $this->getDoctrine()->getManager(); $attributeGroups = $doctrine->getRepository('PrestaShopBundle:Attribute')->findByLangAndShop(you language id, you shop id); I hope it will be helpful for you. Link to comment Share on other sites More sharing options...
amieetcopain Posted February 1, 2019 Share Posted February 1, 2019 1 hour ago, ican said: Are you using which version of prestashop? You can find it in prestashop version 1.7.5 at approx line 612 $doctrine = $this->getDoctrine()->getManager(); $attributeGroups = $doctrine->getRepository('PrestaShopBundle:Attribute')->findByLangAndShop(1, 1); $doctrine = $this->getDoctrine()->getManager(); $attributeGroups = $doctrine->getRepository('PrestaShopBundle:Attribute')->findByLangAndShop(1, 1); Just replace it with $doctrine = $this->getDoctrine()->getManager(); $attributeGroups = $doctrine->getRepository('PrestaShopBundle:Attribute')->findByLangAndShop(you language id, you shop id); I hope it will be helpful for you. Thanks for your reply. I'm using prestashop 1.7.2.1 Now, I can login the admin panel and can update the products, but I can't edit the configure of modules..... Link to comment Share on other sites More sharing options...
ican Posted February 1, 2019 Share Posted February 1, 2019 40 minutes ago, amieetcopain said: Thanks for your reply. I'm using prestashop 1.7.2.1 Now, I can login the admin panel and can update the products, but I can't edit the configure of modules..... What's the exact issue with configure of modules? Link to comment Share on other sites More sharing options...
amieetcopain Posted February 1, 2019 Share Posted February 1, 2019 14 minutes ago, ican said: What's the exact issue with configure of modules? When I plan to edit the configure like smartsupp, it shows "This functionality has been disabled." Others modules have the same problem.....do you know how to solve it? Thanks Link to comment Share on other sites More sharing options...
amieetcopain Posted February 1, 2019 Share Posted February 1, 2019 also, the message shows "Notice on line 722 in file /var/www/vhosts/amieetcopain.com/httpdocs/controllers/admin/AdminModulesController.php[8] Use of undefined constant _PS_MODE_DEMO_ - assumed '_PS_MODE_DEMO_'" Link to comment Share on other sites More sharing options...
fazfaz Posted February 4, 2019 Share Posted February 4, 2019 (edited) On 3/29/2017 at 8:41 PM, cherepaxa said: Solution for this problem open in /src/PrestaShopBundle/Controller/Admin/ProductController.php $attributeGroups = $this ->getDoctrine() ->getManager() ->getRepository('PrestaShopBundle:Attribute') ->findByLangAndShop(1, 1); set in FindByLangAndShop(you language id, you shop id) Thank you So much! This solution resolved my problem Edited February 4, 2019 by fazfaz (see edit history) Link to comment Share on other sites More sharing options...
Stejsi Posted May 3, 2019 Share Posted May 3, 2019 Problem persist in PS 1.7.5.1 Link to comment Share on other sites More sharing options...
dashmir Posted May 10, 2019 Share Posted May 10, 2019 Hello in my PHP File is that correct: $attributeGroups = $this ->getDoctrine() ->getManager() ->getRepository('PrestaShopBundle:Attribute') ->findByLangAndShop(1, 1); the language ID is 1: i can't not see the variants / combination on the right side: my PrestaShop-Version is 1.7.3.0. Is not possible to update, I have purchased modules that run on this version. i hope somebody has any idea to solve this problem. Link to comment Share on other sites More sharing options...
Dan1 Posted July 27, 2019 Share Posted July 27, 2019 Any solution for this in 1.7.6? Link to comment Share on other sites More sharing options...
Tribble Posted July 27, 2019 Share Posted July 27, 2019 5 hours ago, Dan1 said: Any solution for this in 1.7.6? I'm on 1.7.5.2 but I can't see it making much difference - the above fix where you edit that line of code worked for me two weeks ago. Just need to keep editing it every time it upgrades which is a pain but easy once you've done it a few times Link to comment Share on other sites More sharing options...
Dan1 Posted July 27, 2019 Share Posted July 27, 2019 This line of code is significantly different in 1.7.6 Link to comment Share on other sites More sharing options...
Tribble Posted July 28, 2019 Share Posted July 28, 2019 22 hours ago, Dan1 said: This line of code is significantly different in 1.7.6 Ugh *goes to disable updates until the answer is found!* Link to comment Share on other sites More sharing options...
Mounowicz Posted August 3, 2020 Share Posted August 3, 2020 I had exactly the same problem and no luck with 1.7.6. The problem still persisted. I found out that the problem is in ps_currency_lang and this solution worked for me: https://github.com/PrestaShop/PrestaShop/issues/15946#issuecomment-559557259 Link to comment Share on other sites More sharing options...
MiO Vapor Posted August 3, 2020 Share Posted August 3, 2020 I had exactly the same problem and no luck with 1.7.6. The problem still persisted. I found out that the problem is in ps_currency_lang and this solution worked for me:Click Here Link to comment Share on other sites More sharing options...
fredecs Posted September 18, 2021 Share Posted September 18, 2021 (edited) I had the same problem and have solved by changing my id_shop in AttributeRepository.php. When I installed my theme, it created one id_shop to each theme variation, and i have chosen the id_shop 6 to production. My ps_shop table has just one entry, with id_shop = 6. When i debug the ProductController.php, i saw that $id_shop var was always null, and the function findByLangAndShop() was returning nothing. So, I edited the function in the file /src/PrestaShopBundle/Entity/Repository/AttributeRepository.php I Changed: ->setParameters([ 'idShop' => $idShop, 'idLang' => $idLang, ]); to: ->setParameters([ 'idShop' => 6, 'idLang' => $idLang, ]); I think this is a bug in core prestashop files. Edited September 18, 2021 by fredecs (see edit history) Link to comment Share on other sites More sharing options...
cunni Posted June 6 Share Posted June 6 Sorry to revieve an old thread, but Prestashop V8 is also having this issue. I can't see attributes when only one language exists. Has anyone managed to fix this on the lastest version? 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