cancel
Showing results for 
Search instead for 
Did you mean: 

2,4,6-p8 to 2.4.7-p3 upgrade di compile error ...probably Magento Catalog ... dont know how to move

2,4,6-p8 to 2.4.7-p3 upgrade di compile error ...probably Magento Catalog ... dont know how to move

Hello

Upgrade to 2.46p8 from 2.45p8 went smoothly. Upgrade to 2.47p3 is stalling at the compile stage. Here is the error. There are so many Magento Catalog modules that I dont know where to look or why anything would go bad. Especially since 2.4.6-p8 is working well.

Here is the error at di:compile

Any help much appreciate. Thanks, Sam

/home/m247p3test/public_html/vendor/magento/framework/Interception/Definition/Runtime.php at line: 44
get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, string given#0 /home/m247p3test/public_html/vendor/magento/framework/Interception/Definition/Runtime.php(44): get_class_methods('Magento\\Catalog...')
#1 /home/m247p3test/public_html/setup/src/Magento/Setup/Module/Di/Code/Generator/InterceptionConfigurationBuilder.php(205): Magento\Framework\Interception\Definition\Runtime->getMethodList('Magento\\Catalog...')
#2 /home/m247p3test/public_html/setup/src/Magento/Setup/Module/Di/Code/Generator/InterceptionConfigurationBuilder.php(96): Magento\Setup\Module\Di\Code\Generator\InterceptionConfigurationBuilder->getInterceptedMethods(Array)
#3 /home/m247p3test/public_html/setup/src/Magento/Setup/Module/Di/App/Task/Operation/Interception.php(99): Magento\Setup\Module\Di\Code\Generator\InterceptionConfigurationBuilder->getInterceptionConfiguration(Array)
#4 /home/m247p3test/public_html/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php(56): Magento\Setup\Module\Di\App\Task\Operation\Interception->doOperation()
#5 /home/m247p3test/public_html/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php(216): Magento\Setup\Module\Di\App\Task\Manager->process(Object(Closure), Object(Closure))
#6 /home/m247p3test/public_html/vendor/symfony/console/Command/Command.php(326): Magento\Setup\Console\Command\DiCompileCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /home/m247p3test/public_html/vendor/symfony/console/Application.php(1078): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /home/m247p3test/public_html/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Setup\Console\Command\DiCompileCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /home/m247p3test/public_html/vendor/magento/framework/Console/Cli.php(118): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /home/m247p3test/public_html/vendor/symfony/console/Application.php(175): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /home/m247p3test/public_html/bin/magento(23): Symfony\Component\Console\Application->run()
#12 {main}

6 REPLIES 6

Re: 2,4,6-p8 to 2.4.7-p3 upgrade di compile error ...probably Magento Catalog ... dont know how to m

Hello all,

An interesting update. (Please understand that I am not a developer in php. I wrote code in assembler, c, lisp etc many many years ago so I can undertand the code but that is about it,.)

 

If I turn on DEVELOPER Mode - everythig works. Just cannot di:compile - it dies with errors above. I thought it might be Mod Security - but it was not.

Please accept my thanks in advance for reading and thinking about this (if you do).

Best,

Sam

 

 

Re: 2,4,6-p8 to 2.4.7-p3 upgrade di compile error ...probably Magento Catalog ... dont know how to m

Hello @samreg 

 

The error you’re encountering during di:compile in Magento 2 indicates an issue with the dependency injection configuration.

Identify the Culprit:

The problem is often due to a custom or third-party module with an incorrectly declared preference, plugin, or virtual type in di.xml.

 

Check di.xml Files:

Common issues include:

Missing class names in <preference>, <type>, or <plugin> definitions.

Non-existent class names in type="..." attributes.

 

Debug the Error:

Open vendor/magento/framework/Interception/Definition/Runtime.php at line 44 and check the value of the $className variable being passed to get_class_methods().

 

Add debugging lines (e.g., var_dump($className) or error_log) to identify what class name or string is being processed.

 

Fix Class Names:

If the error is due to a typo in a class name, fix it.

Ensure all referenced classes in di.xml exist and are autoloadable.

 

 

 

​Hope it helps ! 

If you find our reply helpful, please give us kudos.

 

A Leading Magento Development Agency That Delivers Powerful Results, Innovation, and Secure Digital Transformation.

 

WebDesk Solution Support Team

Get a Free Quote | | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789

 

 

Thank You,


WebDesk Solution Support Team
Get a Free Quote | Email | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789


Location: 150 King St. W. Toronto, ON M5H 1J9

Re: 2,4,6-p8 to 2.4.7-p3 upgrade di compile error ...probably Magento Catalog ... dont know how to m

Hello

Thanks very much for your suggestion.

I did put in a print statement in runtime.php (line 44 var_dump($type) ; ) and the output is inconclusive (at least for me).

Here is what I see - the top section is the last of the printout and below that is the error.

 

What I am going to do is redo the upgrade from the 246p8 level and see if I made some mistake along the way.

Sam

 

