1

I'm using Mad-IT GitHub Actions to build a magento 2.4.3 store.

When it does the magento install step, I'm getting

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

The action was building successfully. We've since installed and committed a theme, and now get this error, but I can't work out where it's from, or if there's something missing

Full stack trace:

...
Module 'Magento_CatalogSearch':
Enabling caches:
Current status:
layout: 1
block_html: 1
full_page: 1
PHP Fatal error:  Uncaught Exception: User Error: Some transactions have not been committed or rolled back in /github/workspace/magento/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line 4050 in /github/workspace/magento/vendor/magento/framework/App/ErrorHandler.php:61
Stack trace:
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler()
#1 /github/workspace/magento/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(4050): trigger_error()
#2 [internal function]: Magento\Framework\DB\Adapter\Pdo\Mysql->__destruct()
#3 {main}
  thrown in /github/workspace/magento/vendor/magento/framework/App/ErrorHandler.php on line 61
PHP Stack trace:
PHP   1. {main}() /github/workspace/magento/bin/magento:0
Call to undefined method Magento\Eav\Api\Data\AttributeExtension::setIsPagebuilderEnabled()#0 /github/workspace/magento/vendor/magento/framework/Interception/Interceptor.php(146): Magento\PageBuilder\Plugin\Catalog\Model\Product\Attribute\RepositoryPlugin->afterGet()
#1 /github/workspace/magento/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Model\Product\Attribute\Repository\Interceptor->Magento\Framework\Interception\{closure}()
#2 /github/workspace/magento/generated/code/Magento/Catalog/Model/Product/Attribute/Repository/Interceptor.php(23): Magento\Catalog\Model\Product\Attribute\Repository\Interceptor->___callPlugins()
#3 /github/workspace/magento/vendor/magento/module-catalog-search/Setup/Patch/Data/SetInitialSearchWeightForAttributes.php(103): Magento\Catalog\Model\Product\Attribute\Repository\Interceptor->get()
#4 /github/workspace/magento/vendor/magento/module-catalog-search/Setup/Patch/Data/SetInitialSearchWeightForAttributes.php(56): Magento\CatalogSearch\Setup\Patch\Data\SetInitialSearchWeightForAttributes->setWeight()
#5 /github/workspace/magento/vendor/magento/framework/Setup/Patch/PatchApplier.php(162): Magento\CatalogSearch\Setup\Patch\Data\SetInitialSearchWeightForAttributes->apply()
#6 /github/workspace/magento/setup/src/Magento/Setup/Model/Installer.php(1094): Magento\Framework\Setup\Patch\PatchApplier->applyDataPatch()
#7 /github/workspace/magento/setup/src/Magento/Setup/Model/Installer.php(960): Magento\Setup\Model\Installer->handleDBSchemaData()
#8 [internal function]: Magento\Setup\Model\Installer->installDataFixtures()
#9 /github/workspace/magento/setup/src/Magento/Setup/Model/Installer.php(389): call_user_func_array()
#10 /github/workspace/magento/setup/src/Magento/Setup/Console/Command/InstallCommand.php(231): Magento\Setup\Model\Installer->install()
#11 /github/workspace/magento/vendor/symfony/console/Command/Command.php(255): Magento\Setup\Console\Command\InstallCommand->execute()
#12 /github/workspace/magento/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#13 /github/workspace/magento/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#14 /github/workspace/magento/vendor/magento/framework/Console/Cli.php(115): Symfony\Component\Console\Application->doRun()
#15 /github/workspace/magento/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun()
#16 /github/workspace/magento/bin/magento(23): Symfony\Component\Console\Application->run()
#17 {main}
1

2 Answers 2

3

If anyone facing this issue, please have look at this hotfix

diff --git a/vendor/magento/module-page-builder/Plugin/Catalog/Model/Product/Attribute/RepositoryPlugin.php     b/vendor/magento/module-page-builder/Plugin/Catalog/Model/Product/Attribute/RepositoryPlugin.php
index c566c4d5c2a..bb7a7f8b860 100644
--- a/vendor/magento/module-page-builder/Plugin/Catalog/Model/Product/Attribute/RepositoryPlugin.php
+++ b/vendor/magento/module-page-builder/Plugin/Catalog/Model/Product/Attribute/RepositoryPlugin.php
@@ -36,8 +36,9 @@
     \Magento\Catalog\Model\Product\Attribute\Repository $subject,
     \Magento\Catalog\Api\Data\ProductAttributeInterface $attribute
 ) {
-        $isPageBuilderEnabled = $attribute->getData('extension_attributes')
-            ? $attribute->getData('extension_attributes')->getIsPagebuilderEnabled()
+        $extensionAttributes = $attribute->getData('extension_attributes');
+        $isPageBuilderEnabled = $extensionAttributes && method_exists($extensionAttributes, 'getIsPagebuilderEnabled')
+            ? $extensionAttributes->getIsPagebuilderEnabled()
         : 0;
     $attribute->setData('is_pagebuilder_enabled', $isPageBuilderEnabled);
 }
@@ -58,7 +59,10 @@
     $extensionAttribute = $result->getExtensionAttributes()
         ? $result->getExtensionAttributes()
         : $this->extensionAttributesFactory->create();
-        $extensionAttribute->setIsPagebuilderEnabled($isPageBuilderEnabled);
+
+        if (method_exists($extensionAttribute, 'setIsPagebuilderEnabled')) {
+            $extensionAttribute->setIsPagebuilderEnabled($isPageBuilderEnabled);
+        }
     $result->setExtensionAttributes($extensionAttribute);
     return $result;
 }
 

If this patch did not work but command please do it manually

0

The issue here was my config.php was not checked into source control - meaning Github Actions could not find it.

Committing this file to git, made this error go away.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.