The current template uses a `[% STOP %]` statement that seems to break the `[% WRAPPER %]` flow, yielding an incomplete page. To reproduce: 1. Enable curbside pickups. 2. 'Activate' the 'CircSidebar' system preference. 3. Go to 'Circulation' > 'Curbside pickups' => FAIL: The circulation sidebar is not displayed.
Created attachment 183394 [details] [review] Bug 40206: Fix wrong layout in curbside pickups when 'CircSidebar' enabled This patch solves the following issues: * Template flow issue: the template called STOP which prevented the WRAPPER to complete and affected how things were rendered. * Redirect to 404 if feature disabled. This is common practice in other modules. The fact things can be executed even with the feature disabled is not ok (syspref). * Shortcircuit earlier. Similar to the above, if the feature is disabled for the current branch, no DB queries and stuff should take place. Notice the lack of checks actually makes the controller perform the actions. It is just that it is not displayed afterwards! To test: 1. Enable the `CurbsidePickup` syspref. 2. 'Activate' the `CircSidebar` syspref. 3. Be on a branch that doesn't have them enabled 4. Go to Circulation > Check in => SUCCESS: A nice left-hand sidebar is displayed with access to Circulation actions 5. Click on 'Curbside pickups' => FAIL: The sidebar doesn't display. boo! 6. Apply this patch 7. Restart plack $ ktd --shell k$ koha-plack --restart kohadev 8. Repeat 4 => SUCCESS: It renders much better! 9. Sign off :-D
Created attachment 183399 [details] [review] Bug 40206: Fix wrong layout in curbside pickups when 'CircSidebar' enabled This patch solves the following issues: * Template flow issue: the template called STOP which prevented the WRAPPER to complete and affected how things were rendered. * Redirect to 404 if feature disabled. This is common practice in other modules. The fact things can be executed even with the feature disabled is not ok (syspref). * Shortcircuit earlier. Similar to the above, if the feature is disabled for the current branch, no DB queries and stuff should take place. Notice the lack of checks actually makes the controller perform the actions. It is just that it is not displayed afterwards! To test: 1. Enable the `CurbsidePickup` syspref. 2. 'Activate' the `CircSidebar` syspref. 3. Be on a branch that doesn't have them enabled 4. Go to Circulation > Check in => SUCCESS: A nice left-hand sidebar is displayed with access to Circulation actions 5. Click on 'Curbside pickups' => FAIL: The sidebar doesn't display. boo! 6. Apply this patch 7. Restart plack $ ktd --shell $ koha-plack --restart kohadev 8. Repeat 4 => SUCCESS: It renders much better! 9. Sign off :-D Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I don't think redirect to 404 is a consistent behaviour. We do that at the OPAC, not for staff. I think we need to link to the admin page. Or the syspref: koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt: <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ExtendedPatronAttributes">ExtendedPatronAttributes</a> system preference if you wish to enable this feature.</div