I installed 7.x-1.2 and also DataTables 1.9.4. When I tried to access the table, i get the error:
Undefined index: table_tools in template_preprocess_datatables_view() (line 348 of /home5/retamavi/public_html/sites/all/modules/datatables/datatables.module).

I insured I had placed the media folder where it needed to be.

I found DataTables 7.x-1.1 and it worked fine. It appears to be a compatibility issue.

Comments

brussam’s picture

Incorrectly assigned to myself

ranieri machado’s picture

For get rid of the annoying message just check if the array element exists:

  // Enable TableTools plugin support, if necessary.
  if (isset($options['elements']['table_tools']) && $options['elements']['table_tools']) {
formatC'vt’s picture

Assigned: brussam » Unassigned
Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new572 bytes
ey’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
Status: Needs review » Closed (cannot reproduce)

Using 7.x-1.x-dev cannot reproduce it. Please try it with dev version and re-open the issue if you still have this problem.

formatC'vt’s picture

Status: Closed (cannot reproduce) » Needs review
StatusFileSize
new158.98 KB

This is easy to reproduce, use clean drupal install.

ey’s picture

Status: Needs review » Closed (cannot reproduce)

@formatC'vt

You should know that all new code will be made into dev-versions of modules, i.e. 7.x-1.x-dev. Please install the dev version, not 7.x-1.2, and you'll see that the issue is not there.

If you still see the issue, then provide a new patch, since your patch doesn't apply to the dev version.

ey’s picture

Status: Closed (cannot reproduce) » Needs review

@formatC'vt

I'm sorry, you're right. The issue is still there. I was on the master branch, not on dev, that's why I couldn't reproduce it at the first time.
I'll check your patch as soon as I got more time (give me 2 days) and I'll commit it if it works.

ey’s picture

I've a little improved the patch, reducing the redundant check.

ey’s picture

Status: Needs review » Fixed

Since this is a trivial check, I've just pushed the patch to the dev-Version.

Thanks @Ranieri Machado and @formatC'vt.

  • pc-wurm committed 9779ac5 on 7.x-1.x
    Issue #1951760 by Ranieri Machado, formatC'vt, pc-wurm: fix undefined...

Status: Fixed » Closed (fixed)

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

ayushmanshrestha’s picture

#8 worked for me.

Thanks!