magento / magento-cloud-docker

All Submissions you make to Magento Inc. (“Magento") through GitHub are subject to the following terms and conditions: (1) You grant Magento a perpetual, worldwide, non-exclusive, no charge, royalty free, irrevocable license under your applicable copyrights and patents to reproduce, prepare derivative works of, display, publically perform, sublicense and distribute any feedback, ideas, code, or other information (“Submission") you submit through GitHub. (2) Your Submission is an original work of authorship and you are the owner or are legally entitled to grant the license stated above. (3) You agree to the Contributor License Agreement found here: https://github.com/magento/magento2/blob/master/CONTRIBUTOR_LICENSE_AGREEMENT.html
Open Software License 3.0
256 stars 191 forks source link

Call to undefined method Magento\Eav\Api\Data\AttributeExtension::setIsPagebuilderEnabled while deploying Magento 2.4.5 #359

Open a-caruso opened 1 year ago

a-caruso commented 1 year ago

Failing to deploy Adobe Commerce in the Docker container. It's the step 6 in this documentation. The fix is already available here

Preconditions

  1. using Windows 10 with WSL2 updated

Steps to reproduce

From WSL

  1. git clone https://github.com/magento/magento-cloud.git
  2. curl -sL https://github.com/magento/magento-cloud-docker/releases/download/1.3.4/init-docker.sh | bash -s -- --php 8.1 --image 1.3.5 --host magento2.docker
  3. ./vendor/bin/ece-docker build:compose --mode="developer" --sync-engine="manual-native" --port=9080
  4. docker compose up -d
  5. ./bin/magento-docker copy-to --all
  6. docker compose run --rm deploy cloud-deploy

Expected result

  1. Adobe Commerce is correctly deployed on Docker container

Actual result

This error occur
`Call to undefined method Magento\Eav\Api\Data\AttributeExtension::setIsPagebuilderEnabled()0 /app/vendor/magento/framework/Interception/Interceptor.php(146): Magento\PageBuilder\Plugin\Catalog\Model\Product\Attribute\RepositoryPlug in->afterGet(Object(Magento\Catalog\Model\Product\Attribute\Repository\Interceptor), Object(Magento\Catalog\Model\ResourceModel\Eav\Attribute\Interceptor), 'sku') 1 /app/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Model\Product\Attribute\Repository\Interceptor->Magento\Framework\Interception{closure}('sku') 2 /app/generated/code/Magento/Catalog/Model/Product/Attribute/Repository/Interceptor.php(23): Magento\Catalog\Model\Product\Attribute\Repository\Interceptor->___callPlugins('get', Array, Array) 3 /app/vendor/magento/module-catalog-search/Setup/Patch/Data/SetInitialSearchWeightForAttributes.php(103): Magento\Catalog\Model\Product\Attribute\Repository\Interceptor->get('sku') 4 /app/vendor/magento/module-catalog-search/Setup/Patch/Data/SetInitialSearchWeightForAttributes.php(56): Magento\CatalogSearch\Setup\Patch\Data\SetInitialSearchWeightForAttributes->setWeight('sku', 6) 5 /app/vendor/magento/framework/Setup/Patch/PatchApplier.php(162): Magento\CatalogSearch\Setup\Patch\Data\SetInitialSearchWeightForAttributes->apply() 6 /app/setup/src/Magento/Setup/Model/Installer.php(1095): Magento\Framework\Setup\Patch\PatchApplier->applyDataPatch('Magento_Catalog...') 7 /app/setup/src/Magento/Setup/Model/Installer.php(961): Magento\Setup\Model\Installer->handleDBSchemaData(Object(Magento\Setup\Module\DataSetup), 'data', Array) 8 [internal function]: Magento\Setup\Model\Installer->installDataFixtures(Array) 9 /app/setup/src/Magento/Setup/Model/Installer.php(386): call_user_func_array(Array, Array) 10 /app/setup/src/Magento/Setup/Console/Command/InstallCommand.php(238): Magento\Setup\Model\Installer->install(Array) 11 /app/vendor/symfony/console/Command/Command.php(255): Magento\Setup\Console\Command\InstallCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 12 /app/vendor/symfony/console/Application.php(1021): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 13 /app/vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Setup\Console\Command\InstallCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Compon ent\Console\Output\ConsoleOutput)) 14 /app/vendor/magento/framework/Console/Cli.php(116): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 15 /app/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 16 /app/bin/magento(23): Symfony\Component\Console\Application->run() 17 {main}

Fatal error: Uncaught Exception: User Error: Some transactions have not been committed or rolled back in /app/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line 4067 in /app/vendor/magento/framework/App/ErrorHandler.php:62 Stack trace: 0 [internal function]: Magento\Framework\App\ErrorHandler->handler(256, 'Some transactio...', '/app/vendor/mag...', 4067) 1 /app/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(4067): trigger_error('Some transactio...', 256) 2 [internal function]: Magento\Framework\DB\Adapter\Pdo\Mysql->__destruct() 3 {main} thrown in /app/vendor/magento/framework/App/ErrorHandler.php on line 62`

ranjithvkechidna commented 1 year ago

I am facing the same issue while deploying. I had to copy the Magento\Eav\Api\Data\AttributeExtension file from the generated directory of another project to have the setup complete on my machine.

At first, the issue for me was related to #34566 which still exists for me even on a fresh install. To overcome this I had to temporarily create an env.php file with the 'default' and 'indexer' DB connection details and the next error was the above one. Recently have been seeing too many issues with Magento installations using Docker.