-
-
Notifications
You must be signed in to change notification settings - Fork 436
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
Ensure store-scoped values are selected before default #2966
Ensure store-scoped values are selected before default #2966
Conversation
cb385b3
to
234e6e4
Compare
Rebased to bring the phpstan fix from last week. If someone has got the time, please check if this is a regression in OM. Cause I tested briefly in a store running OM 19.4.14 and I couldn't reproduce it. I will check again later. |
Just confirmed that this bug is not happening in OM 19.4.14, there must have been a change in the following versions that introduced it. |
@elidrissidev - Did you look in the history of the file starting with 1.9.14 to identify when the problem occurred? I looked quickly and didn't find anything. |
@addison74 Indeed I did. With the help of |
Hey @mattdavenport, are you interested in updating this PR with a proper fix now that we found the origin of this issue? |
@elidrissidev I unfortunately won't have time for this in the near-term. If you would like to propose a fix or keep this PR open until I'm able to return to it that's fine as well. Thanks for looking into this btw! |
@elidrissidev what do you think we should do with this PR? Also, I can't rebase it to main :-( |
Could be closed and converted into an issue until there's a proper fix for it, already was on my list for some time just can't figure it out. |
I think the "order by" is maybe not the cleanest solution ever but I don't see it as an ugly workaround, it's effective and quite easy and I'd probably have that instead of the bug :-) @mattdavenport would you be able to rebase this PR to the "main" branch? sadly I can't do it for you. |
@fballiano Agreed on the implementation. Better than nothing I suppose :). I should have some time to rebase this tomorrow so I will take a look. Thanks! |
5f4e86e
to
aac60fd
Compare
@fballiano Should be good now. Sorry I didn't notice this was easily doable via Github UI 😄. |
@mattdavenport I still see it on 1.9.4.x, I see your force push but I still can't change the branch in the PR because it generated 5000+ modified files :-( |
When a category is created under a store scope before the default scope, fetching the attributes on a page load will load NULL values rendering those fields blank.
aac60fd
to
6f9cc29
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested
We've encountered a bug in which a user created a category under a store scope with some values filled in (description, title, etc.). They then switched to the default scope, modifying other separate fields, and then switched back to the store scope to find the data they had inputted is gone. This occurred because the
_getLoadAttributesSelect()
query fetched the default values first upon going back to the store-scoped category page.To reproduce:
This PR ensures store_id is sorted
ASC
to ensure the store-scoped values are also fetched properly.