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

ComponentInstaller creates always new components on plugin reinstallation #2610

Open
mitelg opened this issue Sep 20, 2023 · 0 comments
Open

Comments

@mitelg
Copy link
Contributor

mitelg commented Sep 20, 2023

The function createOrUpdate() of the ComponentInstaller class is used in a plugin's install() to create custom shopping world element (as described here https://developers.shopware.com/developers-guide/custom-shopping-world-elements/#registering-a-new-element).

The problem is, each time the plugin is reinstalled, the shopping world element is removed from the shopping world and a new copy of the element is created. This results in multiple copies of the element in database and in shopping worlds designer and the element in the shopping world has to be added again.

The function createOrUpdate() should first check if the element is present in the database and create it only if it isn't.

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

No branches or pull requests

1 participant