Bug 26471

Summary: Datatables js error on missing pdfmake.min.js.map
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: TemplatesAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: agustinmoyano, andrewfh, david, fridolin.somers, jonathan.druart, martin.renvoize, oleonard, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.06,20.05.12
Attachments: Bug 26471: Remove invalid Map URL
Bug 26471: Remove invalid Map URL
Bug 26471: Remove invalid Map URL
Bug 26471: Remove invalid Map URL
Bug 26471: Remove invalid Map URL
Bug 26471: Remove invalid Map URL

Description Marcel de Rooy 2020-09-16 13:52:25 UTC
Seeing this error in the Firefox console on a page with a datatables table (e.g. admin/z3950servers.pl)

Fout bij brontoewijzing: Error: request failed with status 404
Bron-URL: https://dev.rijkskoha.nl:28443/intranet-tmpl/lib/datatables/datatables.min_20.0600037.js
Brontoewijzings-URL: pdfmake.min.js.map

Compare with an older mention of this error from bug 15400:
> I'm getting a different error that I'm not sure how to fix
> 
> Source map error: Error: request failed with status 404
> Resource URL:
> http://localhost:8081/intranet-tmpl/lib/datatables/datatables.min_19.1200060.
> js
> Source Map URL: pdfmake.min.js.map

I am kind of lost in datatables land. It is a nightmare component imo.
Comment 1 Marcel de Rooy 2020-09-16 13:53:36 UTC
But on catalogue/detail.pl too etc.
Comment 2 Jonathan Druart 2021-02-09 15:21:54 UTC
Created attachment 116587 [details] [review]
Bug 26471: Remove invalid Map URL

There is a warning in the console:
Error en el mapeo fuente: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
URL del recurso: http://kohadev-intra.mydnsname.org:8081/intranet-tmpl/lib/datatables/datatables.min_20.1200011.js
URL del mapa fuente: pdfmake.min.js.map

https://developer.mozilla.org/en-US/docs/Tools/Debugger/Source_map_errors
Comment 3 David Nind 2021-04-06 20:21:04 UTC
I'm not seeing this error on my setup (Ubuntu 18.04, Firefox Developer Edition and v87 (64 bit edition).
Comment 4 Martin Renvoize 2021-04-07 07:36:24 UTC
Created attachment 119247 [details] [review]
Bug 26471: Remove invalid Map URL

There is a warning in the console:
Error en el mapeo fuente: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
URL del recurso: http://kohadev-intra.mydnsname.org:8081/intranet-tmpl/lib/datatables/datatables.min_20.1200011.js
URL del mapa fuente: pdfmake.min.js.map

https://developer.mozilla.org/en-US/docs/Tools/Debugger/Source_map_errors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize 2021-04-07 07:37:38 UTC
Created attachment 119248 [details] [review]
Bug 26471: Remove invalid Map URL

There is a warning in the console:
Error en el mapeo fuente: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
URL del recurso: http://kohadev-intra.mydnsname.org:8081/intranet-tmpl/lib/datatables/datatables.min_20.1200011.js
URL del mapa fuente: pdfmake.min.js.map

https://developer.mozilla.org/en-US/docs/Tools/Debugger/Source_map_errors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2021-04-07 07:41:39 UTC
Created attachment 119249 [details] [review]
Bug 26471: Remove invalid Map URL

There is a warning in the console:
Error en el mapeo fuente: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
URL del recurso: http://kohadev-intra.mydnsname.org:8081/intranet-tmpl/lib/datatables/datatables.min_20.1200011.js
URL del mapa fuente: pdfmake.min.js.map

https://developer.mozilla.org/en-US/docs/Tools/Debugger/Source_map_errors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2021-04-07 08:02:38 UTC
Created attachment 119250 [details] [review]
Bug 26471: Remove invalid Map URL

There is a warning in the console:
Error en el mapeo fuente: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
URL del recurso: http://kohadev-intra.mydnsname.org:8081/intranet-tmpl/lib/datatables/datatables.min_20.1200011.js
URL del mapa fuente: pdfmake.min.js.map

https://developer.mozilla.org/en-US/docs/Tools/Debugger/Source_map_errors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize 2021-04-07 08:05:46 UTC
oop.. I was getting 504 responses in git-bz, but it looks like the patches were actually getting through in the end anyway!

This does resolve the problem (Can be seen in the console in Chrome 89).

I wonder however, if rather than edit the file directly we should use the datatables builder to grab an up to date copy of the files?
Comment 9 Nick Clemens 2021-05-07 14:16:59 UTC
Created attachment 120695 [details] [review]
Bug 26471: Remove invalid Map URL

There is a warning in the console:
Error en el mapeo fuente: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
URL del recurso: http://kohadev-intra.mydnsname.org:8081/intranet-tmpl/lib/datatables/datatables.min_20.1200011.js
URL del mapa fuente: pdfmake.min.js.map

https://developer.mozilla.org/en-US/docs/Tools/Debugger/Source_map_errors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 10 Jonathan Druart 2021-05-10 14:17:50 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 11 Fridolin Somers 2021-05-12 14:24:13 UTC
Pushed to 20.11.x for 20.11.06
Comment 12 Andrew Fuerste-Henry 2021-05-25 12:23:54 UTC
Pushed to 20.05.x for 20.05.12
Comment 13 Victor Grousset/tuxayo 2021-05-25 14:35:56 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.