I am seeing the following error in the status page:

Library variant requested: original. The DataTables JS library could not be found.
The DataTables-Responsive JS library could not be found.
Column Reorder JS not found.

I did install the following javascript libraries:

  • DataTables 1.10.0 in libraries/datatables/
  • datatables-responsive (lates) in libraries/datatables-responsive/

[libraries]$ pwd
/var/www/html/sites/all/libraries
[libraries]$ ls datatables
bower.json Contributing.md examples license.txt package.json
composer.json dataTables.jquery.json extensions media Readme.md
[libraries]$ ls datatables-responsive
examples files license-bsd.txt license-gpl2.txt README.md

All help is appreciated!

Comments

monaw’s picture

FYI, I tried to run the "drush dl-datatables" as instructed but got:

[libraries]$ drush dl-datatables
Starting downloads to sites/all/libraries. This usually takes up to [success]
30 seconds. Please wait...
Unable to unzip /var/www/drupal-7.27/DataTables-1.9.4.zip. [error]
File /var/www/drupal-7.27/DataTables-1.9.4.zip was downloaded, but [error]
could not be extracted.

So I manually downloaded that library and noticed that the version has changed to 1.10.0.

rdeboer’s picture

Yes, I haven't tried the module with DataTable 1.10 yet.
Stick to 1.9.4

monaw’s picture

@ RdeBoer : where do I get 1.9.4? I didn't see it on the download site and the drush command didn't work.

rdeboer’s picture

StatusFileSize
new1.62 MB
new32.95 KB

Ouch... you are right. They've done a major overhaul at https://datatables.net/download/index and the old version is not readily available.
I will have to update the Table Trash module....

For now I'm attaching the old version as I use it on my laptop.

monaw’s picture

