Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to active DataDefinitions after Pimcore update to 11.x #410

Closed
Hbitvof opened this issue Feb 28, 2024 · 11 comments
Closed

Unable to active DataDefinitions after Pimcore update to 11.x #410

Hbitvof opened this issue Feb 28, 2024 · 11 comments

Comments

@Hbitvof
Copy link

Hbitvof commented Feb 28, 2024

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 Hbitvof changed the title Unable to active after Pimcore update to 11.x Unable to active DataDefinitions after Pimcore update to 11.x Feb 28, 2024
@aarongerig
Copy link
Member

@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
Copy link
Author

Hbitvof commented Feb 28, 2024

@Hbitvof Make sure to require "instride/data-definitions": "^5.0" and add Instride\Bundle\DataDefinitionsBundle\DataDefinitionsBundle::class => ['all' => true], to your bundles.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?

@aarongerig
Copy link
Member

@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
Copy link
Author

Hbitvof commented Feb 28, 2024

@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?

@Hbitvof
Copy link
Author

Hbitvof commented Feb 28, 2024

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

@aarongerig
Copy link
Member

@Hbitvof Are there any files under public/bundles/datadefinitions? Or do you receive any errors in your JS console?

@Hbitvof
Copy link
Author

Hbitvof commented Feb 28, 2024

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

What can cause this issue?

@Hbitvof
Copy link
Author

Hbitvof commented Mar 3, 2024

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.

@Hbitvof
Copy link
Author

Hbitvof commented Mar 5, 2024

I will start a new issue specific for the migration/save part.

@Hbitvof Hbitvof closed this as completed Mar 5, 2024
@KEBAP5000
Copy link

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

@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')

@fmcsecurity
Copy link

Exact same situation as above with v11.2.3 (clean install, not upgraded). Stuck at missing add buttons for import/export definitions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants