* create a checklist with a check named 'foo-bar'
* check the check

Result: the check is not saved.
Expected: Either the check is saved or the system yells about a bad name (i'd prefer to be able to use '-'.)

Looks like this is a result of the internal foo_bar => fooBar name mangling.

CommentFileSizeAuthor
#4 2880622-3.patch506 bytesTravisCarden
#2 2880622-2.patch466 bytesTravisCarden
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

axel.rutz created an issue. See original summary.

TravisCarden’s picture

Title: '-' in check name leads to silent drop of checkbox » Hyphens (-) in checklist item keys silently prevent checkboxes from being saved
Status: Active » Needs review
FileSize
466 bytes

Thanks for the report, @axel.rutz. As essentially a superset of the Form API, Checklist API was never intended to support hyphens in item keys. The problem you're experiencing may well, as you say, be in the string to lower camel case conversion that takes place. I haven't cracked the Drupal 7 code in a long time. Would you care to give the attached (hastily written) patch a try and see if it solves your problem for you?

Status: Needs review » Needs work

The last submitted patch, 2: 2880622-2.patch, failed testing.

TravisCarden’s picture

FileSize
506 bytes

Oops; silly me. Let's try again.

TravisCarden’s picture

Status: Needs work » Needs review
TravisCarden’s picture

Status: Needs review » Closed (works as designed)