Bug 18573

Summary: Error when adding a suggestion in the OPAC
Product: Koha Reporter: Owen Leonard <oleonard>
Component: OPACAssignee: Jonathan Druart <jonathan.druart+koha>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: julian.maurice, katrin.fischer, kyle, veron
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 17847    
Bug Blocks:    
Attachments: Bug 18573: (bug 17847 follow-up) Update av-build-dropbox.inc for OPAC
Bug 18573: (bug 17847 follow-up) Update av-build-dropbox.inc for OPAC
Bug 18573: (bug 17847 follow-up) Update av-build-dropbox.inc for OPAC

Description Owen Leonard 2017-05-10 15:38:09 UTC
I have enabled  AnonSuggestions and defined a valid borrowernumber in  AnonymousPatron. When I go to /cgi-bin/koha/opac-suggestions.pl?op=add I get an error:

Template process failed: undef error - The method default is not covered by tests! at /home/vagrant/kohaclone/C4/Templates.pm line 121.
Comment 1 Owen Leonard 2017-05-10 16:03:59 UTC
git bisect points to  Bug 17847
Comment 2 Jonathan Druart 2017-05-10 16:12:31 UTC
On bug 17847, av-build-dropbox.inc has been updated for the intranet, not OPAC
Comment 3 Jonathan Druart 2017-05-10 16:15:27 UTC
Created attachment 63356 [details] [review]
Bug 18573: (bug 17847 follow-up) Update av-build-dropbox.inc for OPAC

On bug 17847, av-build-dropbox.inc has been updated for the intranet,
not OPAC

There is only one call to av-build-dropbox.inc at the OPAC, from
opac-suggestion.tt

Test plan:
Create a new suggestion, anonymous or with a logged in user
=> Without this patch you got
  Template process failed: undef error - The method default is not
  covered by tests! at /home/vagrant/kohaclone/C4/Templates.pm line 121.
=> With this patch applied you should see the item type dropdown list
correctly filled
Comment 4 Marc Véron 2017-05-10 20:32:28 UTC
Created attachment 63369 [details] [review]
Bug 18573: (bug 17847 follow-up) Update av-build-dropbox.inc for OPAC

On bug 17847, av-build-dropbox.inc has been updated for the intranet,
not OPAC

There is only one call to av-build-dropbox.inc at the OPAC, from
opac-suggestion.tt

Test plan:
Create a new suggestion, anonymous or with a logged in user
=> Without this patch you got
  Template process failed: undef error - The method default is not
  covered by tests! at /home/vagrant/kohaclone/C4/Templates.pm line 121.
=> With this patch applied you should see the item type dropdown list
correctly filled

Reproduced without patch, OK with patch
Signed-off-by: Marc Véron <veron@veron.ch>
Comment 5 Julian Maurice 2017-05-11 10:08:05 UTC
QAing this now
Comment 6 Julian Maurice 2017-05-11 10:15:39 UTC
Created attachment 63379 [details] [review]
Bug 18573: (bug 17847 follow-up) Update av-build-dropbox.inc for OPAC

On bug 17847, av-build-dropbox.inc has been updated for the intranet,
not OPAC

There is only one call to av-build-dropbox.inc at the OPAC, from
opac-suggestion.tt

Test plan:
Create a new suggestion, anonymous or with a logged in user
=> Without this patch you got
  Template process failed: undef error - The method default is not
  covered by tests! at /home/vagrant/kohaclone/C4/Templates.pm line 121.
=> With this patch applied you should see the item type dropdown list
correctly filled

Reproduced without patch, OK with patch
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 7 Kyle M Hall 2017-05-12 12:46:45 UTC
Pushed to master for 17.05, thanks Jonathan!
Comment 8 Katrin Fischer 2017-05-14 09:47:29 UTC
Dependency is not part of 16.11.x, so this should not be needed there.