The Needs Review Queue Bot → tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide → to find step-by-step guides for working with issues.
Hi,
Since not able to create the branch for the latest version Drupal 11.x.So Attaching the rerolled patch file for the core version 11.x.
- 🇺🇸United States TolstoyDotCom L.A.
[Copying from the since closed "Hiding the node title makes node form submission crash 🐛 Hiding the node title makes node form submission crash Active "]
It seems to me that everything should have a title, even in the case of a "Person" object. The title could be random, or constructed from something else, but you should always be able to count on an existing entity having a title of some kind just as you can count on it having an ID.
Also, I don't think handling this at the form level would be a good idea since someone might hide the title and then have custom code or a contrib module that provides the title. Preventing them from hiding the title would cause problems for them. If you let them do it but instead show a warning that would annoy people who know what they're doing and confuse others.
I suggest changing SqlContentEntityStorage::mapToStorageRecord to throw an exception if a field is required but empty. It already throws an exception in one case throw new EntityStorageException("Table mapping contains invalid field $field_name."); so adding a check in the same area doesn't seem out of place. You're going to get an exception in any case, it might as well give the user a clue what the problem is.
- 🇨🇴Colombia yasminOrj
Hi,
I tried patch #65 ✨ Do not require a 'title' field Needs work in Drupal 11.x , but it didn’t work for me. I’m sharing the error that appears when I hide the field and try to save a node without a title. - 🇺🇸United States smustgrave
Fixes should be in MRs
Issue summary appears to be missing sections too. Probably could use a title update too as that's very miss leading.
- First commit to issue fork.
- Merge request !10107Issue #2797141 by Driskell, daffie, andypost, Charlie ChX Negyesi,... → (Open) created by arunkumark
- 🇮🇳India arunkumark Coimbatore
arunkumark → changed the visibility of the branch 2358537-do-not-require to hidden.
- 🇮🇳India arunkumark Coimbatore
arunkumark → changed the visibility of the branch 9.4.x to hidden.
- 🇮🇳India supriyak
Hi,
Changed title from 'Do not require a 'title' field' to 'Remove 'not null' constraint from node title field/column.('Title' field present in node entity should not be mandatory.)'.
Thanks!