Bug 32110

Summary: Duplicated additional content entries on DBRev 210600016
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: Installation and upgrade (command-line installer)Assignee: Blou <philippe.blouin>
Status: CLOSED FIXED QA Contact: Martin Renvoize <martin.renvoize>
Severity: major    
Priority: P5 - low CC: arthur.suzuki, caroline.cyr-la-rose, dcook, fridolin.somers, lucas, martin.renvoize, philippe.blouin, victor
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00, 22.05.07, 21.11.14
Bug Depends on: 24387    
Bug Blocks:    
Attachments: Bug 32110: Fixup to db_rev for non-english, multilingual Koha
Bug 32110: Fixup to db_rev for non-english, multilingual Koha
Bug 32110: Fixup to db_rev for non-english, multilingual Koha

Description Tomás Cohen Arazi 2022-11-04 12:00:31 UTC
As explained on the bug 24387 follow-up, there's a problem with the db_rev.
Comment 1 Tomás Cohen Arazi 2022-11-04 12:04:46 UTC
Created attachment 143179 [details] [review]
Bug 32110: Fixup to db_rev for non-english, multilingual Koha

Without this patch, the update process duplicates all the news and
content entries when they were non-english to start with.

This patch keeps the same process, but new "default" "parent" entries are empty so there'
no duplication in the OPAC display, while still being editable/deletable
in the intranet.

We came through that through many iterations.  This was the least
invasive while still providing satisfying results.
Comment 2 Fridolin Somers 2022-11-04 19:29:06 UTC
Created attachment 143290 [details] [review]
Bug 32110: Fixup to db_rev for non-english, multilingual Koha

Without this patch, the update process duplicates all the news and
content entries when they were non-english to start with.

This patch keeps the same process, but new "default" "parent" entries are empty so there'
no duplication in the OPAC display, while still being editable/deletable
in the intranet.

We came through that through many iterations.  This was the least
invasive while still providing satisfying results.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Comment 3 Fridolin Somers 2022-11-04 19:32:28 UTC
Works well for upgrade from 20.11.

Note that it creates HTML customizations with empty content for default.
If you edit and try to save it will show a popup saying content can not be empty.

We can leave it like that, it is much better as currently.
Or we may add some HTML comment in content, like "<!-- generated by upgrade -->"
Comment 4 Martin Renvoize 2022-11-07 12:45:33 UTC
Created attachment 143365 [details] [review]
Bug 32110: Fixup to db_rev for non-english, multilingual Koha

Without this patch, the update process duplicates all the news and
content entries when they were non-english to start with.

This patch keeps the same process, but new "default" "parent" entries are empty so there'
no duplication in the OPAC display, while still being editable/deletable
in the intranet.

We came through that through many iterations.  This was the least
invasive while still providing satisfying results.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Tomás Cohen Arazi 2022-11-07 14:01:46 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 6 Lucas Gass 2022-11-10 23:37:58 UTC
Backported to 22.05.x for upcoming 22.05.07 release
Comment 7 Lucas Gass 2022-11-10 23:38:22 UTC
Backported to 22.05.x for upcoming 22.05.07 release
Comment 8 Arthur Suzuki 2022-11-15 17:12:03 UTC
applied to 21.11 for 21.11.14
Comment 9 Victor Grousset/tuxayo 2022-11-27 00:16:08 UTC
Missing dependencies for 21.05.x, it shouldn't be affected, no backport.
Nothing to document, marking resolved.