Bug 8705 - Software error on help of main page
Summary: Software error on help of main page
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: 3.8
Hardware: All All
: P5 - low normal (vote)
Assignee: Fridolin SOMERS
QA Contact: Mason James
URL:
Keywords:
: 7623 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-08-30 16:41 UTC by Fridolin SOMERS
Modified: 2013-12-05 19:57 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Proposed patch (661 bytes, patch)
2012-08-30 16:45 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 8705: Software error on help of main page (764 bytes, patch)
2012-08-30 17:05 UTC, Owen Leonard
Details | Diff | Splinter Review
Proposed patch (revised) (1.25 KB, patch)
2012-08-31 15:01 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Proposed patch (revised 2) (1.24 KB, patch)
2012-08-31 16:36 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Bug 8705: Software error on help of main page (1.30 KB, patch)
2012-09-03 08:13 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 Fridolin SOMERS 2012-08-30 16:41:52 UTC
Main page help brakes when URL is default page : www.site.com/, linked to www.site.com/cgi-bin/koha/mainpage.pl
Comment 1 Fridolin SOMERS 2012-08-30 16:45:00 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2012-08-30 16:50:36 UTC
*** Bug 7623 has been marked as a duplicate of this bug. ***
Comment 3 Owen Leonard 2012-08-30 17:05:57 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2012-08-31 13:57:05 UTC
Hum... Ok it is a simple patch and currently, it works.
But if someone adds a test before, this one will not save.

I can't explain that... an example will be more meaningful:

my $s = "aaa";
$s =~ m/a(.)a/;
say $1;

=> display "a"

But!

my $s = "aaa";
$s =~ m/a(.)a/;
say $1;
$s =~ m/b(.)b/;
say $1

=> display "a" x 2
$1 is defined in the second case.

We have to test with a if when we want used $1

I don't mark it as Failed QA because this patch does not introduce this, but a followup is highly welcomed :)
Comment 5 Fridolin SOMERS 2012-08-31 15:01:55 UTC Comment hidden (obsolete)
Comment 6 Fridolin SOMERS 2012-08-31 15:03:53 UTC
(In reply to comment #4)
I understand, $1 should only be used if pattern matches.
I revised patch to wrap help template from URL behavior into a sub.
Comment 7 Jonathan Druart 2012-08-31 15:19:49 UTC
Sorry but

critic                      FAIL
Subroutine prototypes used at line 28, column 1.  See page 194 of PBP.  (Severity: 5)
Comment 8 Fridolin SOMERS 2012-08-31 16:36:09 UTC Comment hidden (obsolete)
Comment 9 Jonathan Druart 2012-09-03 08:13:06 UTC
Created attachment 11944 [details] [review]
Bug 8705: Software error on help of main page

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 10 Jonathan Druart 2012-09-03 08:13:54 UTC
It's ok for me.
Comment 11 Mason James 2012-09-14 15:07:09 UTC
> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

patch looks good, passing QA…

$ koha-qa.pl 

testing 1 commit(s) (applied to commit 0acebb8)
 * 6980862 Bug 8705: Software error on help of main page
      help.pl

* help.pl                                                                  OK
Comment 12 Paul Poulain 2012-09-17 16:25:02 UTC
Patch pushed to master
Comment 13 Chris Cormack 2012-09-18 09:50:55 UTC
Pushed to 3.8.x, will be in 3.8.5