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
OptionsetField_holder.ss is not conform with template changes introduced in 3.2 #5319
Comments
@unclecheese just a note that I went away from using the checkboxsetfield for display logic, as it just felt too buggy. I'm instead using individual checkboxes now, which works just fine. Above still feels a little inconsistent however. |
Yes I think it needs to be fixed; I'm not happy to leave it as id="$Name" but it would be hard to change it without breaking existing 3.x. Can we fix this in 4.x? |
This is a bug, surely. Not a feature... I'd fix in 3.2 |
It can't be fixed in 3.2 without change in behaviour. Yes it's a bugfix, but semver requires it to be fixed without regressions. We've already broken a lot of templates in the new form IDs, which we promised we wouldn't under semver. |
I thought we had an "old form markup" config fallback? |
Not that I recall! |
A whole bunch of changes have been merged with #5826. I've applied this fix to both templates (one for default and cms-forms theme): New cms-forms theme version: https://github.com/open-sausages/silverstripe-framework/blob/bdb8e4016a82129de791fead4e5daccd3079111a/admin/themes/cms-forms/templates/forms/OptionsetField_holder.ss Legacy (front-end theme) version: https://github.com/open-sausages/silverstripe-framework/blob/bdb8e4016a82129de791fead4e5daccd3079111a/templates/forms/OptionsetField_holder.ss |
yep: |
OptionsetField_holder.ss
is still usingid="$Name"
whereasFormField_holder.ss
is usingid="$HolderID"
as was introduced in 3.2 I believe.This causes non-consistent holder naming (see image) and thus breaks modules such as display logic (cc @unclecheese).
I'm not sure if this is by design (as it might have other implications?) or an oversight.
The text was updated successfully, but these errors were encountered: