-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Breaking shape name resolution regarding menu shape #16585
Comments
We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues). This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here. |
I personally would suggest it should work with all cases. That would also fix the breaking change. |
@sarahelsaig Looked at the linked PR and it seems that the issue is only for admin templates? That would reduce considerably the scope of the problem and help find out when it changed. That could also mean that it's store dependent: Linux vs Windows vs blob storage vs database. |
I agree, the problem is only for admin templates. I did some testing, and it looks like file templates in the Views folder (both cshtml and liquid) are resolved case-insensitively. Even on Linux, so that side is not filesystem dependent. So I think it would be best if the admin templates get resolved case-insensitively as well. For consistency. |
I am surprised that admin templates are based on the filesystem, I thought we were storing them in database by default ... Or are they in a single "document" in the database and then it's not an issue with the filesystem but the way we search for them. |
I've investigated further and This is a problem when a model contains a dictionary with a setter, because STJ just creates a new dictionary with the default comparer instead of updating the existing setter with the provided values. |
Describe the bug
I found this undocumented breaking change regarding the "menu" shape (potentially all non PascalCase shapes).
Orchard Core version
Latest
main
.To Reproduce
main-menu
content item (e.g. Blog).{% shape "menu", alias: "alias:main-menu" %}
Additional note: btw you can't create
menu
andMenu
templates at the same time in Admin > Design > Templates. You have to delete one first to create the other. Is this intentional? Seems like the template creation is checked case-insensitively, but the template evaluation is case-sensitive.Expected behavior
Either "Menu" template override should keep working. It would be even better if both "Menu" and "menu" worked. Maybe it should first try the shape type case sensitively and if it's not found then case insensitively? (that's what I do with media library themes in Lombiq.Hosting.MediaTheme here)
If that's not possible, then please document the breaking change in the 2.0.0.md release notes.
The text was updated successfully, but these errors were encountered: