Jump to content
PeterVajda

PS 1.7.0.6 product attributes not showing in admin product page

Recommended Posts

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!

 

post-724321-0-53453800-1489939588_thumb.png

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

I have the same problem but i dont remember to have any language deleted.

 

Did you solve it somehow?

Share this post


Link to post
Share on other sites

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)
  • Like 3
  • Thanks 2

Share this post


Link to post
Share on other sites

 

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

Share this post


Link to post
Share on other sites

 

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites
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);

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 :D

Share this post


Link to post
Share on other sites

Have things changed in 1.7.2.4 as I can not find that file or that line of code?

Any help, please.

Thanks

Share this post


Link to post
Share on other sites

StuffedHippo,

Where are you looking? I'm pretty sure mine is up to date and I just did the fix on mine,

 

Share this post


Link to post
Share on other sites

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 

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.....

 

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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_'"

Share this post


Link to post
Share on other sites
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 by fazfaz (see edit history)

Share this post


Link to post
Share on other sites

Hello

 

in my PHP File is that correct:

$attributeGroups = $this
            ->getDoctrine()
            ->getManager()
            ->getRepository('PrestaShopBundle:Attribute')
            ->findByLangAndShop(1, 1);

the language ID is 1: 

image.thumb.png.0b22cabf3bb10f2d2cf7e80639c2fea2.png

 

i can't not see the variants / combination on the right side:

image.thumb.png.354d596ccc2247e253621493e7bc67a7.png

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.

 

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

This line of code is significantly different in 1.7.6

Share this post


Link to post
Share on other sites
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!*

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More