Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin conflict with move plugin #5

Closed
rnck opened this issue Jun 23, 2015 · 11 comments
Closed

Plugin conflict with move plugin #5

rnck opened this issue Jun 23, 2015 · 11 comments

Comments

@rnck
Copy link

rnck commented Jun 23, 2015

Hi there,

it seems that your plugin doesn't work with the (new version) of the move plugin. Either this or the move plugin has a bug.

I couldn't find out where the problem is. Disabling the move plugin solves the problem, but is not an option for me.

Snippets popup looks like "normal" page, please see screenshot. Clicking on links opens page in the popup window and does not insert wiki source code to the editor.

snippets_bug

Would be great if you can fix this, or someone point me into the right direction where to look for the bug.

Cheers
rnck

@turnermm
Copy link
Owner

I've tested with the original snippets plugin and the result is the same, which makes it possible to narrow down the conflict area, In the code inherited from the original, the pop-up window creates its list of snippets from a standard DW page containing an unordered list of snippet pages. The move plugin apparently takes over this unordered list and inserts it own values. It also hides the icon for displaying the snippet in the right-hand panel of the snippets pop-up.

@turnermm
Copy link
Owner

I've posted an issue to t he move plugin. You might want to do the same and explain what your problem is.

@rnck
Copy link
Author

rnck commented Jun 24, 2015

Done.

But I don't understand what possibly could affect the snippets popup page by the move plugin.

Cheers!

@turnermm
Copy link
Owner

You've found the answer. It interferes with the functioning of the snippets plugin by changing the link class.

@turnermm
Copy link
Owner

I've done some checking of my own. In firebug on my test, it's not just the change of class but the fact that the move plugin strips out the icons which have clickable properties that implement the previewing and inserting.

@turnermm
Copy link
Owner

I've corrected the bug in the move plugin which corrupts the links in the snippets pop-up window. Temporarily you can use the following url to get the corrected version but should check for updates from the original author:
https://github.com/turnermm/dokuwiki-plugin-move.git
The small change I made should not affect the move plugin but it never hurts to test,

@michitux
Copy link

The move plugin does not strip anything, the move plugin just relies on JSINFO being set to be an object and gives an error otherwise which prevents any other JavaScript code from being executed. Actually other plugins like the folded plugin even rely on their properties being set. I can fix this in the move plugin (by applying the first commit of @turnermm) and also in the folded plugin but I'm wondering if it wouldn't make more sense to change the snippets plugin to properly populate JSINFO.

@turnermm
Copy link
Owner

I assumed that $JSINFO was always predefined with namespace and id, which were then converted to JSINFO. I could easily enough enter a key into $JSINFO. But that might not make a difference if my other concern is correct (michitux/dokuwiki-plugin-move#31), so that the move code might be executed before the snippets code. I will test your suggestion and see what happens.

@turnermm
Copy link
Owner

I've done as you suggest and all seems to be working. I've pushed my revision to github.
Thanks.

@turnermm
Copy link
Owner

It hadn't occurred to me that, as a pop-up window, it had no page and namespace to initialize $JSINFO.

@rnck
Copy link
Author

rnck commented Jun 29, 2015

I installed the update and can confirm it is working again now.

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants