I am not able to use the feature on master when I follow these steps : 1) I set AllowOfflineCirculation to Enable. 2) I go to Circulation > Built-in offline circulation interface > Synchronize. 3) I click on "Download records" and dates appear like this : "2019-04-08 16:39:16 GMT-0400 (Eastern Daylight Time)". 4) I disable my internet connection. 5) I go to "https://your-koha-staff-client-url/cgi-bin/koha/circ/offline.pl". 6) I get a 404 page. It's likely the technology is no longer supported as windows.applicationCache is deprecated and cannot be used in a not secure context (http). I am not really sure if the problem comes from my koha or that, so I am asking the community if this feature still works. I tested an updated master in https on Firefox 66.0.2. Thank you for your feedbacks.
I can't replicate this. I am testing with current master in Firefox on Ubuntu without problems.
We are seeing similar issues on training servers and client production servers also. The built-in offline circ tool will not work without logging in. In my case, I download records for offline storage, and receive errors that the patron barcode is not found. I have confirmed that the barcode is correct and is being scanned/entered correctly. Seeing the same behavior on both Firefox and Chrome.
The offline circulation tool depends on a browser feature which is obsolete: applicationCache. It has been removed from the latest version of Chrome (94) and recent versions of Firefox (since version 81). Since the feature can still be used by some users if they have older browsers we can't remove it entirely. While we wait for a more broadly-compatible solution we should hide the feature in browsers which don't support it.
Created attachment 126433 [details] [review] Bug 22671: Show warning if browser doesn't support applicationCache This patch adds a check for browser support for the "applicationCache" feature required by the offline circulation tool. If the feature is not available, a message is shown to the user that offline circulation is disabled. To test, apply the patch and enable the AllowOfflineCirculation system preference. In a browser which supports applicationCache (Firefox < 81, Chrome < 94, Safari <= 15), go to Circulation -> Built-in offline circulation interface. - You should see the standard Offline Circulation menu options: Check out, check in, syncrhonize, etc. - Click "Synchronize," then "Download records." - The process should complete correctly, updating the "last synced" information on the page. Follow the same steps in a browser which has dropped support for applicationCache. As soon as you reach the built-in offline circulation page you should see a message, "Your browser is not compatible..."
(In reply to Owen Leonard from comment #4) > In a browser which supports applicationCache (Firefox < 81... MDN says "Warning: Application Cache is deprecated as of Firefox 44, and is no longer available in insecure contexts from Firefox 60 onwards." It's working for me now in Firefox 93 FWIW.
I tried to test, but didn't have much luck getting the in-built offline circulation tool to work. With the latest version of Firefox (93) + Firefox developer edition on Ubuntu 18.04: doesn't show the your browser is not supported message, when you go into synchronise > download is has a message "Downloading ..." and stays there with a progress icon. I couldn't work out how to install an earlier version of Firefox or Chromium browsers to test. For the latest versions of Google Chrome + Chromium the browser not supported message is shown.
Replying to myself, now realising it probably isn't working because KTD is in strict SQL mode...
Created attachment 129987 [details] [review] Bug 22671: Show warning if browser doesn't support applicationCache This patch adds a check for browser support for the "applicationCache" feature required by the offline circulation tool. If the feature is not available, a message is shown to the user that offline circulation is disabled. To test, apply the patch and enable the AllowOfflineCirculation system preference. In a browser which supports applicationCache (Firefox < 81, Chrome < 94, Safari <= 15), go to Circulation -> Built-in offline circulation interface. - You should see the standard Offline Circulation menu options: Check out, check in, syncrhonize, etc. - Click "Synchronize," then "Download records." - The process should complete correctly, updating the "last synced" information on the page. Follow the same steps in a browser which has dropped support for applicationCache. As soon as you reach the built-in offline circulation page you should see a message, "Your browser is not compatible..." Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Works as expected for me.. signing off.
Created attachment 130814 [details] [review] Bug 22671: Show warning if browser doesn't support applicationCache This patch adds a check for browser support for the "applicationCache" feature required by the offline circulation tool. If the feature is not available, a message is shown to the user that offline circulation is disabled. To test, apply the patch and enable the AllowOfflineCirculation system preference. In a browser which supports applicationCache (Firefox < 81, Chrome < 94, Safari <= 15), go to Circulation -> Built-in offline circulation interface. - You should see the standard Offline Circulation menu options: Check out, check in, syncrhonize, etc. - Click "Synchronize," then "Download records." - The process should complete correctly, updating the "last synced" information on the page. Follow the same steps in a browser which has dropped support for applicationCache. As soon as you reach the built-in offline circulation page you should see a message, "Your browser is not compatible..." Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Lazy to install an old browser, trusting author and tester. Warning display on an up-to-date FF. We could have added a link to https://developer.mozilla.org/docs/Web/API/Window/applicationCache to list the compatibility.
Pushed to master for 22.05, thanks to everybody involved [U+1F984]
Pushed to 21.11.x for 21.11.03
Pushed to 21.05.x for 21.05.12
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.