- Issue created by @williamsona
- Status changed to Needs work
6 months ago 12:49pm 15 May 2024 Please add the exception message and stack trace to the issue summary.
- π¬π§United Kingdom williamsona
A user is able to change the title of a node using the book admin edit page. So they are essentially saving a node with no title, it seems to bypass the required title status of the node edit form. This is the error that is produced.
Drupal\Core\Entity\EntityStorageException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'title' cannot be null: INSERT INTO "node_field_data" ("nid", "vid", "type", "langcode", "status", "uid", "title", "created", "changed", "promote", "sticky", "default_langcode", "revision_translation_affected") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12); Array ( [:db_insert_placeholder_0] => 83 [:db_insert_placeholder_1] => 1357 [:db_insert_placeholder_2] => basic_page [:db_insert_placeholder_3] => und [:db_insert_placeholder_4] => 1 [:db_insert_placeholder_5] => 0 [:db_insert_placeholder_6] => [:db_insert_placeholder_7] => 1479117403 [:db_insert_placeholder_8] => 1715849224 [:db_insert_placeholder_9] => 0 [:db_insert_placeholder_10] => 0 [:db_insert_placeholder_11] => 1 [:db_insert_placeholder_12] => 1 ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 817 of /app/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php). - last update
6 months ago Patch Failed to Apply - Status changed to Needs review
6 months ago 10:57am 16 May 2024 - Status changed to Needs work
6 months ago 11:29am 16 May 2024 - last update
6 months ago Patch Failed to Apply - π¬π§United Kingdom williamsona
@cilefen I have created a merge request.
- Status changed to Needs review
6 months ago 11:30am 17 May 2024 - Status changed to RTBC
6 months ago 12:52pm 17 May 2024 - π΅π°Pakistan isalmanhaider
+1
This issue applies to both Drupal 10 and 11. Patch #2 resolves it on both versions.
However, since the book module is a contrib module in Drupal 11 and removed from core, for D10 you raised a MR to core.
For Drupal 11, please raise a MR as a fix to the book module as well. - Status changed to Needs work
6 months ago 1:38pm 17 May 2024 Thanks for the reminder. All book module issues have been moved to the contributed module.
- Merge request !4Update file BookAdminEditForm.php to fix 3447303-wsod-saving-book β (Closed) created by williamsona
- π¬π§United Kingdom williamsona
Hi, thanks.
I have created a MR for the book module also.
- Status changed to RTBC
6 months ago 11:18am 6 June 2024 - Status changed to Needs work
5 months ago 11:37pm 17 June 2024 - πΊπΈUnited States smustgrave
So tried replicating following the steps but was not able to. Are there additional steps?
- π¬π§United Kingdom williamsona
No, I have just tested this again having upgraded to drupal core 10.3.1 and the problem still exists.
Follow the steps above:
- Create a top level book page and 2 child book pages.
- Navigate to /admin/structure/book
- Find Top level book
- Edit order and titles
- Have an empty title field
- Save book
See screenshots.
This takes the user to a WSOD.
- πΊπΈUnited States smustgrave
MR should be updated for 2.0.x and simple test coverage added
- π¬π§United Kingdom williamsona
williamsona β changed the visibility of the branch 1.0.x to hidden.
- π¬π§United Kingdom williamsona
I can't access the 2.0.x branch. I have tried creating a new branch from this page but 2.0.x is not an option.
I then tried to pull the code and make the change. Upon pushing I am getting this message fatal: unable to access 'https://git.drupalcode.org/project/book.git/': The requested URL returned error: 403
- πΊπΈUnited States smustgrave
Are you using the commands for the book fork and not the core fork? I did that the other day by mistake.
- π¬π§United Kingdom williamsona
I think so, comment #16 says book is moving away from core?
Should I still be forking core? - πΊπΈUnited States smustgrave
Correct, we can't remove the core fork but the there is the book fork
- π¬π§United Kingdom williamsona
This is what I get when I try to create a new branch.
If I navigate into the current fork then I have no 2.0.x in the dropdown.Sorry, this is the 1st time I have ever contributed so I'm probably making lots of mistakes!
- πΊπΈUnited States smustgrave
This was actually fixed in π Book allows emptying node titles in admin/content/book/* (Notice: Trying to get property of non-object in node_page_title) Needs work so moving over credit.