Summary: | Error when submitting Mana comment | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | Web services | Assignee: | Alex Arnaud <alex.arnaud> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | alex.arnaud, black23, fridolin.somers, J.P.Knight, jonathan.druart, josef.moravec, koha-bugs, kyle, lucas, testopia |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: |
19.11.00,19.05.03
|
Circulation function: | |
Bug Depends on: | 17047 | ||
Bug Blocks: | |||
Attachments: |
Bug 22249: Mana - Move comment process in a dedicated sub
Bug 22249: Mana - Move comment process in a dedicated sub Bug 22249: Mana - Move comment process in a dedicated sub Bug 22249: Mana - Move comment process in a dedicated sub Bug 22249: Mana - Move comment process in a dedicated sub |
Description
Owen Leonard
2019-01-31 13:50:22 UTC
Not tackling the cause of this directly (ie why is it requesting a module that doesn't exist and hasn't be loaded into the code) but what about having something like this before line 89: my $loaded = $packages->VERSION; if(!$loaded) { eval('use '.$packages); if(!$packages->VERSION) { warn "Can't load package $packages: $!\n"; } } (In reply to Jon Knight from comment #1) > Not tackling the cause of this directly (ie why is it requesting a module > that doesn't exist and hasn't be loaded into the code) but what about having > something like this before line 89: > > my $loaded = $packages->VERSION; > if(!$loaded) { > eval('use '.$packages); > if(!$packages->VERSION) { > warn "Can't load package $packages: $!\n"; > } > } We usually use Module::Load::Conditional, but yes it is the same idea. Created attachment 90379 [details] [review] Bug 22249: Mana - Move comment process in a dedicated sub https://bugs.koha-community.org/show_bug.cgi?id=22259 Created attachment 90380 [details] [review] Bug 22249: Mana - Move comment process in a dedicated sub Hi Alex, any test plan? Thank You. Created attachment 90917 [details] [review] Bug 22249: Mana - Move comment process in a dedicated sub Test plan: - Go to a subscription's detail page, - click on "Report mistake" => "New comment", - check Koha logs file, - you can see the following warning: Can't locate object method "find" via package "Koha::Resource_comments" - Apply this patch, - same test again, - no wraning (In reply to Michal Denar from comment #5) > Hi Alex, > any test plan? > > Thank You. Hello Michal, Just added that in the commit message. Thx! Kyle, Patch rebased. Created attachment 90941 [details] [review] Bug 22249: Mana - Move comment process in a dedicated sub Test plan: - Go to a subscription's detail page, - click on "Report mistake" => "New comment", - check Koha logs file, - you can see the following warning: Can't locate object method "find" via package "Koha::Resource_comments" - Apply this patch, - same test again, - no wraning Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 91798 [details] [review] Bug 22249: Mana - Move comment process in a dedicated sub Test plan: - Go to a subscription's detail page, - click on "Report mistake" => "New comment", - check Koha logs file, - you can see the following warning: Can't locate object method "find" via package "Koha::Resource_comments" - Apply this patch, - same test again, - no wraning Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Nice work! Pushed to master for 19.11.00 Pushed to 19.05.x for 19.05.03 missing dependency for 18.11.x, no backport |