BrandOriented / PimcoreCiHubConnector

This bundle adds full integration between Pimcore and CI-HUB Connector. Now you can add, delete and download all assets, lock and unlock, get all versions for specified asset and much more.
https://brandoriented.io/
Other
5 stars 6 forks source link

Missing step in installation instuctions #52

Open NiklasBr opened 1 month ago

NiklasBr commented 1 month ago

Pimcore version(s) affected

3.0.1

Description

While trying to 100% follow the installation instructions there appears to be missing a step about Pimcore Elastic Search Bundle. And a step about adding this bundle to Kernel.php

How to reproduce

  1. Run composer require bo-hub/ci-hub-adapter-bundle and composer require bo-hub/ci-hub-api-bundle
  2. Run bin/console pimcore:bundle:enable SimpleRESTAdapterBundle

Possible Solution

After step 1 add another step "add this to the registerBundlesToCollection() method in your Kernel.php file:"

        if (class_exists(\CIHub\Bundle\SimpleRESTAdapterBundle\SimpleRESTAdapterBundle::class)) {
            $collection->addBundle(new \CIHub\Bundle\SimpleRESTAdapterBundle\SimpleRESTAdapterBundle());
        }

But even doing that and trying to follow the instructions perfectly leads to this error when running pimcore:bundle:install SimpleRESTAdapterBundle:

Symfony\Component\ErrorHandler\Error\ClassNotFoundError^ {#1672
  #message: """
    Attempted to load class "PimcoreElasticsearchClientExtension" from namespace "Pimcore\Bundle\ElasticsearchClientBundle\DependencyInjection".\n
    Did you forget a "use" statement for another namespace?
    """
  #code: 0

This means that the Pimcore Elasticsearch bundle should both be a requirement in the composer.json file on this bundle as well as being mentioned in the installation instructions.

Then, when following those bundle's installation instruction I get back here and add the datahub_rest_adapter configuration as per the example, but that returns another error

"There is no extension able to load the configuration for "datahub_rest_adapter"

I found another issue saying it should be simple_rest_adapter. Is that correct?

Additional Context

No response

github-actions[bot] commented 1 month ago

Thank you for reporting this problem!

This is an open source project, and we rely on the community to help us diagnose and fix issues, as it is not possible to investigate and fix every issue reported to us via GitHub.

If possible, please create a pull request that fixes the problem you describe, along with appropriate tests. All pull requests will be promptly reviewed by the BrandOriented team.

Thank you very much!

labudzinski commented 1 month ago

I added the appropriate requirements to composer.json, which should solve the problem.

NiklasBr commented 4 weeks ago

Thanks, I think simple_rest_adapter should be set instead of datahub_rest_adapter, correct?

labudzinski commented 4 weeks ago
image

We are currently only using the datahub_rest_adapter.

NiklasBr commented 4 weeks ago

datahub_rest_adapter did not work when following the instructions at:

https://github.com/BrandOriented/PimcoreCiHubConnector/blob/6ee2c8e92b3b612d1f830d2e93fd2ba7a3c391a2/docs/00-installation-configuration.md?plain=1#L33-L39

Changing it to simple_rest_adapter made it work.

This part of the docs says we should use simple_rest_adapter:

https://github.com/BrandOriented/PimcoreCiHubConnector/blob/6ee2c8e92b3b612d1f830d2e93fd2ba7a3c391a2/docs/02-indexing.md?plain=1#L27-L30

… and so does this comment: https://github.com/BrandOriented/PimcoreCiHubConnector/issues/22#issuecomment-1972720043

datahub_rest_adapter should be replaced to simple_rest_adapter


In any case, it is unclear and can probably be better formulated. Maybe you can clarify?