Expand my Community achievements bar.

SOLVED

Data Table is not a function on AEM Edit Mode

Avatar

Level 1

Hi everyone,

I'm facing the problem with the jQuery DataTables error like "dataTable is not a function".

It's working on my local instance on Edit and Disabled mode. But on Client Development Environment it's throwing the error "dataTable is not a function".

We included their Header and Footer components which have JS for responsive, touch support and etc. Can you please let us know the possible ways to get ride of the issue. We are calling dataTable as follows:

$('.paymentHistoryDataTable').dataTable();

Please give me suggestions as early as possible to resolve it.

Regards,

Vijay Kanajam 

1 Accepted Solution

Avatar

Correct answer by
Level 10
4 Replies

Avatar

Correct answer by
Level 10

This may be a loading issue with the JQuery plug-in  - see this:

https://datatables.net/forums/discussion/21223/uncaught-typeerror-undefined-is-not-a-function

Avatar

Level 10

Issue happens if required library is missing or not loaded.

Avatar

Level 1

Thanks for the information and we are working on the same as per your input.

But just one more question. Why it's working on local instance and why not on dev. environment as the code what we have in my local same is available in Dev.

Can you please let me know what we did wrong or any mistakes.

Thanks in advance.

Regards,

Vijay Kanajam

Avatar

Level 10

Vijay Kanajam wrote...

Thanks for the information and we are working on the same as per your input.

But just one more question. Why it's working on local instance and why not on dev. environment as the code what we have in my local same is available in Dev.

Can you please let me know what we did wrong or any mistakes.

Thanks in advance.

Regards,

Vijay Kanajam

 


Generally missing to push all the changes causes it. Comparing instance will give a clue.