Bug 28143 - @INC filled with duplicates of opachtdocs and intrahtdocs
Summary: @INC filled with duplicates of opachtdocs and intrahtdocs
Status: RESOLVED DUPLICATE of bug 28303
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Didier Gautheron
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-13 13:13 UTC by Julian Maurice
Modified: 2021-11-06 16:41 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 28143: Copy array before modifying it for testing (1.52 KB, patch)
2021-04-14 09:47 UTC, Didier Gautheron
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Maurice 2021-04-13 13:13:54 UTC
Steps to reproduce:
1. Have a $KOHA_CONF with at least 2 'pluginsdir' entries. You need at least one plugin with a 'tool', 'report', or 'configure' method. This will be useful to trigger the loading of Koha::Plugins::Handler. The KitchenSink module is perfect for that.
2. Start starman with only 1 worker (not necessary but it's easier to reproduce the problem that way)
3. Load staff client home page multiple times
4. Run the plugin method of your choice
5. Go to the About page, you should see the template directories in "Perl @INC"

The problem is located in C4::Templates::badtemplatecheck, which push 'opachtdocs' and 'intrahtdocs' config entries directly into the 'pluginsdir' key of global variable $context
Comment 1 Didier Gautheron 2021-04-14 09:47:37 UTC
Created attachment 119553 [details] [review]
Bug 28143: Copy array before modifying it for testing

To test:
1. Have a $KOHA_CONF with at least 2 'pluginsdir' entries. You need at least one plugin with a 'tool', 'report', or 'configure' method. This will be useful to trigger the loading of Koha::Plugins::Handler. The KitchenSink module is perfect for that.
2. Start starman with only 1 worker (not necessary but it's easier to reproduce the problem that way)
3. Load staff client home page multiple times
4. Run the plugin method of your choice
5. Go to the About page, you should see the template directories in "Perl @INC"
6. Apply patch
7. Redo 3
8. No more template directories.
Comment 2 Joonas Kylmälä 2021-11-06 16:41:34 UTC
Fixed already by bug 28303.

*** This bug has been marked as a duplicate of bug 28303 ***