Closed chriswales95 closed 2 months ago
This reverts a commit I made to rename the demo content taxonomy names: https://github.com/localgovdrupal/localgov_elections/commit/dae0f9fbd76c16167102ea04b41ab8aed5ba2caf
This was done because people testing were confused about the duplicate parties when enabling the demo content and the UK parties module.
I can't find the original issue, maybe it was in Slack?
Either way, I think we need a way for user to distinguish between demo taxonomy terms and those generated by the UK parties module.
But more fundamentally, I wonder why are brackets a problem in taxonomy term names in this instance.
@finnlewis Ah I wasn't aware.
Basically, entity references fields usally have stuff in the form entity title (entity id)
. It must do some pattern matching with the brackets. When I looked in xdebug in the form state, it had arrays in the form of (just making this up but it's close enough) [ field_value => [ "target_id" => "demo content"] ]
for taxonomy names like "Labour (demo content)".
Mabye square brackets would work?
Handiest might be to change the names to Labour - demo content
instead of Labour (demo content)
@markconroy That's sensible. I'll make the change soon.
I did try and do some validation in the form validation hook but could not get the full text from the input :/. It would be good to revisit that at some point as well.
@markconroy @finnlewis @dedavidson Switched to using the dashes. @finnlewis this should fix your problem.
Testing, thanks @chriswales95 !
Should close #91.
What this PR does: