turnermm / Updatable-Snippets-for-Dokuwiki

Inserts updatable snippets into Dokuwiki pages
https://dokuwiki.org/plugin:snippets
GNU General Public License v2.0
6 stars 4 forks source link

Conflict with DataTables Plugin #19

Closed rgibsonohmh closed 8 years ago

rgibsonohmh commented 8 years ago

Like the TagFilter Plugin, when the DataTables plugin is enabled, the popup window for Snippets doesn't show the checkboxes above the template list or the individual preview/insert buttons next to each template.

OS: Debian 8 DW: Detritus Web Server: Apache2 2.4.x, latest patches from Debian.

turnermm commented 8 years ago

I run various test sites to test my plugins. I have one site, on which I loaded the datatables plugin, and I could not reproduce your problem. This site also had the following plugins enabled for this test:

ckgedit, popularity, move, htmlOKay, include, authad, nodisp, discussion, numberedheadings, block, tooltip, mathjax, data, overlay, xcom, wrap, sqlite, avatar, authpgsql, simplenavi, authmysql, tag, indexmenu, safefnrecode, pagelist, strreplace, authldap, textinsert, dwedit, pagehere, anchor, nspages, news, info, preregister, revert

There was an important fix on Tue Feb 2 04:43:12 2016 -0600. Make sure you have the most current version of the plugin. Also, clear your browser cache.

It's also possible that there could be a conflict between datatables and some other plugin that affects snippets. Try disabling and re-enabling one at a time.

rgibsonohmh commented 8 years ago

First, I did ensure that the latest version of the plugin was installed. Currently, I have the 2016-02-02 version installed and updated from the extension manager.

I have used multiple browsers now on multiple machines, each with a cleared cache. I also purged the CSS and JS caches on the wiki instance, and I have cleared the wiki's page cache by saving the configuration again.

I also disabled all plugins except the bundled authad plugin. I then enabled the snippets plugin, which worked. I then enabled the datatables extension, which replicates the circumstances of the problem.

Like you, I have a couple of other instances of Dokuwiki installed, and I was unable to replicate the circumstances anywhere else.

rgibsonohmh commented 8 years ago

I do see that the datatables plugin was updated on 2016-02-23, so perhaps there is a new issue in the datatables plugin?

turnermm commented 8 years ago

I just finished some more tests and may have a solution. I inherited this plugin and enhanced it but left the underlying original structure in place . I created a new branch implementing my fix: https://github.com/turnermm/Updatable-Snippets-for-Dokuwiki/archive/jq-fix.zip

Please let me know if this works for you and I will merge it into the master and notify the tagfilter user.

turnermm commented 8 years ago

If you downloaded the above less than half hour ago, the fix was accidentally left out, So, download again. Sorry. I've just been so busy here this morning that I'm pushing things out too fast.

rgibsonohmh commented 8 years ago

I tried to upgrade in-place as well as an uninstall of the snippets plugin, and install the provided download.

No change. When datatables is enabled, the snippets popup is missing the buttons. When I disable it, I get the proper dialog.

After each operation, I was clearing all caches (browser, CSS, JS, and wiki page).

turnermm commented 8 years ago

I tried tests in three flavors of linux and there the problem occurs in all cases.

The problem is with datatables.

TypeError: JSINFO.plugin is undefined
if (JSINFO.plugin.datatables.enableForAllTables) {

If you need datatables, you can report this error to its author.

rgibsonohmh commented 8 years ago

I wondered that it could be either this plugin or that. I will reach out to the datatables plugin repo for further troubleshooting.