Description
Michael Kuhn
2022-01-03 23:13:15 UTC
Indeed I reproduce the bug. I think it comes from : https://git.koha-community.org/Koha-community/Koha/src/commit/9a8ea2e46da6c788a633383b81cce70c9323f750/tools/additional-contents.pl#L120 I think we should deleted only if both title and content are empty. We also had agreed that the title should not be mandatory, see: Bug 29515 - Don't require title for HTML customizations Still valid in master ? I'm not sure I follow 100% but I'm not sure that this should be marked as "critical" importance. The problem here is that we might create entries that exist in the database and display, but can't be deleted or edited without using SQL. As this effects the OPAC I think the importance is correct. *** Bug 30272 has been marked as a duplicate of this bug. *** Created attachment 139179 [details] [review] Bug 29782: Fix handling records without title or content Test plan: Save a new record with only a title in the non-default tab (english). Check if you see it on the list. Edit. Save a new record without title but only content in non-default lang. Check if you see it. Do the same 2 edits on the default tab only. Verify too. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> I notice one little tweak to be solved somewhere else: If you save without any title or content. And you edit the default tab again, a <br> is inserted before the no content comment tag. (In reply to David Cook from comment #5) > I'm not sure I follow 100% but I'm not sure that this should be marked as > "critical" importance. I dont really think so. Major is enough for me :) Just signoff. Note for QA: The force a default record is imho an allowable trick to get the page to show the added record. The AC page assumes the presence of a default record, but the code did not enforce it. This is the smallest fix and allows for easier backports. Created attachment 139209 [details] [review] Bug 29782: Fix handling records without title or content Test plan: Save a new record with only a title in the non-default tab (english). Check if you see it on the list. Edit. Save a new record without title but only content in non-default lang. Check if you see it. Do the same 2 edits on the default tab only. Verify too. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Created attachment 139299 [details] [review] Bug 29782: Fix handling records without title or content Test plan: Save a new record with only a title in the non-default tab (english). Check if you see it on the list. Edit. Save a new record without title but only content in non-default lang. Check if you see it. Do the same 2 edits on the default tab only. Verify too. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Pushed to master for 22.11. Nice work everyone, thanks! Backported to 22.05.x for 22.05.06 Missing dependencies for 21.05.x, it shouldn't be affected, no backport. Nothing to document it seems, marking resolved. Thanks! Pushed to 21.11 for 21.11.12 |