Images are '404 Not Found' on datatables.net.
Images are '404 Not Found' on datatables.net.
bigsipper
Posts: 31Questions: 2Answers: 0
I am waiting for the 2.1.6-dev TableTools package... but for now, I am using nightly builds:
[code]
[/code]
In the Firefox console, I am getting this error:
"NetworkError: 404 Not Found - http://datatables.net/download/build/images/sort_asc.png" sort_asc.png
"NetworkError: 404 Not Found - http://datatables.net/download/build/images/sort_both.png" sort_both.png
Can this be fixed, or is there a way I can work around it? My columns are not showing the 'sort' buttons and I need
this functionality.
-Bigsipper
[code]
[/code]
In the Firefox console, I am getting this error:
"NetworkError: 404 Not Found - http://datatables.net/download/build/images/sort_asc.png" sort_asc.png
"NetworkError: 404 Not Found - http://datatables.net/download/build/images/sort_both.png" sort_both.png
Can this be fixed, or is there a way I can work around it? My columns are not showing the 'sort' buttons and I need
this functionality.
-Bigsipper
This discussion has been closed.
Replies
I am going to launch a DataTables specific CDN along with 1.10, but for now, I would strongly suggest not using the files hosted here for anything other than trivial development.
Allan
So, I'm getting the same issue; my scenario was that I was using 1.9.x, then upgraded to 1.10; then I saw the 404 error mentioned above. I'm using the jQuery UI ui-lightness theme. ( "bJQueryUI": true ). I had never got these errors previously (under data tables 1.9.x). I thought, maybe I need to grab the latest CSS file; tried that; same error; then I thought, I'll just grab the images from the download's "images" directory. That fixes the 404 error, but then superimposes an ugly offset version of the column header sort ascending / descending icon over the existing ones (which are presumably coming from the jQuery UI theme). So it seems maybe the error is not in that we are erroneously using the images when we shouldn't be; it's perhaps that the CSS file is erroneously referencing those images? (The following comes from jquery.dataTables.css ):
table.dataTable thead .sorting {
background: url("../images/sort_both.png") no-repeat center right;
}
Thank you, -Dave
Further info... I'm also experimenting with converting one of my tables to server-side (ajax) processing; it's on that table that the 404 error occurs... will give further info as I learn more...
Are you using the nightly CSS file? If so, change to the CDN version as I suggest above and it should start working.
Allan
Allan, thanks for your response. I'm experimenting now with pointing to the CDN versions of the JS and CSS files.
But, what about the use of jQuery UI themes? Previously my use of the jQuery UI "ui-lightness" theme seemed to more peacefully co-exist with the jQuery.datatables.css file; now, when I point to the CDN files (in combination with the jQuery UI themeroller themes which I have locally), I'm seeing things like icons superimposing themselves on each other (e.g. the column header "north / south" icons). I was previously pointing to local versions of both the jQuery.datatables.css file and the jquery.dataTables_themeroller.css, as well as the custom themeroller (ui-lightness) themes from jQuery UI. This all seemed to work well. Is there a CDN version of the jquery.dataTables_themeroller.css, or is there a bit of documentation I haven't read properly? Thanks for your help.
Regards,
Dave
Yes:
I would recommend the first one. Although the jQuery UI integration is part of DataTables 1.10 core, it is decremented and will be removed in 1.10 in favour of plug-ins in the same way as Bootstrap and Foundation works.
If you are using the theme roller CSS files, just include that CSS - don't include the plain DataTables CSS as they will over lap. There is some more information available in the manual.
Regards,
Allan
very helpful, thank you very much
Dave
One more thought on this topic; in the previous version of the theme roller CSS file I was using in conjunction with jQuery's UI lightness theme, it was rendering some nice light purple / dark purple striping on the odd / even table rows; that's gone away now that I'm using the CDN version (using the 1st one as you recommended, but doesn't seem to matter; neither version renders purple; the table rows are dark or light grey now). Anyway this is fine; I decided the improved long-term support was more important than the purple color; just thought I'd mention it.
Regards, Dave
The purple colour was removed from the stylesheet as part of my restyling work for 1.10. The light grey is used instead now. If you want to change the background colour for the stripe rows, you can do so in the CSS - however it might be easier to use the SCSS file and compile that as it will deal with all the column highlighting etc for you.
Allan
thanks again Allan