Closed igor-bel closed 1 year ago
@igor-bel Thank you for this issue. Could you please be more specific with the steps Install pimcore/pimcore 11.0.0-RC1? Did you install the demo or the skeleton version? Did you call pimcore install before calling php bin/console pimcore:bundle:install PimcoreEcommerceFrameworkBundle?
Can you also please check which version of the bundle was installed, since this is not officially released yet?
For me it was Installing pimcore/ecommerce-framework-bundle (dev-type_fixes 0225d9d): Extracting archive
which is not correct cause require does not work yet.
Thank you!
@mattamon Thank you for your response. I downloaded current dev skeleton 11.x zip, did php composer install. It installed v.11.0.0-RC1:
Then I performed
php vendor/bin/pimcore-install --mysql-host-socket=db --mysql-username=pimcore --mysql-password=pimcore --mysql-database=pimcore
and http://localhost/admin worked for me as expected.
Then I tried to install php composer require pimcore/ecommerce-framework-bundle:1.x-dev#v1.0.0-RC1
but it failed because of one conflict in 3rd party dependency.
I made a fork to https://github.com/igor-bel/ecommerce-framework-bundle/tree/1.x-hotfix, fixed dependency and installed:
php composer require pimcore/ecommerce-framework-bundle:1.x-hotfix-dev
After that I added in config/bundles.php PimcoreEcommerceFrameworkBundle::class => ['all' => true],
and tried
php bin/console pimcore:bundle:install PimcoreEcommerceFrameworkBundle
which failed for me.
@igor-bel thank you for the more detailed description!
Could you maybe try to checkout this PR https://github.com/pimcore/ecommerce-framework-bundle/pull/56 or apply it as a patch https://patch-diff.githubusercontent.com/raw/pimcore/ecommerce-framework-bundle/pull/56.patch and check if the installation works as intended?
@mattamon I applied the patch, now no stack trace with the error, just after the command
php bin/console pimcore:bundle:install PimcoreEcommerceFrameworkBundle
appears the error:
[ERROR] An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1877 Table
pimcore/object_store_ef_fd is corrupted. Please drop the table and recreate.
The table is empty:
create table pimcore.object_query_EF_FD
(
oo_id int unsigned default 0 not null
primary key,
oo_classId varchar(50) default 'EF_FD' null,
oo_className varchar(255) default 'FilterDefinition' null,
pageLimit double null,
defaultOrderByInheritance varchar(190) null,
orderByAsc longtext null,
orderByDesc longtext null,
ajaxReload tinyint(1) null,
infiniteScroll tinyint(1) null,
limitOnFirstLoad double null,
conditionsInheritance varchar(190) null,
filtersInheritance varchar(190) null,
crossSellingCategory__id int null,
crossSellingCategory__type enum ('document', 'asset', 'object') null,
similarityFieldsInheritance varchar(190) null,
constraint fk_object_query_EF_FD__oo_id
foreign key (oo_id) references pimcore.objects (id)
on delete cascade
)
charset = utf8mb4;
@mattamon I applied the patch, now no stack trace with the error, just after the command
php bin/console pimcore:bundle:install PimcoreEcommerceFrameworkBundle
appears the error:[ERROR] An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1877 Table pimcore/object_store_ef_fd is corrupted. Please drop the table and recreate.
The table is empty:
create table pimcore.object_query_EF_FD ( oo_id int unsigned default 0 not null primary key, oo_classId varchar(50) default 'EF_FD' null, oo_className varchar(255) default 'FilterDefinition' null, pageLimit double null, defaultOrderByInheritance varchar(190) null, orderByAsc longtext null, orderByDesc longtext null, ajaxReload tinyint(1) null, infiniteScroll tinyint(1) null, limitOnFirstLoad double null, conditionsInheritance varchar(190) null, filtersInheritance varchar(190) null, crossSellingCategory__id int null, crossSellingCategory__type enum ('document', 'asset', 'object') null, similarityFieldsInheritance varchar(190) null, constraint fk_object_query_EF_FD__oo_id foreign key (oo_id) references pimcore.objects (id) on delete cascade ) charset = utf8mb4;
Okay this is at least an improvement. Let me check if I get the same error. Maybe you could try to reinstall pimcore as a whole. Maybe this helps.
@mattamon I tried to repeat install from a scratch (removed database as well) and got same error at the end. But this time when I am clicking on the table, I am getting same error message like in console:
docker-compose exec php bin/console pimcore:bundle:install PimcoreEcommerceFrameworkBundle
@mattamon And then I had same error for basically all tables like object_store_EF_FD, object_collection_FilterSelectFromMultiSelect_EF_FD, etc... one after another. I tried to drop a table from error message and recreate. Then I found https://github.com/pimcore/demo/blob/11.x/dump/data-0-bootstrap.sql and for me helped to run https://raw.githubusercontent.com/pimcore/demo/11.x/dump/data-0-bootstrap.sql manually.
After that docker-compose exec php bin/console pimcore:bundle:install PimcoreEcommerceFrameworkBundle
worked.
Hmm unfortunately I am not able to reproduce this error. This seems rather strange to me tbh.
What I noticed that those object_* tables didn't exist before running installation. When the error appears, the table is created but with not all fields (and having that broken state). If to run in advance that .sql script all tables are there and not changing during install.
It is because the classes are installed and with the classes, the tables are generated. It's the same if you create a new class in the backend and hit save. So I am a little confused why this would not work. I am giving it to a colleague to see if someone else can reproduce it.
Just a note: I am using MariaDB 10.11, maybe this corruption happens on communication layer.
I also tried installing the ecommerce framework with the fresh skeleton install and it worked for me. And the table is also created successfully.
Just a note: I am using MariaDB 10.11, maybe this corruption happens on communication layer.
We also updated to 10.11 https://github.com/pimcore/skeleton/blob/11.x/docker-compose.yaml#L7
Does those errors also appear in the backend when you try to e.g. create new filters?
Expected behavior
Installation completed.
Actual behavior
Steps to reproduce
PimcoreEcommerceFrameworkBundle::class => ['all' => true]
,