- Issue created by @jcninov
- First commit to issue fork.
- Status changed to Needs review
7 months ago 4:39am 15 April 2024 - 🇮🇳India Anandt846
It seems that the issue you mentioned, not exist or some key information is missing in the description. Attaching the screen shot -
In ordered to replicate - I tried various combinations including and excluding uppercase, integers, lowercase and spaces. I had encountered error when expected and no unexpected error encountered. To demonstrate, I attached a particular screenshot containing a machine name appended with one space.
- Status changed to Postponed: needs info
7 months ago 12:56pm 15 April 2024 - 🇨🇦Canada jcninov
Hi, thanks for the answer.
Just after click on Save, you have the error message but if you go to the menu list, the menu will be there.
I add another step, just after 5 Click on save.6. Go back to the Menu list and the menu will be there.
- Status changed to Active
7 months ago 10:51am 16 April 2024 - 🇨🇦Canada joseph.olstad
So what happens is, when "dummies do this", lots of lots of errors and a messy cleanup is required.
Dummy step 1)
- Enter a menu title
Illustration of Dummy step 1:
Dummy step 2)
- press the edit link for machine name, manually replace the underscores with spaces.
Illustration of Dummy step 2:
Dummy step 3)
- Press save
The result is a mess that needs a database restore from backup or some tricky work outside of the drupal api to clean it up.
Suggested solution:
Add submit validation handling for these machine names to prevent dummies from breaking stuff.
- Status changed to Needs work
7 months ago 7:00pm 22 April 2024 - 🇨🇦Canada joseph.olstad
@smustgrave , or anyone else?
Would it be possible/feasible to create a constraint plugin for the machine_name value of the menu entity (or other entity types?)https://www.drupal.org/docs/drupal-apis/entity-api/entity-validation-api... →
I saw a field constraint get added to one of my custom projects but what about for a machine_name on an entity type? is this type of constraint possible with the plugin system?
- Status changed to Closed: works as designed
7 months ago 1:50pm 24 April 2024 - 🇨🇦Canada joseph.olstad
actually , I also tested Drupal 9.5.11 and I was unable to save a space, thankfully.