How to use in Joomla

How to use in Joomla

tghounselltghounsell Posts: 4Questions: 1Answers: 0

Anyone successfully using DataTables + Joomla without just using an iframe (which leaves the raw page unsecured)?

I've been able to use editor and produce working pages in my environment, but I want to secure access to the functionality by embedding it with a joomla component. I suppose I could create & register my own joomla component, but I was hoping to avoid doing son. I've tried various code-wrapping tools (sourcerer, Jumi) to wrap the datatable content into something that is managed by Joomla. However, I inevitably seem to have problems. It seems to me that there are path references in datatables.js that are relative, and when interpreted by Joomla they resolve as mysite.ca/index.php/datatables/table.html instead of mysite.ca/datatables/table.html. I can't seem to find a way to fix this. The problem may actually exist even if I do create a new component. Any suggestions?

Answers

  • tghounselltghounsell Posts: 4Questions: 1Answers: 0

    Here's my example : mydyc.ca/index.php/test2

    The page is now loading without errors or anything I can see that's wrong in the network traffic.

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Hi,

    Thanks for the link. The error returned from the server is:

    Fatal error: Uncaught Error: Class 'DataTables\Editor' not found in [...]boats/php/table.boats.php:25 Stack trace: #0 {main} thrown in [...]boats/php/table.boats.php on line 25

    Are you including include( "lib/DataTables.php" ); and is that file in location?

    Allan

  • tghounselltghounsell Posts: 4Questions: 1Answers: 0

    Thanks. I tried that, but it's not helping. The problem seems to be that some relative path within the core code is resulting in paths that include joomla's "index.php" in the path when that should be ignored. The only thing that seems to work is using an iframe.

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    I'm sure there must be a way :)

    Do you have:

    /home/customer/www/mydyc.ca/public_html/boats/php/lib/DataTables.php
    

    and

    /home/customer/www/mydyc.ca/public_html/boats/php/lib/Editor.php
    

    present on the server?

    Allan

Sign In or Register to comment.