Bug 7853 - opac-maintanance.pl should correctly redirect back to opac-main.pl, if no updates are outstanding
Summary: opac-maintanance.pl should correctly redirect back to opac-main.pl, if no upd...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Mason James
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-30 02:18 UTC by Mason James
Modified: 2014-05-26 21:04 UTC (History)
2 users (show)

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


Attachments
Bug 7853 - opac-maintanance.pl should correctly redirect back to opac-main.pl, if no updates are outstanding (1.35 KB, patch)
2013-04-02 08:22 UTC, Mason James
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 7853 - opac-maintanance.pl should correctly redirect back to opac-main.pl, if no updates are outstanding (1.50 KB, patch)
2013-04-02 14:14 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 7853 - opac-maintanance.pl should correctly redirect back to opac-main.pl, if no updates are outstanding (1.59 KB, patch)
2013-04-03 09:17 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 7853 - opac-maintanance.pl should correctly redirect back to opac-main.pl, if no updates are outstanding (1.68 KB, patch)
2013-04-04 11:24 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mason James 2012-03-30 02:18:20 UTC
opac-maintanance.pl should correctly redirect back to opac-main.pl, if no updates are outstanding

because of this bug, it's possible for the system to appear unavailable after an update, when it is actually available

a redirect from opac-maintance.pl would fix this problem :)
Comment 1 Mason James 2012-03-30 02:20:15 UTC
(In reply to comment #0)
> opac-maintanance.pl should correctly redirect back to opac-main.pl, if no
> updates are outstanding
> 
> because of this bug, it's possible for the system to appear unavailable
> after an update, when it is actually available
> 
> a redirect from opac-maintance.pl would fix this problem :)

oops, i speld 'maintenance' worng 3 times... :p
Comment 2 Mason James 2013-04-02 08:22:40 UTC Comment hidden (obsolete)
Comment 3 Mason James 2013-04-02 09:21:13 UTC
(In reply to comment #2)
> Created attachment 17112 [details] [review] [review]
> Bug 7853 - opac-maintanance.pl should correctly redirect back to
> opac-main.pl, if no updates are outstanding

to test, 

before patch is applied…

1/ edit your 'version' syspref and make your version just less that it currently is

so from 3.1200202 to to 3.1200201, (your version number may be differnt to mine)

2/ load your OPAC url in a browser, you should be redirected to the 'OPAC maintenance' page (leave this window/tab open)

3/ change your version syspref back to the original number

4/ reload your 'OPAC maintenance' page, it should *not* return to OPAC page
(fyi, this is the bug)

5/ apply patch

6/ repeat steps 1 thru 3 

7/ reload your 'OPAC maintenance' page, it should now redirect to the OPAC page
( bug is now fixed)
Comment 4 Owen Leonard 2013-04-02 14:14:50 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2013-04-03 09:15:52 UTC
QA comment:
A use case is not supported:
I am going to make a maintenance operation on a server, I switch on the syspref  OpacMaintenance. opac-main redirects on opac-maintenance and opac-maintenance redirects to opac-main :)

Marked as Failed QA.
Comment 6 Jonathan Druart 2013-04-03 09:17:02 UTC
The fix is easy, I will provide a new patch.
Comment 7 Jonathan Druart 2013-04-03 09:17:40 UTC Comment hidden (obsolete)
Comment 8 Marcel de Rooy 2013-04-04 11:24:44 UTC
Created attachment 17188 [details] [review]
Bug 7853 - opac-maintanance.pl should correctly redirect back to opac-main.pl, if no updates are outstanding

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

Works exactly as it should according to the test plan. This is a nice
improvement.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: Check OpacMaintenance!

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Marcel de Rooy 2013-04-04 11:29:40 UTC
QA Comment:
Not really anything to say. Nice patch. Now I just need to refresh and come back to opac as soon as maintenance finished.

Just for the record and a formality: Jonathan, I would have preferred a followup adding the necessary OpacMaintenance test. (Have amended in the past too much too :)

And if somebody likes to add a followup.. Why not say that kohaversion must be koha_db_version? In the very exceptional case that kohaversion=3.10 and db version= 3.12, something goes wrong. Wouldn't that be safe to go to maintenance as well?

Passed QA
Comment 10 Marcel de Rooy 2013-04-04 11:31:06 UTC
(In reply to comment #9)
> And if somebody likes to add a followup.. Why not say that kohaversion must
> be koha_db_version? In the very exceptional case that kohaversion=3.10 and
> db version= 3.12, something goes wrong. Wouldn't that be safe to go to
> maintenance as well?

Added note: I changed this in the code when testing. It is a different thing coming there..
Comment 11 Mason James 2013-04-04 19:18:48 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > And if somebody likes to add a followup.. Why not say that kohaversion must
> > be koha_db_version? In the very exceptional case that kohaversion=3.10 and
> > db version= 3.12, something goes wrong. Wouldn't that be safe to go to
> > maintenance as well?
> 
> Added note: I changed this in the code when testing. It is a different thing
> coming there..

hmmm, a good question Marcel, but i think this is a bad idea...

there are valid/legitimate situations both for production and dev/testing usage, where people may want to load a newer db onto an older Koha codebase.

your proposed change would stop this from happening
Comment 12 Mason James 2013-04-04 19:20:16 UTC
(In reply to comment #5)
> QA comment:
> A use case is not supported:
> I am going to make a maintenance operation on a server, I switch on the
> syspref  OpacMaintenance. opac-main redirects on opac-maintenance and
> opac-maintenance redirects to opac-main :)
> 

thanks for spotting this Jonathan, and the patch too :)
Comment 13 Marcel de Rooy 2013-04-05 07:18:00 UTC
(In reply to comment #11)
> there are valid/legitimate situations both for production and dev/testing
> usage, where people may want to load a newer db onto an older Koha codebase.

no problem. Hope that those people know what they are doing :)
Comment 14 Jared Camins-Esakov 2013-04-07 17:34:26 UTC
This patch has been pushed to master and 3.12.x.