string(45) "Magento\Theme\Model\Theme\Plugin\Registration"
string(76) "Mirasvit\Core\Plugin\Backend\Framework\App\FrontController\CronCheckerPlugin"
string(47) "Magento\Backend\App\Action\Plugin\MassactionKey"
string(32) "Bss\AdminActionLog\Plugin\Action"
string(48) "Magento\Backend\App\Action\Plugin\Authentication"
string(50) "Magento\Backend\App\Action\Plugin\LoadDesignPlugin"
string(68) "Magento\CatalogImportExport\Model\Indexer\Product\Flat\Plugin\Import"
string(67) "Magento\CatalogImportExport\Model\Indexer\Product\Eav\Plugin\Import"
string(61) "Magento\CatalogImportExport\Model\Indexer\Stock\Plugin\Import"

 

There is an error in /home/test3/public_html/vendor/magento/framework/Interception/Definition/Runtime.php at line: 45
get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, string given#0 /home/test3/public_html/vendor/magento/framework/Interception/Definition/Runtime.php(45): get_class_methods('Magento\\Catalog...')
#1 /home/test3/public_html/setup/src/Magento/Setup/Module/Di/Code/Generator/InterceptionConfigurationBuilder.php(205): Magento\Framework\Interception\Definition\Runtime->getMethodList('Magento\\Catalog...')
#2 /home/test3/public_html/setup/src/Magento/Setup/Module/Di/Code/Generator/InterceptionConfigurationBuilder.php(96): Magento\Setup\Module\Di\Code\Generator\InterceptionConfigurationBuilder->getInterceptedMethods(Array)
#3 /home/test3/public_html/setup/src/Magento/Setup/Module/Di/App/Task/Operation/Interception.php(99): Magento\Setup\Module\Di\Code\Generator\InterceptionConfigurationBuilder->getInterceptionConfiguration(Array)
#4 /home/test3/public_html/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php(56): Magento\Setup\Module\Di\App\Task\Operation\Interception->doOperation()
#5 /home/test3/public_html/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php(216): Magento\Setup\Module\Di\App\Task\Manager->process(Object(Closure), Object(Closure))
#6 /home/test3/public_html/vendor/symfony/console/Command/Command.php(326): Magento\Setup\Console\Command\DiCompileCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /home/test3/public_html/vendor/symfony/console/Application.php(1078): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /home/test3/public_html/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Setup\Console\Command\DiCompileCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /home/test3/public_html/vendor/magento/framework/Console/Cli.php(118): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /home/test3/public_html/vendor/symfony/console/Application.php(175): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /home/test3/public_html/bin/magento(23): Symfony\Component\Console\Application->run()
#12 {main}

Re: 2,4,6-p8 to 2.4.7-p3 upgrade di compile error ...probably Magento Catalog ... dont know how to m

I am beginning to think that 2.4.7 is just a bad release at this time and needs more time to mature. I saw some js issues, and I cannot get the admin to accept my username and password (keeps putting up captcha).

 

I have turned off most of the extensions and nothing has changed.

 

I looked all over stack exhcange etc. to see if anyone had words of wisdom - but nothing has worked so far. 

2.4.6p8 seems to work.

 

Thanks 

Sam

Re: 2,4,6-p8 to 2.4.7-p3 upgrade di compile error ...probably Magento Catalog ... dont know how to m

have you tried removing/renaming the vendor folder and running composer install again? It should fix the problem as its most likely related to the require-dev dependencies being not installed correctly.

 

Thanks

Re: 2,4,6-p8 to 2.4.7-p3 upgrade di compile error ...probably Magento Catalog ... dont know how to m

I have a lot of new information.

A consultant who is much more clever than I am suggested that the issue could be the Magento catalog import export module. For some reason the one that is downloaded by composer when updating may not be a good copy.

Anyway - we downloaded the 2.4.7p3 software from git, and then found the magento catalog import export module under app. I repalced theone that we had in vendor magento with this module. And magically the error went away. So we no longer have the error which says something about runtime.php line 44.

I can compile and even deploy.

 

Now weare on to the next Zend problem.

Front end works.

If I try to log in to admin it cycles for ever and teh server load goes very high (like seriously high) with Mariadb taking up most of the cpu. I think I narrowed it down to one extension that creates an order grid using several joins. It uses 

 

array('sku' => new \Zend_Db_Expr('group_concat(DISTINCT `'.$prefix.'sales_order_item`.sku SEPARATOR ", ")'),'name' => new \Zend_Db_Expr('group_concat(DISTINCT `'.$prefix.'sales_order_item`.name SEPARATOR ",\n")'),'product_options' => new \Zend_Db_Expr('group_concat(DISTINCT `'.$prefix.'sales_order_item`.product_options SEPARATOR ",")'),'qty_ordered','qty_invoiced','qty_shipped','qty_canceled','qty_refunded'))->distinct(true);
....

Should I replace the new\Zend_Db_Expr with something else?

What do you think of resurrecting the laminas frmaework?

In summary - making progress - but there are many issues.

Thanks very much.

Sam