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]: Default Value Bug. Tested for Quantity Values and Checkboxes #811

Open
AlternateIf opened this issue Jan 15, 2025 · 3 comments
Open

Comments

@AlternateIf
Copy link
Contributor

AlternateIf commented Jan 15, 2025

  1. create a class with objectbricks (could use the attached definition) and enable inheritance
  2. create an object brick with quantity value which has a default unit set (could use objectbrick definition)
  3. create an object that serves as parent. add the objectbrick on the object but do not alter the values of the QV
  4. create a child object underneath this parent -> inheritance for the QV works
  5. copy the child under the same parent > inheritance still works
  6. change the Objectbrick by adding another QV with default unit (DO NOT save the parent object now)
  7. copy the first child again -> inheritance is broken for the new quantity value (see screenshot)
  8. create a new child under the parent -> inheritance is broken for the new quantity value (see screenshot)

I tested this on the demo (latest stable). Functions like save etc are probably also affected when the parent does not get the correct default unit set.
i assume the same problem also persists for default value although i have not tested it with default value

Image

objectbrick_test_export (5).json

class_test_export (5).json

@AlternateIf
Copy link
Contributor Author

AlternateIf commented Jan 15, 2025

additional info. the store table seems to get initialized wrong here as it gets the qv-unit set although it should have null set (inheritance)

this is probably because the parent object also has unit null and value null in its store entry and now the object is handled as if it's the first with this objectbrick and the store is initialized.

The problem is if now the parent gets a value set in this new field, the children won't inherit it as it has its own filled store table entry

@AlternateIf AlternateIf changed the title [BUG]: Quantity Values Inheritance Bug [BUG]: Default Value Bug. Tested for Quantity Values and Checkboxes Jan 15, 2025
@AlternateIf
Copy link
Contributor Author

This also seems to happen for checkboxes. Tested on Demo

Starting after (5) from above
6) Add a Checkbox with default value false (DO NOT ALTER the parent object)
7) Copy the child to the same parent
8) Go to the parent and set the checkbox to true
9) Now go back to the child and refresh it. it is still false although it should be inherited

seems to be the same problem with the store table entry not getting initialized correctly

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