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

Error during installation #209

Closed
NiklasBr opened this issue Sep 12, 2024 · 8 comments
Closed

Error during installation #209

NiklasBr opened this issue Sep 12, 2024 · 8 comments
Assignees

Comments

@NiklasBr
Copy link

Platform version 2024.2 (Pimcore 11.3.2.1)

  1. Add this bundle to the bundles.php file:
<?php

return [
    \Pimcore\Bundle\GenericDataIndexBundle\PimcoreGenericDataIndexBundle::class => ['all' => true],
    \Pimcore\Bundle\EcommerceFrameworkBundle\PimcoreEcommerceFrameworkBundle::class => ['all' => true],
    \CustomerManagementFrameworkBundle\PimcoreCustomerManagementFrameworkBundle::class => ['all' => true],
    \Pimcore\Bundle\ApplicationLoggerBundle\PimcoreApplicationLoggerBundle::class => ['all' => true],
    \Pimcore\Bundle\WebToPrintBundle\PimcoreWebToPrintBundle::class => ['all' => true],
    \Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
    \WorkflowBundle\WorkflowBundle::class => ['all' => true],
    \Pimcore\Bundle\EnterpriseSubscriptionToolsBundle\PimcoreEnterpriseSubscriptionToolsBundle::class => ['all' => true],
    \Pimcore\AssetMetadataClassDefinitionsBundle\PimcoreAssetMetadataClassDefinitionsBundle::class => ['all' => true],
    \Pimcore\Bundle\SeoBundle\PimcoreSeoBundle::class => ['all' => true],
    \Pimcore\Bundle\SimpleBackendSearchBundle\PimcoreSimpleBackendSearchBundle::class => ['all' => true],
    \Pimcore\Bundle\ObjectMergerBundle\ObjectMergerBundle::class => ['all' => true],
    \Pimcore\Bundle\TinymceBundle\PimcoreTinymceBundle::class => ['all' => true],
    \Pimcore\Bundle\DataHubBundle\PimcoreDataHubBundle::class => ['all' => true],
    \Pimcore\Bundle\ElasticsearchClientBundle\PimcoreElasticsearchClientBundle::class => ['all' => true],

// ... some bundles hidden for brevity
];
  1. Run composer require pimcore/generic-data-index-bundle

  2. Run bin/console pimcore:bundle:install PimcoreGenericDataIndexBundle

And this results in the following error:


In MappingException.php line 26:

  The class 'SeoBundle\Model\ElementMetaData' was not found in the chain configured namespaces Pimcore\Bundle\GenericDataIndexBundle\Entity


pimcore:bundle:install [-f|--fail-without-error] [--no-post-change-commands] [--no-assets-install] [--no-cache-clear] [--] <bundle>
@mattamon
Copy link
Contributor

Hey @NiklasBr

thank you for rising this issue with us.

We tried to reproduce the error but were not able to.
We installed the demo-enterprise and the public demo and added the GenericDataIndexBundle.
We did not encounter this error.

What we found so far is, that the class SeoBundle\Model\ElementMetaData does not even exist in any Pimcore Repository. The only occurence we could find was the Pimcore\Model\DataObject\Data\ElementMetadata.

Can you please check where this class is coming from?
Maybe there is a namespace import missing somewhere. At least I only encountered these kind of errors when the namespaces were not correct.

@NiklasBr
Copy link
Author

Thanks for the quick response!

I have been testing this further and think it is some incompatibility with dachcom-digital/pimcore-seo which we have been using for a while:

a. Running this PimcoreGenericDataIndexBundle and the SeoBundle at the same time causes the exception to be thrown.
b. Running only SeoBundle has no issue.
c. Running only PimcoreGenericDataIndexBundle seems to work.

@mattamon
Copy link
Contributor

I guess maybe you should open up an issue at dachcom-digital/pimcore-seo

Maybe they can provide a fix or if it is not fixable at their codebase, we can come back to this issue?

WDYT?

@NiklasBr
Copy link
Author

Maybe @solverat has an idea?

@solverat
Copy link

@NiklasBr, @mattamon yes, it's because this bundle introduces a dedicated entity manager (I don't know why, though. I'm pretty sure this bundle doesn't need a custom entity manager).

doctrine:
orm:
entity_managers:
pimcore_generic_data_index:
connection: default
mappings:
PimcoreGenericDataIndexBundle:
type: attribute
is_bundle: true
dir: "src/Entity"
prefix: Pimcore\Bundle\GenericDataIndexBundle\Entity
alias: PimcoreGenericDataIndex

However, to fix this, you have to define the default entity manager explicitly:

# app/config/config.yaml
doctrine:
    orm:
        default_entity_manager: default

@mattamon
Copy link
Contributor

mattamon commented Sep 12, 2024

@solverat thanks for the quick response!

@markus-moser I think you have to tackle this question please.

@NiklasBr #164 There is already an issue, it also breaks CoreShop. Guess we can close this issue then since its actually a duplicate, right?

@NiklasBr
Copy link
Author

Thanks a lot @solverat!

@mattamon I think so.

@mattamon
Copy link
Contributor

Duplicate of #164

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

No branches or pull requests

4 participants