We've noticed some interesting problems since upgrading to 22.11.04 that seem related to CSS and JS not compiling or being access correctly. Examples that have been reported: - the calendar icon that shows in the flatpickr text input fields does not show to reproduce: go to add or edit an item under a biblio. the date acquired field uses the flatpickr date picker, but the calendar icon that usually shows inside the input field on the left is invisible. - making return claims on the checkouts page shows the 'loading' icon forever, have to refresh the page to show the claim to reproduce: set the ClaimReturnedLostValue system preference. check out an item, then do a return claim. once the button is clicked, it looks like it keeps loading or processing until you refresh the page Any advice would be appreciated Thanks Aleisha
(In reply to Aleisha Amohia from comment #0) > - the calendar icon that shows in the flatpickr text input fields does not > show I decided to look at the calendar icon since it was the easiest thing to look at. It's a SVG which appears to be defined in ./koha-tmpl/opac-tmpl/bootstrap/css/src/_flatpickr.scss When I try to access the SVG in 22.11.04, I get an error page that says: "error on line 1 at column 70: AttValue: ' expected" Comparing between 22.11.03 and 22.11.04, there does seem to be an encoding difference. In 22.11.03: data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23369' class='bi bi-calendar3'%3E%3Cg stroke-width='1.333'%3E%3Cpath d='M10.5 0h-9A1.5 1.5 0 0 0 0 1.5v9A1.5 1.5 0 0 0 1.5 12h9a1.5 1.5 0 0 0 1.5-1.5v-9A1.5 1.5 0 0 0 10.5 0zM.75 2.893c0-.355.336-.643.75-.643h9c.414 0 .75.288.75.643v7.714c0 .355-.336.643-.75.643h-9c-.414 0-.75-.288-.75-.643z'/%3E%3Cpath d='M4.875 5.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5zm2.25 0a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5zm2.25 0a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5zM2.625 7.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5zm2.25 0a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5zm2.25 0a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5zm2.25 0a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5zm-6.75 2.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5zm2.25 0a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5zm2.25 0a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5z'/%3E%3C/g%3E%3C/svg%3E In 22.11.04: data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='#369'%20class='bi%20bi-calendar3'%3E%3Cg%20stroke-width='1.333'%3E%3Cpath%20d='M10.5%200h-9A1.5%201.5%200%200%200%200%201.5v9A1.5%201.5%200%200%200%201.5%2012h9a1.5%201.5%200%200%200%201.5-1.5v-9A1.5%201.5%200%200%200%2010.5%200zM.75%202.893c0-.355.336-.643.75-.643h9c.414%200%20.75.288.75.643v7.714c0%20.355-.336.643-.75.643h-9c-.414%200-.75-.288-.75-.643z'/%3E%3Cpath%20d='M4.875%205.25a.75.75%200%201%200%200-1.5.75.75%200%200%200%200%201.5zm2.25%200a.75.75%200%201%200%200-1.5.75.75%200%200%200%200%201.5zm2.25%200a.75.75%200%201%200%200-1.5.75.75%200%200%200%200%201.5zM2.625%207.5a.75.75%200%201%200%200-1.5.75.75%200%200%200%200%201.5zm2.25%200a.75.75%200%201%200%200-1.5.75.75%200%200%200%200%201.5zm2.25%200a.75.75%200%201%200%200-1.5.75.75%200%200%200%200%201.5zm2.25%200a.75.75%200%201%200%200-1.5.75.75%200%200%200%200%201.5zm-6.75%202.25a.75.75%200%201%200%200-1.5.75.75%200%200%200%200%201.5zm2.25%200a.75.75%200%201%200%200-1.5.75.75%200%200%200%200%201.5zm2.25%200a.75.75%200%201%200%200-1.5.75.75%200%200%200%200%201.5z'/%3E%3C/g%3E%3C/svg%3E
The problem in 22.11.04 is the hash (ie #) in the fill...
Bug 32978 changed from node-sass to dart-sass. My guess is that is what is encoding the SCSS files differently. I think the fix is probably to change fill='#369' to fill='%23369' in ./koha-tmpl/opac-tmpl/bootstrap/css/src/_flatpickr.scss
(In reply to Aleisha Amohia from comment #0) > to reproduce: set the ClaimReturnedLostValue system preference. check out an > item, then do a return claim. once the button is clicked, it looks like it > keeps loading or processing until you refresh the page There is a Javascript error that shows up in the console: circulation.pl:1365 Uncaught TypeError: value.match is not a function at window.$date (circulation.pl:1365:26) at window.$datetime (circulation.pl:1384:20) at Object.success (circulation.pl:1855:33) at c (jquery-3.6.0.min_22.1104000.js:2:28327) at Object.fireWith [as resolveWith] (jquery-3.6.0.min_22.1104000.js:2:29072) at l (jquery-3.6.0.min_22.1104000.js:2:79901) at XMLHttpRequest.<anonymous> (jquery-3.6.0.min_22.1104000.js:2:82355) It looks like it's just a bug in some Javascript in circulation.pl or with the API /api/v1/return_claims. As often happens in Koha, there isn't enough error checking/handling. I'll leave that one for you to investigate.
Thanks David, I'll rename this bug report to be about the return claim bug as Bug 33615 was made about the flatpickr icon.
(In reply to Aleisha Amohia from comment #5) > Thanks David, I'll rename this bug report to be about the return claim bug > as Bug 33615 was made about the flatpickr icon. Sounds good
Created attachment 150263 [details] [review] Bug 33621: Fix claim return
I guess this has been caused by bug 30310.
Created attachment 150322 [details] [review] Bug 33621: Fix claim return To test: 1. Set the CaimReturnedLostValue system preference to one of your LOST authorised values 2. Check out an item 3. In the checkouts table, claim return 4. Notice the processing icon keeps spinning 5. Apply the patch 6. Check in the item and resolve the return claim to clear it 7. Check out an item 8. In the checkouts table, claim return 9. Confirm the checkouts table reloads and the return is claimed as expected Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Please ensure this patch is backported to 22.11.x
let formated_date = $datetime(data.created_on); Typo formatted. But what is $datetime ??
Created attachment 150360 [details] [review] Bug 33621: Fix claim return To test: 1. Set the CaimReturnedLostValue system preference to one of your LOST authorised values 2. Check out an item 3. In the checkouts table, claim return 4. Notice the processing icon keeps spinning 5. Apply the patch 6. Check in the item and resolve the return claim to clear it 7. Check out an item 8. In the checkouts table, claim return 9. Confirm the checkouts table reloads and the return is claimed as expected Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 150361 [details] [review] Bug 33621: (QA follow-up) Typo formated_date Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(In reply to Marcel de Rooy from comment #11) > > But what is $datetime ?? Ah, I found him: window.$datetime = function(value, options) { options = options||{}; options.withtime = true; return $date(value, options); }; window.$date = function(value, options) { ETC
*** Bug 33616 has been marked as a duplicate of this bug. ***
Pushed to master for 23.05. Nice work everyone, thanks!
Many hands makes light work, thankyou everyone! Pushed to 22.11.x for the next release
I cannot recreate this in 22.05.x, no backport.
*** Bug 33805 has been marked as a duplicate of this bug. ***