Jump to content

Undefined property: Product::$mpn when upgrading from 1.7.6.1 to 1.7.7.3


Recommended Posts

When updating from 1.7.6.1 to 1.7.6.9 everything works fine, but as soon as I try updating to 1.7.7.x I always get an error in the admin product panel saying 

Undefined property: Product::$mpn

I don't know if it may be related but when updating with the 1-click-update addon, I get this message at the end of the update :

[OK] SQL 1.7.7.2 INSERT INTO `ps_hook_alias` (`name`, `alias`) VALUES\n ('displayAdminGridTableBefore', 'displayAdminListBefore'),\n ('displayAdminGridTableAfter', 'displayAdminListAfter')<\/div>",
  "Database upgrade OK"],
  "nextErrors":
  ["[INTERNAL] \/var\/www\/clients\/MBC\/prestashop\/classes\/shop\/ShopUrl.php line 0 - Cannot declare class ShopUrlCore, because the name is already in use",
  "[INTERNAL] \/var\/www\/clients\/MBC\/prestashop\/classes\/shop\/ShopUrl.php line 0 - Symfony\\Component\\Debug\\Exception\\FatalErrorException: Compile Error: Cannot declare class ShopUrlCore, because the name is already in use\n#0 {main}"],
  "error":true,
  "next":"error"}"

Thank for any help !

screenshot.jpg

Link to comment
Share on other sites

  • 2 weeks later...

Mpn is a new field that has been added with version 1.7.7. It is in quite a few tables.

It looks like your upgrade failed to run the script that added the fields and made other changes with the upgrade. 

Try installing a fresh copy of the PS 1.7.7 version that you upgraded to. Then export (with phpmyadmin) from both shops the database structure, compare them and make the fixes.

Alternatively you have a look at the changes in /install/upgrade/sql/1.7.7.0.sql

If you still have the 1.7.6 version it might be more effective to find and fix the error there.

Link to comment
Share on other sites

  • 3 months later...

I haver the same issue but never got an error during the update. I checked my overrides and nothing is there too.

Also checked my tables and mpn is there in all required tables.

Uncaught PHP Exception Symfony\Component\Debug\Exception\ContextErrorException: "Notice: Undefined property: Product::$mpn" at /home/xxxx/public_html/src/PrestaShopBundle/Model/Product/AdminModelAdapter.php line 656

 

Upgrading PS is truly a nightmare and should be a debug priority.

Edited by Henrik41 (see edit history)
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...