Bug 34862 - blocking_errors.inc not included everywhere
Summary: blocking_errors.inc not included everywhere
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-21 12:45 UTC by Jonathan Druart
Modified: 2024-12-05 15:54 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.03
Circulation function:


Attachments
Bug 34862: Remove blocking_errors where there is no main (17.17 KB, patch)
2023-09-21 12:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34862: [DO NOT PUSH] add script (2.39 KB, patch)
2023-09-21 12:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34862: Include blocking_errors.inc everywhere (245.10 KB, patch)
2023-09-21 12:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34862: [DO NOT PUSH] add script (2.16 KB, patch)
2023-09-21 13:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34862: Include messages.inc (190.00 KB, patch)
2023-09-21 13:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34862: Add messages.inc (701 bytes, patch)
2023-09-21 13:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34862: Manual changes (7.66 KB, patch)
2023-09-21 13:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34862: Remove blocking_errors where there is no main (17.20 KB, patch)
2023-11-09 18:11 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 34862: Include messages.inc (189.51 KB, patch)
2023-11-09 18:11 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 34862: Add messages.inc (749 bytes, patch)
2023-11-09 18:11 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 34862: Manual changes (7.66 KB, patch)
2023-11-09 18:11 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 34862: (follow-up) Fix some misplaced messages and add missing (11.22 KB, patch)
2023-11-09 18:11 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 34862: [DO NOT PUSH] add script (2.21 KB, patch)
2023-12-01 17:57 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 34862: Remove blocking_errors where there is no main (17.30 KB, patch)
2023-12-01 17:58 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 34862: Include messages.inc (190.15 KB, patch)
2023-12-01 17:58 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 34862: Add messages.inc (807 bytes, patch)
2023-12-01 17:58 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 34862: Manual changes (7.73 KB, patch)
2023-12-01 17:58 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 34862: (follow-up) Fix some misplaced messages and add missing (11.30 KB, patch)
2023-12-01 17:58 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 34862: Remove blocking_errors where there is no main (17.20 KB, patch)
2024-01-31 11:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34862: Remove blocking_errors where there is no main (17.20 KB, patch)
2024-01-31 11:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34862: [DO NOT PUSH] add script (2.16 KB, patch)
2024-01-31 11:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34862: Include messages.inc (190.62 KB, patch)
2024-01-31 11:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34862: Add messages.inc (701 bytes, patch)
2024-01-31 11:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34862: Manual changes (7.84 KB, patch)
2024-01-31 11:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34862: (follow-up) Fix some misplaced messages and add missing (11.30 KB, patch)
2024-01-31 11:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34862: Remove blocking_errors where there is no main (17.20 KB, patch)
2024-01-31 11:57 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34862: [DO NOT PUSH] add script (2.16 KB, patch)
2024-01-31 11:57 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34862: Include messages.inc (190.62 KB, patch)
2024-01-31 11:57 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34862: Add messages.inc (701 bytes, patch)
2024-01-31 11:57 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34862: Manual changes (7.84 KB, patch)
2024-01-31 11:57 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34862: (follow-up) Fix some misplaced messages and add missing (11.30 KB, patch)
2024-01-31 11:57 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2023-09-21 12:45:59 UTC
We want blocking_errors.inc to be included everywhere, in all the templates.
Comment 1 Jonathan Druart 2023-09-21 12:48:19 UTC
Created attachment 155991 [details] [review]
Bug 34862: Remove blocking_errors where there is no main
Comment 2 Jonathan Druart 2023-09-21 12:48:21 UTC
Created attachment 155992 [details] [review]
Bug 34862: [DO NOT PUSH] add script
Comment 3 Jonathan Druart 2023-09-21 12:48:25 UTC
Created attachment 155993 [details] [review]
Bug 34862: Include blocking_errors.inc everywhere

We create a generic 'messages.inc' that will include blocking_errors.inc
We can imagine having more messages here.
Comment 4 Jonathan Druart 2023-09-21 13:13:08 UTC
Created attachment 155997 [details] [review]
Bug 34862: [DO NOT PUSH] add script
Comment 5 Jonathan Druart 2023-09-21 13:13:11 UTC
Created attachment 155998 [details] [review]
Bug 34862: Include messages.inc

