There is a change in the api of datatables form 1.19 to http://datatables.net/upgrade/1.10
Adding the 1.10 version to the Drupal Datatables Module seems to break the functionallity of the module.

It makes no difference if using the dev or the stabel version of the module, both are broken.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

q2_faith’s picture

Install jquery_update and set version 1.10, also rename js files

vmd111’s picture

also rename js files

Please guide
Which js file? And What we have to change?
File path:?
New name:?
Thanks.

q2_faith’s picture

I'm sorry. Just install jquery_update and set version to 1.10

fwilly’s picture

FileSize
929 bytes

Here a patch to use DataTables Plugin v1.10.

  • It updates the version from 1.9 to 1.10 and
  • use /media/css/jquery.dataTables.css instead /media/css/demo_table.css

I haven't test all functionality. For me sorting, filtering and paging was okay.

formatC'vt’s picture

Status: Active » Reviewed & tested by the community

confirm bug, patch fix it

Elin Yordanov’s picture

Status: Reviewed & tested by the community » Needs review

Thanks for your feedback formatC'vt. However, I cannot commit a patch which is tested only by one person. Let's wait for some more feedback to see if it really doesn't break anything.

formatC'vt’s picture

test what? You can download latest version from datatables.net where you can see that version has been changed, and css file name too.

Elin Yordanov’s picture

@formatC'vt Test if this update doesn't break existing installations. You cannot simply publish a patch without testing it.
I am aware of that Datatables 1.10 has changed its API.

formatC'vt’s picture

it's has been changed - http://www.datatables.net/upgrade/1.10, but:
Creating DataTables / API access - we already use dataTable() as jQuery object
Pagination - we doesn't use two_button pagination control
Server-side processing - this change is optional
API Plug-ins - i'm doesn't see any api plugin in the module
Removed features - we doesn't use fnRender and bScrollInfinite
Cookie based state saving - cookie based state saving has been replaced with localStorage based state saving and doesn't affect on us

And anyone who install this module at this time using it with 1.10 version because there no download link for 1.9 vesion on datatables.net

Elin Yordanov’s picture

I'm not against upgrading to v1.10 in no way, on contrary I would be happy to upgrade to 1.10.

I just want to wait at least one more person test this patch and reports that it doesn't break the existing installation. My consideration is that any site already using this module could break after the update.

For example as @q2_faith states:

Just install jquery_update and set version to 1.10

If you need to install jquery_update module to use v1.10, you cannot simply apply this patch without previously installing jquery_update. That means if we publish this patch it will most probably break those sites without jquery_update module.

You cannot simply push a patch that changes the requirements of module. If q2_faith's statement is true, then probably we must start to develop 7.x-2.x version and provide a safe upgrade path.

Elin Yordanov’s picture

Moreover, thank you for pointing out that there is no download link for 1.9 on datatables.net. We should update the project page to indicate that this module currently works with 1.9 and we need to provide a download link for 1.9.

The project page can be updated by duellj. I don't have the permissions to update the page. I hope he will read this issue soon and adds this information till this issue is fixed.

formatC'vt’s picture

link to 1.9 http://datatables.net/releases/DataTables-1.9.3.zip (latest is 1.9.4, but 1.9.4 depends on jQuery 1.8)

Elin Yordanov’s picture

Thanks for the direct link for download the latest supported version without jquery_update module. I've send a message to duellj and hope he'll be add this information to the project page.

formatC'vt’s picture

i was wrong about API Plug-ins, we are use Tabletools plugin.
add dependency to jquery_update, fix wrong site url, update DataTables and Tabletools plugin

duellj’s picture

Thanks for keeping up on this pc-wurm (and formatC'vt ). I've updated the project description with a direct download to 1.9 and updated the README in the 7.x-1.x branch.

formatC'vt’s picture

what about release 7.x-2.x with 1.10 support?

duellj’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev

7.x-2.x release branch opened

formatC'vt’s picture

patch for 7.x-2.x

joelpittet’s picture

I wonder if it should also maybe use buttons/select instead of tabletools?
@see https://datatables.net/extensions/tabletools/

joelpittet’s picture

There may need to be some BC layer to get this right, but here is the changes to the JS settings variable names for 1.10
https://datatables.net/upgrade/1.10-convert
https://datatables.net/reference/option/columns.type

joelpittet’s picture

FileSize
3.37 KB

Regarding my note on #19
This interdiff applied against #20 gets this going by providing another library for buttons. It has some external dependencies and not sure how to best manage those.

joelpittet’s picture

Status: Needs review » Needs work

And I guess each button could be a config option and separate library load instead of all together.
Would love opinions which way to take this, especially from the maintainers.

joelpittet’s picture

Status: Needs work » Needs review
joelpittet’s picture

FileSize
9.86 KB
598 bytes
joelpittet’s picture

FileSize
12.77 KB
3.98 KB

Here's some of the library work I was messing with but it's a WIP because it's not quite the same.

prashant_pathak’s picture

Please change jQuery version to 1.10 on JQuery_update module.

dqd’s picture

#24/#25 looks good to me. #26: end of line issues and code formatting issues ...
I will test if patch #25 still applies against latest 7.x 2.x dev

dqd’s picture

Status: Needs review » Closed (duplicate)

Close this in favour of the new META issue to merge forces: #2999400: [META] Keep track of DataTables library versions an its move away from jQuery Please let's keep track of the DataTables plugin updates in one META issue to prevent clutter.