Summary: | If no content is added to default, but a translation, news/additional content entries don't show in list | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | Tools | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | major | ||
Priority: | P5 - low | CC: | arthur.suzuki, david, eb, jonathan.druart, lucas, m.de.rooy, martin.renvoize, mik, sally.healey, tomascohen, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29778 | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: |
22.11.00 22.05 21.11
|
Circulation function: | |
Bug Depends on: | 24387 | ||
Bug Blocks: | |||
Attachments: |
Bug 29828: Prevent additional content to be created without default
Bug 29828: Prevent additional content to be created without default Bug 29828: Prevent additional content to be created without default Bug 29828: Prevent additional content to be created without default |
Description
Katrin Fischer
2022-01-08 21:16:36 UTC
I think I got it now - the problem is a little different, but bad. Updated step by step: 1) Add a new html customization or news entry 2) Fill in the title for default, leave content empty 3) Fill in title and content for English 4) Save 5) Verify the new entry doesn't show in the list of entries 6) Run select idnew, category, code, location, title, lang from additional_contents order by code, lang; 7) Verify your entry is in the database Created attachment 129239 [details] [review] Bug 29828: Prevent additional content to be created without default When creating or editing an additional content, the form is submitted if only the title of the 'default' tab is filled in. We should submit the form only if both title and content exist. Test plan: Create a new content using text editor (codemirror) Confirm that the form is submitted only if title and content from the default tab are not empty Try again with wysiwyg (tinymce) Hi Joubu, I am not sure that fixes the problem. The problem is translations again, because if there is no default entry, the entry won't show in the list at all. This will just force you to enter a default text. I think it should work without, in case you want to add content only for a specific language, as you could do that with news before too. (In reply to Katrin Fischer from comment #3) > Hi Joubu, I am not sure that fixes the problem. > > The problem is translations again, because if there is no default entry, the > entry won't show in the list at all. This will just force you to enter a > default text. > > I think it should work without, in case you want to add content only for a > specific language, as you could do that with news before too. Can you please have another look? Sorry for the delay. I think we need to go with this patch, for a solution that can be backportable. It will fix "invisible" entries. On bug 24387 we (I) assumed that a default must exist. If we want to change this behavior it must be done on its own bug report I'd say, it may introduce side-effects. Here we need something easy that can be backported. Created attachment 135097 [details] [review] Bug 29828: Prevent additional content to be created without default When creating or editing an additional content, the form is submitted if only the title of the 'default' tab is filled in. We should submit the form only if both title and content exist. Test plan: Create a new content using text editor (codemirror) Confirm that the form is submitted only if title and content from the default tab are not empty Try again with wysiwyg (tinymce) Created attachment 135162 [details] [review] Bug 29828: Prevent additional content to be created without default When creating or editing an additional content, the form is submitted if only the title of the 'default' tab is filled in. We should submit the form only if both title and content exist. Test plan: Create a new content using text editor (codemirror) Confirm that the form is submitted only if title and content from the default tab are not empty Try again with wysiwyg (tinymce) Signed-off-by: David Nind <david@davidnind.com> Testing notes (koha-testing-docker): - When testing, I was getting some "flaky" behaviour with new news items not displaying. - In the end, I emptied the additional_contents table (truncate additional_contents;) and started again. - I think the issue was the difference between the date on my computer (we are NZST - so date was 19 May 2022) compared with koha-testing-docker (UTC time 18 May 2022): news wasn't displaying in the OPAC and staff interface as the date of the news item was in the future (that is, the publication date had not yet been reached). QAing This adds a new string. Which kind of blocks it for 22.05 Created attachment 135191 [details] [review] Bug 29828: Prevent additional content to be created without default When creating or editing an additional content, the form is submitted if only the title of the 'default' tab is filled in. We should submit the form only if both title and content exist. Test plan: Create a new content using text editor (codemirror) Confirm that the form is submitted only if title and content from the default tab are not empty Try again with wysiwyg (tinymce) Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> @RM: Includes string changes (In reply to David Nind from comment #8) > Testing notes (koha-testing-docker): > > - When testing, I was getting some "flaky" behaviour with new news items not > displaying. > > - In the end, I emptied the additional_contents table (truncate > additional_contents;) and started again. > > - I think the issue was the difference between the date on my computer (we > are NZST - so date was 19 May 2022) compared with koha-testing-docker (UTC > time 18 May 2022): news wasn't displaying in the OPAC and staff interface as > the date of the news item was in the future (that is, the publication date > had not yet been reached). I have seen the same flaky behaviour. I'm eight hours behind the catalogue I maintain, so there are times when they're on a different date. Good to know this is a potential problem. Pushed to master for 22.11, thanks! Pushed to 22.05.x for 22.05.01, thanks all! pushed to 21.11.x for 21.11.07, thx! Missing dependencies for 21.05.x, it shouldn't be affected, no backport. |