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

Popup compatibility with Bootstrap3 template #18

Closed MarcosMenegazzo closed 7 years ago

MarcosMenegazzo commented 8 years ago

After changing my dokuwiki template to Bootstrap 3, i noticed that the select Snippet dialog box is appearing with no styles at all. My question: is this something to fix in the Boostrap3 template or in the snippets plugin?

turnermm commented 8 years ago

I suspect the problem is with the Bootstrap template. I just had a chance to test on two templates other than the dokwiki template. Both worked. One is my own, simple_sidebar, which is based on the old default template, and then on the arctic template, which is popular. You could try moving the snippets css from the plugin/snippets directory to conf/userstyle.css. See: https://www.dokuwiki.org/config?s[]=userstyle.css#configuration_files https://www.dokuwiki.org/config?s[]=userstyle.css#configuration_files

MarcosMenegazzo commented 8 years ago

Thanks for the suggestion. That solves half of the problem, because the page preview is also no styled with bootstrap 3 theme. Maybe i need to verify how dokuwiki include the current css's and replicate the instructions in snippets plugin, what do you think? Is it possible?

turnermm commented 8 years ago

I have no experience with Bootstrap 3, but I just downloaded it and tested the preview. If by 'preview' you mean Dokuwiki's preview in the editor, then I had no trouble. The preview worked for me. Is it possible that there is a conflict with one of your plugins? If so, disable all your plugins (including the userstyle.css) to see which, if any, plugin is causing the problem. Then re-enable them one at a time.

MarcosMenegazzo commented 8 years ago

@turnermm checking #6 i found:

This turned out to be fixable from within the snippets plugin itself and that has been done.

Is this fixed at master?

turnermm commented 8 years ago

That seems to have been fixed, yes. There was a null pointer error which showed up in some cases, which was there from before I adopted the plugin. If you are familiar with the chrome or firefox javascript debuggers, you could check if there is an error showing up. But, as I said above, I did download and install the Bootstrap template and had no problems with snippets.

lukaspour commented 8 years ago

@MarcosMenegazzo were you able to solve this problem? I am having the same issue. thank you very much for your suggestion

MarcosMenegazzo commented 8 years ago

@lukaspour sorry, other priorities arrived. With Detritus, the default theme, and not using the folded plugin will make it work. So here, for now, i only reverted to default theme and disabled the folded plugin.

I've planned to prototype a vagrant box and install a fresh new stable dokuwiki, the bootstrap 3 theme (Giuseppe Di Terlizzi version), the snippets plugin, and see if the problem persists, but I currently have no time for this.

Have you tried something similar?

turnermm commented 8 years ago

@MarcosMenegazzo As I said earlier, I've tested snippets w. Bootstrap and had no problems, and while not at my office right now, I'm pretty sure it was with detritus.

drilus commented 7 years ago

I believe I have an issue with bootstrap3 as well.

Here is what the popup window looks like:

screen shot 2017-02-20 at 4 15 16 pm

Here is a screenshot of my console log: screen shot 2017-02-20 at 4 10 58 pm

I'm using the following plugin for bootstrap3: https://www.dokuwiki.org/template:bootstrap3

turnermm commented 7 years ago

I don't see anything here which applies to snippets: dw_mode is from bootstrap3. To see more easily what is going on, turn off javascript and css compression. Then you should be able to see where in the code the errors are, using the debugger.

turnermm commented 7 years ago

When you have a javascript error such as this, it can have a cascading effect, affecting other javascript, which is why it shows up in the broken snippets panel. But the error is not coming from snippets.

drilus commented 7 years ago

Turns out there were some modules missing from the Boostrap3 template. I guess this could be due to a corrupted install / update.

Thanks @turnermm