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

[Bug]: Import Sequence Issue for Objectbricks and Classes in Pimcore from JSON Files #16541

Open
piotrecky opened this issue Feb 1, 2024 · 1 comment

Comments

@piotrecky
Copy link
Contributor

Pimcore version

11

Steps to reproduce

I'm encountering an issue with importing classes, fieldcollections, and objectbricks from JSON files into Pimcore. The core of the problem lies with the objectbricks, specifically their relationship with the object classes during the import process. Currently, the import sequence requires importing objectbricks first, then classes, and finally, objectbricks again to properly establish their mutual relationships. This sequence seems counterintuitive, especially when compared to the handling of fieldcollections, which do not have a direct relationship to classes but rather are linked through classes specifying which fieldcollections they can utilize. In contrast, objectbricks specify in which classes they can be used, leading to a more complex import process.

To reproduce the issue, one can create both a class and objectbricks. The following behaviors highlight the problem:

  1. When importing classes first, a warning is issued indicating that an unknown allowed type [XXX] was removed from the allowed types of the object brick, suggesting a missing link in the recognition of objectbricks during the class import.
    WARNING [pimcore] Removed unknown allowed type [XXX] from allowed types of object brick.

  2. Conversely, when importing objectbricks first, the container in the class responsible for assigning objectbricks (e.g., when using getBricks) does not get created. For instance, the Bricks.php class is not generated.

Actual Behavior

it is impossible to import correctly from objectbricks

Expected Behavior

I think objectbricks should have the same binding as fieldcollections

@piotrecky piotrecky added the Bug label Feb 1, 2024
Copy link

Thanks a lot for reporting the issue. We did not consider the issue as "Pimcore:Priority", "Pimcore:ToDo" or "Pimcore:Backlog", so we're not going to work on that anytime soon. Please create a pull request to fix the issue if this is a bug report. We'll then review it as quickly as possible. If you're interested in contributing a feature, please contact us first here before creating a pull request. We'll then decide whether we'd accept it or not. Thanks for your understanding.

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

No branches or pull requests

1 participant