Jump to content

Error mapping : PrestaShopBundle\Entity\Tab


Uppo

Recommended Posts

Hi,

I can't access to the back-office without debug mode.

While I am in this mode, I see that error in symphony :

Quote

 

Entities Mapping

Class : PrestaShopBundle\Entity\Tab

Mapping errors : The association PrestaShopBundle\Entity\Tab#tabLangs refers to the owning side field PrestaShopBundle\Entity\TabLang#tab which does not exist.

 

What does that mean ?

Thank you.

 

Prestashop 1.7.6.7

 

 

Link to comment
Share on other sites

On 9/29/2020 at 7:10 AM, Crezzur said:

Try to enable your debugmode, and which php version are you using?

 

I am already in debug mode.

If I'm not I couldn't connect to the back-office.

 

I'm using PrestaShop 1.7.6.7 in php 7.2.31

Thanks

Link to comment
Share on other sites

  • 2 months later...
  • 3 months later...

I am getting the same error in Prestashop 7.7.6 also. I am currently in debug mode. The problem I am having is with products. They show up perfectly in the front end, in the backend some are missing the title, price, pictures and description. Yet they are perfect on the front end. 

 

I have the above error plus this one: The mappings PrestaShopBundle\Entity\TabLang#id and PrestaShopBundle\Entity\Tab#tabLangs are inconsistent with each other.

Does anyone know what the fix to this is? It might be related to my error. 

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

I have the same issue... 

 

PrestaShopBundle\Entity\Tab

The association PrestaShopBundle\Entity\Tab#tabLangs refers to the owning side field PrestaShopBundle\Entity\TabLang#tab which does not exist.

 

How can we solve this ? 

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

I am getting the same error since yesterday on PS 1.7.7.4 with PHP 7.3, out of the blue:

The association PrestaShopBundle\Entity\Tab#tabLangs refers to the owning side field PrestaShopBundle\Entity\TabLang#tab which does not exist.

Let's get this fixed today. I'll get back to you all...

Link to comment
Share on other sites

4 hours ago, pinwheel said:

There is a fix on github. I had written the fix in another forum a while back. Do a search in github and you should be able to fix this rather easy There was one line of code.

I've been searching for it but I can't find it :( 

Link to comment
Share on other sites

13 hours ago, Crezzur said:

Can you try the following:

Backup your file: PrestaShop/src/PrestaShopBundle/Entity/Tab.php

Replace the Tab.php content with this code: https://raw.githubusercontent.com/aleksiuno/PrestaShop/9c7ee90d97242433bd19a850140a90dbe201a771/src/PrestaShopBundle/Entity/Tab.php

Make sure to clear your cache folder after this. (Preferable manual by clearing all the content inside the Prestashop/var/cache/)

Hello Crezzur,

I just did it but when I put off Debug Mode i'm again unable to connect to my Prestashop admin

 

Link to comment
Share on other sites

2 hours ago, Subran said:

Error 500 when i'm not in debug mode

and in debug mode no errors  except in the translation part it is written 13 in red

I feel lost.. 

That sounds like another error. Have you checked the error logs? You might have a plugin which is causing problems. I had this problem with my prestashop. I had to disable the plugin causing problems. 

Also clear your cache for the cart. 

Link to comment
Share on other sites

On 9/28/2020 at 7:01 AM, Crezzur said:

This error is saying you are calling


PrestaShopBundle\Entity\TabLang#tab

The correct way to call is


PrestaShopBundle\Entity\Tab#tabLangs

I am guessing you are using a module/override file which uses the \src\PrestaShopBundle\tab.php from prestashop and calls TabLang#tab which throws an error because prestashop does not recognize this call.

So how do we modify this file to fix the issue, I am using 1.7.7.4 have found that file with the class in it, but am unsure what to change to make it call it correctly

Link to comment
Share on other sites

6 minutes ago, dragon_sa said:

So how do we modify this file to fix the issue, I am using 1.7.7.4 have found that file with the class in it, but am unsure what to change to make it call it correctly

I have figured it out in  \src\PrestaShopBundle\tab.php around line 112, change

    /**
     * @ORM\OneToMany(targetEntity="PrestaShopBundle\Entity\TabLang", mappedBy="tab")
     */
    private $tabLangs;

to

    /**
     * @ORM\OneToMany(targetEntity="PrestaShopBundle\Entity\TabLang", mappedBy="id")
     */
    private $tabLangs;

it is the value for mappedBy needs to be set to id not tab

Link to comment
Share on other sites

  • 1 month later...

I have tried to follow your advice, by changing mappedBy="tab") to mappedBy="id"), as dragon_sa have suggested and the whole tab-file, as suggested by Crezzur, but it did change anything to my error.

I still have this error:

PrestaShopBundle\Entity\Tab

The association PrestaShopBundle\Entity\Tab#tabLangs refers to the owning side field PrestaShopBundle\Entity\TabLang#tab which does not exist.

I use Prestashop 1.7.7.5

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

  • 3 weeks later...
El 30/05/2021 a las 11:57 PM, Crezzur dijo:

¿Puede probar lo siguiente:

Haga una copia de seguridad de su archivo: PrestaShop/src/PrestaShopBundle/Entidad/Tab.php

Reemplace el contenido de Tab.php con este código: https://raw.githubusercontent.com/aleksiuno/PrestaShop/9c7ee90d97242433bd19a850140a90dbe201a771/src/PrestaShopBundle/Entity/Tab.php

Asegúrese de borrar la carpeta de caché después de esto. (Preferiblemente manual borrando todo el contenido dentro del Prestashop/var/cache/)

Gracias

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...