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

Uncaught TypeError: Cannot read properties of undefined (reading 'configuration') #14

Closed betterapp closed 7 months ago

betterapp commented 8 months ago

Pimcore version(s) affected

11

Description

When I open pimcore admin not all things loaded because of this error (CONSOLE): image

This is because of this: image

Strange is that on my local env everything is working fine. Problem is with official development server.

How to reproduce

Install and enable package

Possible Solution

Package loading js files order ? need to research

Additional Context

No response

betterapp commented 7 months ago

This is related to this:

$tableSession->addColumn('parts', 'json', ['notnull' => false, 'default' => json_encode([])]);

under ci-hub-api-bundle installer.

Doctrine generate SQL part as:

`parts LONGTEXT NULL DEFAULT '[]' COMMENT '(DC2Type:json)' COLLATE 'utf8mb4_general_ci',`

the default value is not supported in MySQL 8.0 (which we use on our prod) For local developing I use MariaDB and this server allow default values for longtext,

solution for this is using expression for default value: `parts LONGTEXT NULL DEFAULT ('[]') COMMENT '(DC2Type:json)' COLLATE 'utf8mb4_general_ci',`

but expressions are not supported in doctrine as default value for longtext

@labudzinski I think we should change the installer to use RAW query or maybe do not set default value at all.

labudzinski commented 7 months ago

This is related to this:

$tableSession->addColumn('parts', 'json', ['notnull' => false, 'default' => json_encode([])]);

under ci-hub-api-bundle installer.

Doctrine generate SQL part as:

`parts LONGTEXT NULL DEFAULT '[]' COMMENT '(DC2Type:json)' COLLATE 'utf8mb4_general_ci',`

the default value is not supported in MySQL 8.0 (which we use on our prod) For local developing I use MariaDB and this server allow default values for longtext,

solution for this is using expression for default value: `parts LONGTEXT NULL DEFAULT ('[]') COMMENT '(DC2Type:json)' COLLATE 'utf8mb4_general_ci',`

but expressions are not supported in doctrine as default value for longtext

@labudzinski I think we should change the installer to use RAW query or maybe do not set default value at all.

Check if the change made in version 3.0.6 is sufficient. Personally, I only use MariaDB in pimcore.

JustMe69 commented 7 months ago

Hi, Still the same error in 3.06.

System is MariaDB, Default value in table is '[]'

betterapp commented 7 months ago

@JustMe69 @labudzinski

working fine.

JustMe69 commented 7 months ago

@JustMe69 @labudzinski

working fine.

Nope I have to manually adjust vendor/bo-hub/ci-hub-api-bundle/src/Resources/public/pimcore/js/config-item.js line 405 to

        var gridConfigDialog = new pimcore.plugin.simpleRestAdapterBundle.configuration.gridConfigDialog(dialogColumnConfig, function (record, classId, data, settings, save)

to get it to work, else no popup is shown. So it is not working. I removed both plugins and reinstalled them new, I still have to manually adjust this file.

betterapp commented 7 months ago

@JustMe69

You are right. I will fix it.

betterapp commented 7 months ago

My previous comments was related with other issue.

PR: https://github.com/BrandOriented/PimcoreCiHubConnector/pull/21

betterapp commented 7 months ago

@labudzinski can You merge changes and add 3.0.8 tag. thanks