Prestashop: Attempted to load class "LegacyLayout" from the global namespace.

Created on 9 Dec 2020  路  11Comments  路  Source: PrestaShop/PrestaShop

Describe the bug

Trying to develop module using doctrine, installed demodoctrine module and when i try to edit something, gettin this:

Symfony\Component\Debug\Exception\ ClassNotFoundException in classes/controller/AdminController.php (line 3674) if (!$class_name) { $class_name = $this->className; } /** @var $object ObjectModel */ $object = new $class_name(); if (method_exists($this, 'getValidationRules')) { $definition = $this->getValidationRules(); } else { $definition = ObjectModel::getDefinition($class_name);

A clear and concise description of what went wrong.

On form edit it wants to load LegacyLayout class which doesnt exist in files, which is strange
I tried to change betweeen 7.2 and 7.3 php version, deleted cache few dozen times from files and stuff
Tried to upgrade from 1.6.9 to 1.7.7
Tried fresh install for 1.7.7
Same issue always

Strange thing that on order page its okay, nevertheless it calls same method to render page

Steps to Reproduce

Install demodoctrine module, suggested in prestashop docs and try to add,edit element

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Screenshots

If applicable, add screenshots or screen recordings to help explain your problem.
screenshot 1
screenshot 2

Additional information

What did I miss?

  • PrestaShop version: 1.7.7
  • PHP version: 7.3, 7.2
1.7.7.0 Autoupgrade Bug CO NMI

Most helpful comment

All 11 comments

Hello @nachaliuga

Trying to develop module using doctrine, installed demodoctrine module

Could you please provide the link of the demodoctrine?
And did you change some Core files?

Thanks!

Hello @nachaliuga

Trying to develop module using doctrine, installed demodoctrine module

Could you please provide the link of the demodoctrine?
And did you change some Core files?

Thanks!

Yes but It was unrelated I fixued other issue, which wasnt fixed on module tabs issue, I dont actualy recall which ticket it was, I just changed entity map item, It was strange as I download ps 1.7.7 and issue should be fixed on it, but somehow it was still there, I also got into cache issue or something when queryBuilder kept on calling wrong orderBy, so I removed it in my demo module, im trying to dig into it aswell

Hello @nachaliuga

Could you please mention your PRs here, to see why is not merged yet?

Thanks!

Hello @nachaliuga

Could you please mention your PRs here, to see why is not merged yet?

Thanks!

Im not sure what is PRs sry. But i found the issue, which wasnt fixed on 1.7.7 https://github.com/PrestaShop/PrestaShop/issues/21206

Hello @nachaliuga

Sorry, I misunderstand you I thought said that you create PR that fixed the issue :sweat_smile:
Thanks for finding the other issue!

As mentioned in #21206 this fix will be available with 1.7.8.0 release.
Here's the PR that fixed the problem #21218

So, this bug #21206 is the cause of your issue, is that so?

Thanks!

Hello @nachaliuga

Sorry, I misunderstand you I thought said that you create PR that fixed the issue
Thanks for finding the other issue!

As mentioned in #21206 this fix will be available with 1.7.8.0 release.
Here's the PR that fixed the problem #21218

So, this bug #21206 is the cause of your issue, is that so?

Thanks!

No :) Atleast i dont think so,you asked if I changed core files, I changed that one :) Im still not sure whats wrong, didint have time to dig deeper

Same error here.

Hello @beve

is your problem similar to this one #21206?

Thanks!

Hi @hibatallahAouadni,

As @nachaliuga mentioned, it's a different problem.

Hello @nachaliuga

you asked if I changed core files, I changed that one :) Im still not sure whats wrong, didint have time to dig deeper

Well, as you know, you're not allowed to change Core files unless by overriding it.
Do you have any new details about this issue?
@beve could you please provide more details to reproduce the issue.
We need your help :wink: cause I couldn't reproduce the issue.
Please give me clear and consistent steps to reproduce the issue.

thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Fabuloops picture Fabuloops  路  3Comments

Van-peterson picture Van-peterson  路  3Comments

marionf picture marionf  路  3Comments

centoasa picture centoasa  路  3Comments

sandra2n picture sandra2n  路  3Comments