We have run into an issue with our implementation of Forena Reports.

On our site, we included two reports in the main content area of a page using the Bean module. Both reports are fed out of one .frx file.

Inside the report .frx file, we are using tags and related css as we need one of the report contents to accordion (expand collapse).

After trying to make it work, we noticed that none of the fieldsets anywhere on the page were collapsing/expanding as designed.
We removed the additions that we added from the .frx report to see if that was the issue, but the error continued.

After Googling for some time, we came across a number of emails that lead us to think it could be the datatables plugin/module or possibly Jquery version.
I updated datatables to 1.9.x but that didn't make any difference.

We are still working on this but thought I would document it here.

On the line noted below, we get this error:
uncaught error: $(...)dataTable is not a function

/**
 * @file
 * Set behaviors related to dataTables Features.
 */

(function ($) {
  Drupal.behaviors.ForenaDatatablesFeatures = {
    attach: function (context, settings) {
      //See http://www.datatables.net for documentation
      $('.FrxTable table').dataTable({    <-ERROR THROWN HERE 
        "sPaginationType": "full_numbers",
        "stateSave": true
      });
    }
  };
  
})(jQuery);

Comments

jimwcoleman created an issue. See original summary.

metzlerd’s picture

Could you verify whether you get the same error when you visit the report directly? Or is the javascript error only occuring when used in a Bean?

I'm suspecting that the datatables library is not being loaded.

That could be either becuase it is not referenced in the skin used by the report, or that there's a bug related to loading those js files within the Bean integration library.

Would love to know the results of the test....

Dave

jimwcoleman’s picture

Dave, thanks. I did more checking ... I hadn't looked at the Drupal Status Report. The dataTables was not enabled properly. I reinstalled and the error went away. This can be marked resolved. Thank you!

jimwcoleman’s picture

Status: Active » Closed (works as designed)

Made sure dataTables library was installed properly - removed installation and reinstalled.