Bug 28193

Summary: OpacLoginInstructions news block broken by Bug 20168
Product: Koha Reporter: Owen Leonard <oleonard>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Kyle M Hall (khall) <kyle>
Severity: major    
Priority: P5 - low CC: andrew, fridolin.somers, kyle
Version: MainKeywords: rel_20_11_candidate
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.06
Circulation function:
Bug Depends on: 20168    
Bug Blocks:    
Attachments: Bug 28193: OpacLoginInstructions news block broken by Bug 20168
Bug 28193: OpacLoginInstructions news block broken by Bug 20168
Bug 28193: (follow-up) Correct OpacLoginInstructions in login modal
Bug 28193: OpacLoginInstructions news block broken by Bug 20168
Bug 28193: (follow-up) Correct OpacLoginInstructions in login modal
Bug 28193: OpacLoginInstructions news block broken by Bug 20168
Bug 28193: (follow-up) Correct OpacLoginInstructions in login modal

Description Owen Leonard 2021-04-22 13:21:32 UTC
Bug 18506 introduced a regression in the opac-auth template, undoing the changes made by Bug 23797
Comment 1 Owen Leonard 2021-04-22 13:28:01 UTC
Whoops, I've falsely accused Bug 18506. Git blames me! Bug 20168!
Comment 2 Owen Leonard 2021-04-22 14:59:11 UTC
Created attachment 120008 [details] [review]
Bug 28193: OpacLoginInstructions news block broken by Bug 20168

This patch fixes a regression which was introduced by Bug 20168, causing
the OpacLoginInstructions template code to revert back to the old system
preference behavior. This patch returns the correct markup.

To test, apply the patch and view the OPAC login page
(/cgi-bin/koha/opac-user.pl)

 - With no news entry for OpacLoginInstructions you should see the
   default: A block of text with two headings, "Don't have a password
   yet?" and "Don't have a library card?"
 - Go to Tools -> News and create an entry for OpacLoginInstructions.
 - Return to the OPAC and confirm that your custom text appears.
 - Try updating/installing another translation and adding a different
   news entry for that language. Confirm that the correct entry appears.
Comment 3 David Nind 2021-04-22 20:38:09 UTC
Created attachment 120026 [details] [review]
Bug 28193: OpacLoginInstructions news block broken by Bug 20168

This patch fixes a regression which was introduced by Bug 20168, causing
the OpacLoginInstructions template code to revert back to the old system
preference behavior. This patch returns the correct markup.

To test, apply the patch and view the OPAC login page
(/cgi-bin/koha/opac-user.pl)

 - With no news entry for OpacLoginInstructions you should see the
   default: A block of text with two headings, "Don't have a password
   yet?" and "Don't have a library card?"
 - Go to Tools -> News and create an entry for OpacLoginInstructions.
 - Return to the OPAC and confirm that your custom text appears.
 - Try updating/installing another translation and adding a different
   news entry for that language. Confirm that the correct entry appears.

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Katrin Fischer 2021-04-22 21:32:29 UTC
Owen, a git grep still reveals some references to the system preference:

koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc:  
[% IF Koha.Preference( 'OpacLoginInstructions' ) %]

Can you please check?
Comment 5 Owen Leonard 2021-04-23 00:23:12 UTC
Created attachment 120037 [details] [review]
Bug 28193: (follow-up) Correct OpacLoginInstructions in login modal
Comment 6 Kyle M Hall (khall) 2021-04-23 13:15:52 UTC
Created attachment 120095 [details] [review]
Bug 28193: OpacLoginInstructions news block broken by Bug 20168

This patch fixes a regression which was introduced by Bug 20168, causing
the OpacLoginInstructions template code to revert back to the old system
preference behavior. This patch returns the correct markup.

To test, apply the patch and view the OPAC login page
(/cgi-bin/koha/opac-user.pl)

 - With no news entry for OpacLoginInstructions you should see the
   default: A block of text with two headings, "Don't have a password
   yet?" and "Don't have a library card?"
 - Go to Tools -> News and create an entry for OpacLoginInstructions.
 - Return to the OPAC and confirm that your custom text appears.
 - Try updating/installing another translation and adding a different
   news entry for that language. Confirm that the correct entry appears.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: John Doe <you@example.com>
Comment 7 Kyle M Hall (khall) 2021-04-23 13:16:04 UTC
Created attachment 120096 [details] [review]
Bug 28193: (follow-up) Correct OpacLoginInstructions in login modal

Signed-off-by: John Doe <you@example.com>
Comment 8 Kyle M Hall (khall) 2021-04-23 13:23:26 UTC
Created attachment 120097 [details] [review]
Bug 28193: OpacLoginInstructions news block broken by Bug 20168

This patch fixes a regression which was introduced by Bug 20168, causing
the OpacLoginInstructions template code to revert back to the old system
preference behavior. This patch returns the correct markup.

To test, apply the patch and view the OPAC login page
(/cgi-bin/koha/opac-user.pl)

 - With no news entry for OpacLoginInstructions you should see the
   default: A block of text with two headings, "Don't have a password
   yet?" and "Don't have a library card?"
 - Go to Tools -> News and create an entry for OpacLoginInstructions.
 - Return to the OPAC and confirm that your custom text appears.
 - Try updating/installing another translation and adding a different
   news entry for that language. Confirm that the correct entry appears.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 9 Kyle M Hall (khall) 2021-04-23 13:23:37 UTC
Created attachment 120098 [details] [review]
Bug 28193: (follow-up) Correct OpacLoginInstructions in login modal

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 10 Jonathan Druart 2021-04-27 14:26:12 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 11 Fridolin Somers 2021-04-30 08:35:20 UTC
Pushed to 20.11.x for 20.11.06
Comment 12 Andrew Fuerste-Henry 2021-05-24 18:22:41 UTC
Missing dependency, not pushed to 20.05