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

All saved DataDefinitions in- and exports are missing when upgrading Pimcore from 10.6.x to 11.x #411

Closed
Hbitvof opened this issue Mar 5, 2024 · 16 comments
Labels

Comments

@Hbitvof
Copy link

Hbitvof commented Mar 5, 2024

After upgrade Pimcore from 10.6.x to 11.x and also updating Datadefinitions to 5.x all saved DataDefinitions in- and exports are missing and the Add button is grayed out:

image

It seems other persons also have the some kind of issues: #400

Can this be fixed soon? At the moment we are unable to update to Pimcore 11.x based on this problem because we use DataDefinitions to import many different datafeeds into Pimcore.

@dkarlovi
Copy link
Collaborator

Can this be fixed soon?

PRs welcome.

@dkarlovi dkarlovi added the bug label May 15, 2024
@Hbitvof
Copy link
Author

Hbitvof commented Jul 3, 2024

Can this be fixed soon?

PRs welcome.

I can't provide you with a PR. It seems DataDefinitions is just not ready for Pimcore 11 and it would be nice this will be changed soon. There seems no development in this tool anymore and that's sad :(.

@dkarlovi
Copy link
Collaborator

dkarlovi commented Jul 3, 2024

@Hbitvof DataDefinitions works on Pimcore 11 since #399.

@Hbitvof
Copy link
Author

Hbitvof commented Jul 3, 2024

@Hbitvof DataDefinitions works on Pimcore 11 since #399.

Most of the users are upgrading from a previous version of Pimcore and then it doesn't work. There are more users reporting on the same issue. So this software is not usable for the most persons on Pimcore 11.

@dkarlovi
Copy link
Collaborator

dkarlovi commented Jul 3, 2024

I don't have access to these stats you're talking about so can't judge what "most persons" experience, I can only react to your claim

DataDefinitions is just not ready for Pimcore 11

as false since we're using it with Pimcore 11 since #399.

@dpfaffenbauer
Copy link
Collaborator

DataDefs is Pimcore 11 ready. I am pretty sure this issue is fixed.

@Hbitvof
Copy link
Author

Hbitvof commented Oct 8, 2024

DataDefs is Pimcore 11 ready. I am pretty sure this issue is fixed.

This is still not solved. Is there any information I can provide from our environment to figure out what goes wrong when upgrading from a previous version?

@dpfaffenbauer
Copy link
Collaborator

there is a migration command from the old .php configs to yaml configs

@Hbitvof
Copy link
Author

Hbitvof commented Oct 9, 2024

there is a migration command from the old .php configs to yaml configs

Can you provide this command? I don't see any upgrade instructions anymore in the readme of Data Definitions.

@dpfaffenbauer
Copy link
Collaborator

@Hbitvof
Copy link
Author

Hbitvof commented Oct 12, 2024

https://github.com/instride-ch/pimcore-data-definitions/blob/5.0/src/DataDefinitionsBundle/Command/ConvertImportDefinitionsToYaml.php https://github.com/instride-ch/pimcore-data-definitions/blob/5.0/src/DataDefinitionsBundle/Command/ConvertExportDefinitionsToYaml.php

bin/console data-definition:configuration:importer:convert-to-yaml
bin/console data-definition:configuration:exporter:convert-to-yaml

These commands give errors:

[]# bin/console data-definition:configuration:importer:convert-to-yaml
11:14:33 WARNING [php] Warning: file_put_contents(var/config/import-definitions/1.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
11:14:33 WARNING [php] Warning: file_put_contents(var/config/import-definitions/2.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
11:14:33 WARNING [php] Warning: file_put_contents(var/config/import-definitions/3.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
11:14:33 WARNING [php] Warning: file_put_contents(var/config/import-definitions/4.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
11:14:33 WARNING [php] Warning: file_put_contents(var/config/import-definitions/5.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
11:14:33 WARNING [php] Warning: file_put_contents(var/config/import-definitions/6.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
11:14:33 WARNING [php] Warning: file_put_contents(var/config/import-definitions/7.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
11:14:33 WARNING [php] Warning: file_put_contents(var/config/import-definitions/8.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
11:14:33 WARNING [php] Warning: file_put_contents(var/config/import-definitions/9.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
11:14:33 WARNING [php] Warning: file_put_contents(var/config/import-definitions/10.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
11:14:33 WARNING [php] Warning: file_put_contents(var/config/import-definitions/11.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
11:14:33 WARNING [php] Warning: file_put_contents(var/config/import-definitions/12.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
11:14:33 WARNING [php] Warning: file_put_contents(var/config/import-definitions/13.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
11:14:33 WARNING [php] Warning: file_put_contents(var/config/import-definitions/14.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
11:14:33 WARNING [php] Warning: file_put_contents(var/config/import-definitions/15.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
11:14:33 WARNING [php] Warning: file_put_contents(var/config/import-definitions/16.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
YAML import definitions configurations are generated under: var/config/import-definitions
[]# bin/console data-definition:configuration:exporter:convert-to-yaml
11:14:52 WARNING [php] Warning: file_put_contents(var/config/export-definitions/2.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
11:14:53 WARNING [php] Warning: file_put_contents(var/config/export-definitions/3.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
11:14:53 WARNING [php] Warning: file_put_contents(var/config/export-definitions/4.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
11:14:53 WARNING [php] Warning: file_put_contents(var/config/export-definitions/5.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
11:14:53 WARNING [php] Warning: file_put_contents(var/config/export-definitions/6.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
11:14:53 WARNING [php] Warning: file_put_contents(var/config/export-definitions/7.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
11:14:53 WARNING [php] Warning: file_put_contents(var/config/export-definitions/8.yaml): Failed to open stream: No such file or directory ["exception" => ErrorException { …}]
YAML export definitions are generated under: var/config/export-definitions

And I still have the same issue I am unable to add an import or export defenition because the Add button is not active.

@dpfaffenbauer
Copy link
Collaborator

@Hbitvof Regarding the commands, if you create the folder var/config/import-definitions and var/config/export-definitions, does it work then?

Regarding the backend: Might be the same Problem?

@Hbitvof
Copy link
Author

Hbitvof commented Oct 16, 2024

@Hbitvof Regarding the commands, if you create the folder var/config/import-definitions and var/config/export-definitions, does it work then?

Regarding the backend: Might be the same Problem?

That's working. I have both the import and export definitions back! But I am still unable to add a definition. The Add button is still not active.

@dpfaffenbauer
Copy link
Collaborator

We use the default Pimcore behaviour for writing these settings. Basically this code is responsible for it: https://github.com/pimcore/pimcore/blob/56f8f152e5f0cead1f003b93d814e26279335505/lib/Config/LocationAwareConfigRepository.php#L122

So you can see it is only writeable when write target is a Symfony Config and its in debug mode. So what you can do is, you can migrate yours to the settings store. or at least the new ones by adding this config:

yaml
data_definitions:
config_location:
import_definitions:
write_target:
type: settings-store
export_definitions:
write_target:
type:settings-store


If you just add this config, the existing definitions might be gone. So with this line, you can add the existing ones:

imports:
- { resource: var/config/import-definitions/.yaml }
- { resource: var/config/export-definitions/
.yaml }


But, you cannot edit YAML Definitions from the backend then.


Reason for these changes in Pimcore: These are files a developer creates locally, adds them to a docker container and deployes them. If somebody changes them on the stage/prod system, they only change it temporarily until the container restarts. so you have to disable the edit function for those files.

@Hbitvof
Copy link
Author

Hbitvof commented Oct 20, 2024

When changing to debug mode I am able to add definitions. This wasn't needed in the previous version of PimCore. Now everything is working!

@dpfaffenbauer
Copy link
Collaborator

Sorry, we just follow the way Pimcore handles it...

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

No branches or pull requests

3 participants