@ RdeBoer : thanks for the 2 javascript libraries! They took the status error away (:

I configured a table decoration (screen shot attached).

However, none of the features appears to be working. For example, how do I reorder or resize the columns? Dragging a column header is not doing anything. I clicked on the CSV button but nothing happened. When I enter something in the Search box and then the enter key, nothing happened. I've also attached a screen shot of my test table

I've tried this on my Mac on both Firefox 28.0 and Safari 6.1.8 but neither worked.

Your help is appreciated.

monaw’s picture

rdeboer’s picture

Check if you have any browser errors.
If so try switching off features one by one to isolate the one that is causing everything to break.
There may be interference with other things on page. Try switching theme to see if that has anything to do with it.

monaw’s picture

StatusFileSize
new84.71 KB

@ RdeBoer : I don't see any error in my Firefox web console. I tried turning off trash table features one-by-one, except for the one I really want...reordering the column with drag-n-drop, but that still didn't work. I also turned off general table features but that didn't get the column reordering to work either. I've included a page shot of the table configuration...

rdeboer’s picture

@monaw: and this demo page works fine for you? http://flink.com.au/tips-tricks/table-trash-demo-page

monaw’s picture

@ RdeBoer: Yes http://flink.com.au/tips-tricks/table-trash-demo-page works fine...

FYI, I'm using Drupal 7.27, Table Trash 1.0-beta 3. What versions are running on the above demo page?

rdeboer’s picture

Same versions on the demo page, I think.
Looks like the Table Trash library is a little temperamental, at least version 1.9.4. But I haven't had time to look into 1.10 yet.
Sorry. This is very frustrating for you.
Have you tried switching to a plain theme, one of the core themes?

monaw’s picture

I tried the themes Garland, Bartik and Seven but still the I cannot reorder or resize the table...

Is there another theme I should try?

rdeboer’s picture

No, those should work.
I don't understand what is going on...
Sorry.

monaw’s picture

Ok thanks RdeBoer. I will wait for the next release to see if it fixes whatever problem I am having...

ar-jan’s picture

Title: Status error » Update Table Trash to work with DataTables library v1.10
Version: 7.x-1.0-beta3 » 7.x-1.x-dev
Category: Bug report » Task

Issue title for addressing the original report. Maybe add a separate issue for #6/#8 if it remains a problem?

quickdraw6907’s picture

I had the same problem with the new library. Downloading the version attached here worked like a charm! I did see a 1_9 tag on github: https://github.com/DataTables/DataTables/tree/1_9

seans

rdeboer’s picture

@seans and everybody....

Did you not see this at the very top of the project page:

Note: the current DataTables library is 1.10 while this module is based on 1.9.4. The correct library is loaded automatically when you use drush to install the module (see drush commands below). If you wish to install the module manually, you can obtain the DataTables 1.9.4 files from this issue: https://drupal.org/node/2259283#comment-8748515

Thanks @seans for the link though!

ctrladel’s picture

Component: User interface » Code
Status: Active » Needs work
StatusFileSize
new234.25 KB

I just did a quick and dirty rewrite of the module to get it working with DataTables 1.10.9. A summary of what's I've done.

  • Removed the bug fixed variant and all the messy code to get it to work.
  • Cleaned up the variable names so they more closely resemble what they actually control
  • Put in a very simple upgrade path for anybody with current table trash decorations.
  • Moved all of the datatables object creation logic that was in table_trash.js and put it in table_trash_pass_datatables_selectors_and_config(). It's entirely possible that this removed functionality without me realizing it.
  • Updated the drush function so that it downloads the appropriate version and extensions.
  • Removed all the nondrupaly -'s and replaced them with _'s
  • Re-implemented most of the functionality from the current version. I didn't do much updating to the interface though so somethings may not actually work as described.
  • Put in todo's where functionality could be expanded.

drush dl-datatables
This should work to download the new DataTables and all of the required extensions.

I didn't do a very thorough testing of all the functionality but what I did test seems to be working more or less how it should. I'm sure with some more eyes on it more bugs will be found.

ctrladel’s picture

StatusFileSize
new642.45 KB

Spent some more time working on this over the past few days. Besides the one exception at the bottom I'm fairly confident that everything is working as it should. I took some liberties and moved the module away from using a variable to store config and instead started using ctools exportables which means this patch is probably more worthy of a 7.x-2.x release than a continuation 7.x-1.x. A summary of the changes I've made since the last patch:

CHANGES

  • Added CTools as a dependency.
  • Decorations are no longer stored in a variable. They are now stored in the table_trash table as ctools exportable objects(https://www.drupal.org/node/928026).
  • Changed the interface to use the default ctools exportables interface.
  • All processing of configuration is now done when a decoration is saved instead of when the decoration is added to a table.
  • Added support for scrollY,scrollCollapse,Fixed footer, Fixed right columns, and choosing which export buttons to show.
  • Removed the x width feature, as far as I can tell it is no longer supported.
  • Updated the decoration form so that it used appropriate field types and descriptions.
  • Cleaned up the update path for existing decorations.
  • Moved global settings to their own page.
  • Made minor changes to the readme.
  • And any of other misc stuff that I have forgotten.

Possible ToDos

  • Implement a hook to attach custom js to decorations so that Datatables plugins can be used with minimal hassle.
  • Implement a hook to allow the Datatables configuration array to be changed before it is parsed to JSON so that any additional Datatables configuration needed can be added.
  • Implement decoration weighting so that tables that have more then one decoration applied to them behave in a controllable way.
  • Style and organize the decoration form.
  • Add support for column visibility and length change.
  • Support more than 2 breakpoints?

BROKEN THINGS

  • The Datatables css is currently always included because it is in the library.

To update existing decorations it should be as simple as going to admin/config/content/table_trash/update_config, filling in Human and machine names, and clicking the save button. Deleting the variable is totally optional.

ctrladel’s picture

StatusFileSize
new77.16 KB

A cleaner version of the previous patch that doesn't remove the libraries and includes a couple minor fixes like removing leftover dpms.

rdeboer’s picture

Yep happy with it. Go ahead and commit. I've given you the privileges.
Thanks for this solid job!
Rik

  • ctrlADel committed 27b9a57 on 7.x-1.x
    Issue #2259283 ctrlADel: Rewrite of the module to support DataTables v1....
ctrladel’s picture

Assigned: Unassigned » ctrladel
Status: Needs work » Fixed

Just committed this.

rdeboer’s picture

Yay!
Thanks so much ctrlADel

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.