Bug 26471 - Datatables js error on missing pdfmake.min.js.map
Summary: Datatables js error on missing pdfmake.min.js.map
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-16 13:52 UTC by Marcel de Rooy
Modified: 2021-05-25 14:35 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
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 (948.78 KB, patch)
2021-02-09 15:21 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 26471: Remove invalid Map URL (948.84 KB, patch)
2021-04-07 07:36 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 26471: Remove invalid Map URL (948.84 KB, patch)
2021-04-07 07:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 26471: Remove invalid Map URL (948.84 KB, patch)
2021-04-07 07:41 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 26471: Remove invalid Map URL (948.84 KB, patch)
2021-04-07 08:02 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 26471: Remove invalid Map URL (948.90 KB, patch)
2021-05-07 14:16 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.