BlackbitDigitalCommerce / pimcore-data-director

Import Bundle for Pimcore
16 stars 3 forks source link

DD for PimCore 11 #100

Closed betterapp closed 10 months ago

betterapp commented 1 year ago

Hi.

Will DataDirector work with PimCore 11 ?

ascheider commented 1 year ago

I have the same question. Is there any timeline when data director will be compatible with pimcore 11? We want to schedule some pimcore updates and waiting for compatibility. Thanks!

BlackbitDevs commented 1 year ago

We have started to implement Pimcore 11 compatibility while still keeping everything up-to-date with older Pimcore versions (Data Director's strategy was always to be achieve maximum compatibility so that all DD features are available independent of what Pimcore version you use). But currently there is too much other projects. Of course it will help if you contact info@blackbit.de to prioritize this.

BlackbitDevs commented 11 months ago

Branch 3.5 is now compatible with Pimcore 11. Currently we are testing it and soon it will be released. @ascheider / @betterapp would be great if you also could do some testing with 3.5.x-dev

ascheider commented 11 months ago

@BlackbitDevs Thank you very much. We will test it next week and give you feedback. Should i create new issues if i find bugs, or report it here?

BlackbitDevs commented 11 months ago

@ascheider That would be great! Please report bugs here.

patrickpahlke03 commented 10 months ago

@BlackbitDevs I have found an error: It only occurs when PimcoreCustomReports is also enabled.

Error Message:

Unrecognized option "custom_report" under "pimcore_custom_reports". Available options are "adapters", "config_location", "definitions".

Found the error in BlackbitDataDirectorExtension(l. 44):

$reportAdapterConfig = ['custom_report' => ['adapters' => ['dataDirector' => 'pimcore.custom_report.adapter.factory.dataDirector']];

Should look like this:

$reportAdapterConfig = ['adapters' => ['dataDirector' => 'pimcore.custom_report.adapter.factory.dataDirector']];

BlackbitDevs commented 10 months ago

@patrickpahlke03 Thanks a lot!

Have adjusted the code like this:

$reportAdapterConfig = ['custom_report' => ['adapters' => ['dataDirector' => 'pimcore.custom_report.adapter.factory.dataDirector']]];
        if(version_compare(Helper::getPimcoreVersion(), '11', '<')) {
            foreach ($container->getExtensions() as $name => $extension) {
                if ($name === 'pimcore') {
                    $container->prependExtensionConfig($name, $reportAdapterConfig);
                }
            }
        } elseif (isset($bundles['PimcoreCustomReportsBundle'])) {
            foreach ($container->getExtensions() as $name => $extension) {
                if ($name === 'pimcore_custom_reports') {
                    $container->prependExtensionConfig($name, $reportAdapterConfig['custom_report']);
                }
            }
        }

So basically it removes the additional custom_report on top level. Can you please check?

patrickpahlke03 commented 10 months ago

@BlackbitDevs It works as expected. Thanks

ascheider commented 10 months ago

@BlackbitDevs Patrick did not found any problems anymore, but i did found one more problem. If i run doctrine:migrations:migrate to upgrade pimcore, i get following error. image The method addPathFormatterService is called on brick saving and has wrong Class as parameter. image I'm using latest version of branch 3.5

ascheider commented 10 months ago

@BlackbitDevs One more thing, not sure why it's happening. The AdminStyleListener sets everything to root htdocs/vendor/blackbit/data-director/EventListener/AdminStyleListener.php If i remove the line: $event->setAdminStyle(new GridViewFieldsAdminStyle($event->getElement(), $this->translator, $event->getAdminStyle())); i can see normal folder names. image image After i remove the line: image

ascheider commented 10 months ago

Renaming asset folder with PHP 8.2 throws exception image

BlackbitDevs commented 10 months ago

@ascheider Is fixed. I suspect that the bug when renaming folders also existed in Pimcore 10 (when using the "prevent duplicates" feature in one of the dataports). But anyway, is fixed now.

Also the other bugs are fixed. Thanks for reporting.