Unable to active DataDefinitions after Pimcore update to 11.x
Closed this issue · 11 comments
We are in the process of updating Pimcore from version 10.6 to 11.x. Everything is working so far but we are not able to active DataDefinitions (we use is in 10.x and below).
After adding Instride\DataDefinitionsBundle\DataDefinitionsBundle::class => ['all' => true], to bundles.php we get the following error when running bin/console pimcore:bundle:install DataDefinitionsBundle
:
PHP Fatal error: Uncaught Error: Class "Instride\DataDefinitionsBundle\DataDefinitionsBundle" not found in /var/www/html/pimcore/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php:136
Stack trace:
#0 /var/www/html/pimcore/vendor/pimcore/pimcore/lib/Kernel.php(188): Pimcore\Kernel->microKernelRegisterBundles()
#1 /var/www/html/pimcore/vendor/symfony/http-kernel/Kernel.php(346): Pimcore\Kernel->registerBundles()
#2 /var/www/html/pimcore/vendor/symfony/http-kernel/Kernel.php(762): Symfony\Component\HttpKernel\Kernel->initializeBundles()
#3 /var/www/html/pimcore/vendor/symfony/http-kernel/Kernel.php(126): Symfony\Component\HttpKernel\Kernel->preBoot()
#4 /var/www/html/pimcore/vendor/pimcore/pimcore/lib/Kernel.php(140): Symfony\Component\HttpKernel\Kernel->boot()
#5 /var/www/html/pimcore/vendor/pimcore/pimcore/lib/Bootstrap.php(215): Pimcore\Kernel->boot()
#6 /var/www/html/pimcore/vendor/pimcore/pimcore/lib/Bootstrap.php(60): Pimcore\Bootstrap::kernel()
#7 /var/www/html/pimcore/bin/console(47): Pimcore\Bootstrap::startupCli()
#8 {main}
thrown in /var/www/html/pimcore/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php on line 136
Is this a known issue or is there something wrong in our config? We are able to active other bundles like Web2print.
@Hbitvof Make sure to require "instride/data-definitions": "^5.0"
and add Instride\Bundle\DataDefinitionsBundle\DataDefinitionsBundle::class => ['all' => true],
to your bundles.php
file.
@Hbitvof Make sure to require
"instride/data-definitions": "^5.0"
and addInstride\Bundle\DataDefinitionsBundle\DataDefinitionsBundle::class => ['all' => true],
to yourbundles.php
file.
I have the require in my composer.json, this part is working. I see you give another path than the installation instruction gives. I get another error now:
13:17:08 CRITICAL [console] Error thrown while running command "pimcore:bundle:install DataDefinitionsBundle". Message: "You have requested a non-existent service "Instride\Bundle\DataDefinitionsBundle\Installer"." ["exception" => Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException^ { …},"command" => "pimcore:bundle:install DataDefinitionsBundle","message" => "You have requested a non-existent service "Instride\Bundle\DataDefinitionsBundle\Installer"."]
In Container.php line 263:
You have requested a non-existent service "Instride\Bundle\DataDefinitionsBundle\Installer".
Is there still something wrong with the path you provide?
@Hbitvof That's weird, seems there's something off in your installation. As you can see here, the service Installer should be registered. Have you tried clearing cache or re-installing DataDefinitions?
PS: I am using DataDefinitions successfully in production with Pimcore 11, so there shouldn't be any issue with the bundle itself.
@Hbitvof That's weird, seems there's something off in your installation. As you can see here, the service Installer should be registered. Have you tried clearing cache or re-installing DataDefinitions?
PS: I am using DataDefinitions successfully in production with Pimcore 11, so there shouldn't be any issue with the bundle itself.
I cleared cache and did a re-install of DataDefinitions. What things can I check more to get this working? Do you have clue what this can be in my config?
I solved the last error, now I am able to execute bin/console pimcore:bundle:install DataDefinitionsBundle. The bundle is installed:
+------------------------------------+---------+-----------+-------------+---------------+----------+
| Bundle | Enabled | Installed | Installable | Uninstallable | Priority |
+------------------------------------+---------+-----------+-------------+---------------+----------+
| DataDefinitionsBundle | ✔ | ✔ | ❌ | ✔ | 0
I cleared cache and refreshed Pimcore, but I still don't have the Import Definitions or Export Definitions under settings:
![image](https://private-user-images.githubusercontent.com/41229269/308618095-497a52cd-1870-4258-b158-b90ba62fa6f6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ2MDY0MTAsIm5iZiI6MTcyNDYwNjExMCwicGF0aCI6Ii80MTIyOTI2OS8zMDg2MTgwOTUtNDk3YTUyY2QtMTg3MC00MjU4LWIxNTgtYjkwYmE2MmZhNmY2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI1VDE3MTUxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA1NmJjZTYyOWU5MTljMjBmNDVjNjJmMDUwYWNhZjgyNGNhYWQ1OGQ3YWEyMGE4Mzc4YmU0NDZmMDZkMmI1YTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0._Hr6D3eu_1X3Wz3N8E4CtC-v6cc-Y5aixrEGK0W7NDo)
@Hbitvof Are there any files under public/bundles/datadefinitions
? Or do you receive any errors in your JS console?
For some strange reason the icons appeared after installing some other bundles like the ProcessManager Bundle (https://github.com/dpfaffenbauer/ProcessManager), same original builder as DataDefinitions).
The next issue I have is I can't add anything. The Add button is not responding and all my current import- and export configurations are missing:
![image](https://private-user-images.githubusercontent.com/41229269/308674120-749f033c-53c1-4169-b8bc-bdb13222fa28.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ2MDY0MTAsIm5iZiI6MTcyNDYwNjExMCwicGF0aCI6Ii80MTIyOTI2OS8zMDg2NzQxMjAtNzQ5ZjAzM2MtNTNjMS00MTY5LWI4YmMtYmRiMTMyMjJmYTI4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI1VDE3MTUxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFiM2JjODg4MDdiNTRlNzdkYjYyOTEzOTBmYWZjZTA4MWY2MDYwNDZjODQ2NTMwZDlmNjEyMzNjNTM1YThlMjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.MfsyYuhgU4355ka-E491v6KyyKhqubN7oyEfriDNedY)
What can cause this issue?
It seems I am not the only one who has this issue, see #400
Please let me know what to do to get this working when upgrading from 10.x.
I will start a new issue specific for the migration/save part.
I solved the last error, now I am able to execute bin/console pimcore:bundle:install DataDefinitionsBundle. The bundle is installed:
+------------------------------------+---------+-----------+-------------+---------------+----------+ | Bundle | Enabled | Installed | Installable | Uninstallable | Priority | +------------------------------------+---------+-----------+-------------+---------------+----------+ | DataDefinitionsBundle | ✔ | ✔ | ❌ | ✔ | 0
I cleared cache and refreshed Pimcore, but I still don't have the Import Definitions or Export Definitions under settings:
![]()
@aarongerig I have the same problem. I have completed all the steps in the installation guide. Additionally, files are present in the directory public/bundles/datadefinitions
.
My JS console output:
file .../vendor/coreshop/resource-bundle/Resources/public/pimcore/js/resource.js
at line 31:
Uncaught TypeError: Cannot read properties of undefined (reading 'menu')
at klass.initialize
at new klass
at klass.fireEvent
at klass.fire
at klass.pimcoreReady
at HTMLDocument.
at Object.onReady
at Object.initPanel
at klass.
file .../public/bundles/coreshopresource/pimcore/js/selector/object.js
at line 14:
Uncaught TypeError: Cannot read properties of undefined (reading 'search')
Exact same situation as above with v11.2.3 (clean install, not upgraded). Stuck at missing add buttons for import/export definitions.