Came across this on a View with a grouped-tables Page display.
When the page filter was set so that only one group (one table) was displayed everything was fine.
When the page filter was set to all, so that multiple tables appeared on the page, none of the buttons worked, except for the Print buttons.

The Chrome console showed this message repeatedly (probably for each table and button other than the Print button)
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8888/drupal7/media/swf/copy_csv_xls_pdf.swf

Comments

rdeboer’s picture

Issue summary: View changes
emijayne’s picture

I am getting the same error only a different circumstance - it isn't just with two tables.

On my site, I have 6 tables through Views, none with grouping. All tables on the site, except for one, work just fine. Chrome shows this as the embed source:

src="/sites/all/libraries/datatables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf"

The last table, however, has the same issue: Two instances of "search/copy/csv/excel/pdf/print" options (with "Search" and "Print" being the only working options) and the wrong embed source:

src="media/swf/copy_csv_xls_pdf.swf"

... Note that this is also happening on another site where I have grouped tables.

rdeboer’s picture

Re #2
Thanks Emily for confirming/sharing.
Rik

emijayne’s picture

Rik - In comparing all settings for my broken table to one of the good ones, the only difference was that the checkmark for Enable Drupal style 'sticky' table headers (Javascript) was checked under Format > Table > Settings. After removing this, now there is only one set of options and all buttons work they way they should.

I went over to my other site with the grouped tables to do the same, and it had the same effect of removing the second set of options in each table's header. Unfortunately, the buttons are still linking to the wrong source, and therefore not working.

To be continued...

emijayne’s picture

IMO, it seems like in rendering multiple tables it is ignoring the path set in this module, and defaulting back the location in TableTools.js.. but relative to root rather than that script file. Looking at the example file in sites\all\libraries\datatables\extras\TableTools\multiple_tables.html, it *should* work.. so I wonder if another script from views is getting in the way?!

idk.. I've only been perusing the module for a day or so.. and I need to get back to another project.. so I could be reading this wrong!

In the meantime, I still want to use this without my users here freaking out that it's broken.. SO I've temporarily hacked the TableTools script files to point the sSwfPath directly to the file from the site root /sites/all/libraries/datatables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf.

Thanks for the awesome module!

rdeboer’s picture

Thanks for your awesome research work!

rdeboer’s picture

Sorry I can't see myself being able to spend much time on this in the short run.
Patches anyone?
Rik

renenee’s picture

FYI, I was not able to see the export buttons at all in my view. I downgraded the library, cleared the cache, and voila. See https://www.drupal.org/node/2259283#comment-8748515 to grab the old library.