Bug 20068 - Warn on OPAC homepage if not logged in due to OPAC dashboard
Summary: Warn on OPAC homepage if not logged in due to OPAC dashboard
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor (vote)
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 2093
Blocks:
  Show dependency treegraph
 
Reported: 2018-01-22 23:52 UTC by Aleisha Amohia
Modified: 2018-02-08 09:47 UTC (History)
3 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 20068: Check if user logged in before passing dashboard params to template (2.80 KB, patch)
2018-01-22 23:54 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 20068: Check if user logged in before passing dashboard params to template (2.88 KB, patch)
2018-01-23 12:34 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 Aleisha Amohia 2018-01-22 23:52:04 UTC
If accessing the OPAC homepage while not logged in, the following warn shows:
Use of uninitialized value $overdues_count in numeric gt (>) at /home/vagrant/kohaclone/opac/opac-main.pl line 76.
Comment 1 Aleisha Amohia 2018-01-22 23:54:14 UTC
Created attachment 70814 [details] [review]
Bug 20068: Check if user logged in before passing dashboard params to template

This prevents warns from dashboard variables when not logged in

To test:
1) Go to OPAC main homepage. Do not log in
2) Notice warn
3) Apply patch and refresh
4) Warn should be gone
5) Log in
6) Confirm dashboard shows as normal

Sponsored-by: Catalyst IT
Comment 2 Jonathan Druart 2018-01-23 12:34:41 UTC
Created attachment 70822 [details] [review]
Bug 20068: Check if user logged in before passing dashboard params to template

This prevents warns from dashboard variables when not logged in

To test:
1) Go to OPAC main homepage. Do not log in
2) Notice warn
3) Apply patch and refresh
4) Warn should be gone
5) Log in
6) Confirm dashboard shows as normal

Sponsored-by: Catalyst IT

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Jonathan Druart 2018-01-23 12:35:55 UTC
I have already written this change on bug 12001 and bug 19938 so I guess it is good to have it on its own bug report.
Comment 4 Jonathan Druart 2018-01-23 19:06:33 UTC
Skipping QA.
Comment 5 Jonathan Druart 2018-01-30 15:49:21 UTC
Pushed to master for 18.05
Comment 6 Nick Clemens 2018-02-02 17:02:27 UTC
Awesome work all! Pushed to stable for 17.11.03
Comment 7 Fridolin SOMERS 2018-02-08 09:47:59 UTC
Bug 2093 not in 17.05.x