Images are '404 Not Found' on datatables.net.

Images are '404 Not Found' on datatables.net.

bigsipperbigsipper Posts: 31Questions: 2Answers: 0
edited January 2014 in DataTables 1.9
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

Replies

  • allanallan Posts: 63,488Questions: 1Answers: 10,467 Site admin
    edited January 2014
    I would very very strongly suggest against including content from //datatables.net - it is not designed to be a CDN server! Also, you would have no control over the files, so when I update them to have different names (which I am about to do as it happens) or should I ever break something accidentally or intentionally, you would have no control over that.

    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
  • bigsipperbigsipper Posts: 31Questions: 2Answers: 0
    Ok. I'll download and install locally. I only linked to datatables.net remotely as a proof of concept development.
  • DavidBarrowsDavidBarrows Posts: 8Questions: 1Answers: 0

    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

  • DavidBarrowsDavidBarrows Posts: 8Questions: 1Answers: 0

    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...

  • allanallan Posts: 63,488Questions: 1Answers: 10,467 Site admin

    Are you using the nightly CSS file? If so, change to the CDN version as I suggest above and it should start working.

    Allan

  • DavidBarrowsDavidBarrows Posts: 8Questions: 1Answers: 0

    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

  • allanallan Posts: 63,488Questions: 1Answers: 10,467 Site admin
    edited May 2014

    Is there a CDN version of the jquery.dataTables_themeroller.css

    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

  • DavidBarrowsDavidBarrows Posts: 8Questions: 1Answers: 0

    very helpful, thank you very much

    Dave

  • DavidBarrowsDavidBarrows Posts: 8Questions: 1Answers: 0

    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

  • allanallan Posts: 63,488Questions: 1Answers: 10,467 Site admin

    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

  • DavidBarrowsDavidBarrows Posts: 8Questions: 1Answers: 0

    thanks again Allan

This discussion has been closed.