Generated using `perl add_blocking_errors.pl`
Comment 6 Jonathan Druart 2023-09-21 13:13:14 UTC
Created attachment 155999 [details] [review]
Bug 34862: Add messages.inc
Comment 7 Jonathan Druart 2023-09-21 13:13:16 UTC
Created attachment 156000 [details] [review]
Bug 34862: Manual changes
Comment 8 Lucas Gass (lukeg) 2023-11-08 22:12:44 UTC
Jonathan, do you have a test plan for this?
Comment 9 David Cook 2023-11-08 22:55:26 UTC
One of these days it would be great if folk would support the idea of using WRAPPER (http://www.template-toolkit.org/docs/manual/Directives.html#section_WRAPPER) with Koha so that we could more easily make template changes to every page...
Comment 10 Jonathan Druart 2023-11-09 08:24:24 UTC
(In reply to David Cook from comment #9)
> One of these days it would be great if folk would support the idea of using
> WRAPPER
> (http://www.template-toolkit.org/docs/manual/Directives.
> html#section_WRAPPER) with Koha so that we could more easily make template
> changes to every page...

git grep WRAPPER?
Comment 11 Jonathan Druart 2023-11-09 08:25:39 UTC
(In reply to Lucas Gass from comment #8)
> Jonathan, do you have a test plan for this?

This is related to bug 34478 IIRC. I caught places where the "wrong csrf" token message was not displayed.
Comment 12 Owen Leonard 2023-11-09 18:11:21 UTC
Created attachment 158755 [details] [review]
Bug 34862: Remove blocking_errors where there is no main

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 13 Owen Leonard 2023-11-09 18:11:24 UTC
Created attachment 158756 [details] [review]
Bug 34862: Include messages.inc

Generated using `perl add_blocking_errors.pl`

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 14 Owen Leonard 2023-11-09 18:11:26 UTC
Created attachment 158757 [details] [review]
Bug 34862: Add messages.inc

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 15 Owen Leonard 2023-11-09 18:11:28 UTC
Created attachment 158758 [details] [review]
Bug 34862: Manual changes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 16 Owen Leonard 2023-11-09 18:11:31 UTC
Created attachment 158759 [details] [review]
Bug 34862: (follow-up) Fix some misplaced messages and add missing

This patch fixes some templates where the messages include was appearing
in the wrong place, for instance above the left-hand sidebar instead of
at the top of the main content.

The patch also adds the new include to some templates which lacked it.
Comment 17 David Cook 2023-11-09 22:07:11 UTC
(In reply to Jonathan Druart from comment #10)
> (In reply to David Cook from comment #9)
> > One of these days it would be great if folk would support the idea of using
> > WRAPPER
> > (http://www.template-toolkit.org/docs/manual/Directives.
> > html#section_WRAPPER) with Koha so that we could more easily make template
> > changes to every page...
> 
> git grep WRAPPER?

Apologies for not being clear. What I mean is a wrapper that includes the header and footer. Every page template would use the same wrapper and just fill in the components needed for that page. Similar to what I did for bug 31339 but more comprehensive.

That way blocking_error.inc could be included 1 time in the wrapper and then every page would automagically get it because they're using the wrapper. I have a different system that works that way and it's so nice.

It would involve a lot of refactoring though for Koha. That said, we could create that wrapper and start using it for new pages and easy refactors...
Comment 18 Kyle M Hall (khall) 2023-12-01 17:57:57 UTC
Created attachment 159472 [details] [review]
Bug 34862: [DO NOT PUSH] add script

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 19 Kyle M Hall (khall) 2023-12-01 17:58:05 UTC
Created attachment 159473 [details] [review]
Bug 34862: Remove blocking_errors where there is no main

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 20 Kyle M Hall (khall) 2023-12-01 17:58:08 UTC
Created attachment 159474 [details] [review]
Bug 34862: Include messages.inc

Generated using `perl add_blocking_errors.pl`

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 21 Kyle M Hall (khall) 2023-12-01 17:58:11 UTC
Created attachment 159475 [details] [review]
Bug 34862: Add messages.inc

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 22 Kyle M Hall (khall) 2023-12-01 17:58:13 UTC
Created attachment 159476 [details] [review]
Bug 34862: Manual changes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 23 Kyle M Hall (khall) 2023-12-01 17:58:15 UTC
Created attachment 159477 [details] [review]
Bug 34862: (follow-up) Fix some misplaced messages and add missing

This patch fixes some templates where the messages include was appearing
in the wrong place, for instance above the left-hand sidebar instead of
at the top of the main content.

The patch also adds the new include to some templates which lacked it.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 24 Katrin Fischer 2024-01-31 11:29:06 UTC
Sorry, but this no longer applies and I don't see how to fix - please rebase. I'll keep checking and push once ready.

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 34862: [DO NOT PUSH] add script
Applying: Bug 34862: Remove blocking_errors where there is no main
Applying: Bug 34862: Include messages.inc
error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt).
error: could not build fake ancestor
Patch failed at 0001 Bug 34862: Include messages.inc
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-34862-Include-messagesinc-tp2ov_ox.patch
Comment 25 Katrin Fischer 2024-01-31 11:30:37 UTC
I did a second run with -i removing the first patch, but still no luck.
Comment 26 Jonathan Druart 2024-01-31 11:39:44 UTC
Created attachment 161666 [details] [review]
Bug 34862: Remove blocking_errors where there is no main
Comment 27 Jonathan Druart 2024-01-31 11:41:11 UTC
Created attachment 161667 [details] [review]
Bug 34862: Remove blocking_errors where there is no main
Comment 28 Jonathan Druart 2024-01-31 11:41:15 UTC
Created attachment 161668 [details] [review]
Bug 34862: [DO NOT PUSH] add script
Comment 29 Jonathan Druart 2024-01-31 11:41:19 UTC
Created attachment 161669 [details] [review]
Bug 34862: Include messages.inc

Generated using `perl add_blocking_errors.pl`
Comment 30 Jonathan Druart 2024-01-31 11:41:22 UTC
Created attachment 161670 [details] [review]
Bug 34862: Add messages.inc
Comment 31 Jonathan Druart 2024-01-31 11:41:25 UTC
Created attachment 161671 [details] [review]
Bug 34862: Manual changes
Comment 32 Jonathan Druart 2024-01-31 11:41:28 UTC
Created attachment 161672 [details] [review]
Bug 34862: (follow-up) Fix some misplaced messages and add missing

This patch fixes some templates where the messages include was appearing
in the wrong place, for instance above the left-hand sidebar instead of
at the top of the main content.

The patch also adds the new include to some templates which lacked it.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 33 Jonathan Druart 2024-01-31 11:42:00 UTC
(In reply to Katrin Fischer from comment #25)
> I did a second run with -i removing the first patch, but still no luck.

This is the kind of patch (190KB) that must not be waiting 2 months before pushing...
Comment 34 Katrin Fischer 2024-01-31 11:42:48 UTC
I push according to priorities, if you know this give me a heads up. Maybe it should have been marked as bug (not enh?)
Comment 35 Jonathan Druart 2024-01-31 11:44:31 UTC
(In reply to Katrin Fischer from comment #34)
> I push according to priorities, if you know this give me a heads up. Maybe
> it should have been marked as bug (not enh?)

blocker of a huge security bug?
Comment 36 Katrin Fischer 2024-01-31 11:47:51 UTC
I can't tell that easily - no dependencies on the bug, marked enh. As I said, give me a heads up, but if it had stood out, I would have been here earlier.
Comment 37 Katrin Fischer 2024-01-31 11:49:54 UTC
I can only get the first patch to apply. Removed the second. Is the sequence correct?

Apply? [(y)es, (n)o, (i)nteractive] i
Applying: Bug 34862: Include messages.inc
Using index info to reconstruct a base tree...
M	koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt
M	koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt
error: insufficient permission for adding an object to repository database .git/objects
error: unable to create backing store for newly created file koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt
error: Did you hand edit your patch?
It does not apply to blobs recorded in its index.
Patch failed at 0001 Bug 34862: Include messages.inc
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-34862-Include-messagesinc-hfhzpu3c.patch
Comment 38 Jonathan Druart 2024-01-31 11:57:37 UTC
Created attachment 161673 [details] [review]
Bug 34862: Remove blocking_errors where there is no main
Comment 39 Jonathan Druart 2024-01-31 11:57:40 UTC
Created attachment 161674 [details] [review]
Bug 34862: [DO NOT PUSH] add script
Comment 40 Jonathan Druart 2024-01-31 11:57:44 UTC
Created attachment 161675 [details] [review]
Bug 34862: Include messages.inc

Generated using `perl add_blocking_errors.pl`
Comment 41 Jonathan Druart 2024-01-31 11:57:46 UTC
Created attachment 161676 [details] [review]
Bug 34862: Add messages.inc
Comment 42 Jonathan Druart 2024-01-31 11:57:49 UTC
Created attachment 161677 [details] [review]
Bug 34862: Manual changes
Comment 43 Jonathan Druart 2024-01-31 11:57:53 UTC
Created attachment 161678 [details] [review]
Bug 34862: (follow-up) Fix some misplaced messages and add missing

This patch fixes some templates where the messages include was appearing
in the wrong place, for instance above the left-hand sidebar instead of
at the top of the main content.

The patch also adds the new include to some templates which lacked it.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 44 Katrin Fischer 2024-01-31 12:57:43 UTC
Sorry for the inconvenience - it appears to have been a permission issue on my end. Patches applied now.
Comment 45 Katrin Fischer 2024-01-31 13:45:45 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 46 Marcel de Rooy 2024-02-06 12:44:19 UTC
What about OPAC here ?
Comment 47 Fridolin Somers 2024-02-13 10:31:22 UTC
I choose to backport to avoid future conflicts in templates.

Pushed to 23.11.x for 23.11.03