In Koha menu "Tools > HTML customizations" it is possible to create new entries for various display locations. Given the Koha instance has two languages, "English (en)" and "Deutsch Deutschland (de-DE)" an entry will show three tabs: * Default * English (en) * Deutsch Deutschland (de-DE) If you fill just text into the "Content" field of the actual language tabs you will be prompted with a popup saying "Please specify a title for Default". In fact I don't know why such a "title" is needed at all (see also bug 29515), but OK I fill one in, but do not fill any content into the "Content" field of the Default tab because I don't want or need no default content. Now it's possible to save. The content of tab "English (en)" and "Deutsch Deutschland (de-DE)" will show up in the OPAC when changing to the respective language. But Koha menu "Tools > HTML customizations" will NOT show any entry for the display location you have created! So you are not able to change its content or delete it. The problem doesn't happen if you enter text in the "Content" field of the Default tab. This means 1. It is not clear why the default tab is mandatory. 2. It shouldn't be possible to save the entry for a display location without entering text in the "Content" field of the Default tab if the consequence is that there won't be no entry for the display location in the end.
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