magento / magento2-page-builder

Magento2 PageBuilder
Other
79 stars 59 forks source link

Plugin references class that doesn't exist #781

Open Quazz opened 3 years ago

Quazz commented 3 years ago

Preconditions (*)

  1. 2.2.1, Magento 2.4.3 CE

Steps to reproduce (*)

Look at file: https://github.com/magento/magento2-page-builder/blob/develop/app/code/Magento/PageBuilder/Plugin/Catalog/Model/Product/Attribute/RepositoryPlugin.php See the constructor argument (and its reference further down in the same file) This class does not exist in the Community Edition (https://github.com/magento/magento2/tree/2.4.3/app/code/Magento/Eav/Api/Data)

There is no Magento\Eav\Api\Data\AttributeExtension (or its factory)

So when https://github.com/magento/magento2-page-builder/blob/develop/app/code/Magento/PageBuilder/Plugin/Catalog/Model/Product/Attribute/RepositoryPlugin.php#L60 that point gets reached you get the following error:

Call to undefined method Magento\Eav\Api\Data\AttributeExtension::setIsPagebuilderEnabled()

Expected result (*)

  1. No error in system.log and exception.log

Actual result (*)

  1. Errors in system.log and exception.log
m2-assistant[bot] commented 3 years ago

Hi @Quazz. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


manavluhar commented 2 years ago

@magento I am working on this

manavluhar commented 2 years ago

Hi @Quazz, you will be able to locate generated/code/Magento/Eav/Api/Data/AttributeExtensionFactory.php after running php bin/magento setup:di:compile as it AttributeExtensionFactory is generated class.

Also, you will be able to locate generated/code/Magento/Eav/Api/Data/AttributeExtension.php | It's a generated file 😄

@magento, not able to reproduce the issue, this issue can be closed.