dokuwiki-plugin-bootswrapper icon indicating copy to clipboard operation
dokuwiki-plugin-bootswrapper copied to clipboard

CSS Fatal Error

Open TheZachh opened this issue 4 years ago • 6 comments

Description

This is a strange bug that has plagued me for 2 years now. On a fresh copy of Dokuwiki + Bootstrap3 template, pages will instantly lose their CSS formatting on save.

I'm reporting this now as I've finally narrowed down the cause and hoping it could be repaired in the next release.

If you format all of your page code together in blocks, It will strip the CSS out of the page no matter what you do.

With this code: Screenshot 2020-05-28 13 46 18

The output with the spacing removed is this: Screenshot 2020-05-28 13 38 48

You can see all of the defined CSS/Wraps, etc. are ignored and everything compresses into one ugly column on left align.

But I've finally figured out the secret.... It seems to work normally when the code is spaced between every line.

So if I change my page code to this:

Screenshot 2020-05-28 13 46 37 Screenshot 2020-05-28 13 46 50

Suddenly everything locks into place as it should: Screenshot 2020-05-28 13 42 03

I had to really dig deep to figure this out because I recently deployed a DokuWiki+Bootstrap3 for an entire company as a knowledgebase. It was a bit embarrassing to trip over this, so I hope either someone can provide insight as to why this is happening or if it's a parsing issue, etc.

Anyway, at least so far it seems to work with the spacing in place so feel free to spread the word.

TheZachh avatar May 28 '20 18:05 TheZachh

Seems a Wrap plugin problem.

You can use Bootstrap Wrapper plugin with Text and Grid syntax.

<TEXT align="center">
TEST
</TEXT>

\\

<row>
<col sm="6">
<panel title="TEST" type="default">
^|
|FOO|BAR|
</panel>
</col>
<col sm="6">
<panel title="TEST" type="default">
^|
|FOO|BAR|
</panel>
</col>
</row>

Note: Please use the markdown syntax for wiki code.

giterlizzi avatar May 29 '20 09:05 giterlizzi

This actually happens on page with just your bootstrap wrapper alone also. But thanks for the tip.

TheZachh avatar May 29 '20 20:05 TheZachh

I feel like you probably need to see this to believe it so I took your code example, copy, pasted saved. Then refreshed the page and all the CSS was gone again. No WRAP code. It's seems to be either an issue with parsing components in Bootstrap, or the template in my opinion. It's hard to pinpoint which is why I'm hoping this report might help you find it. It's driving us crazy! :P

Here is a video showing you what I did. You'll note that when I put one space in and saved it, the page rendered normally. So weird...

Click here to view the clip: https://www.dropbox.com/s/b5vy9lgl2pkzc3b/bootstrap3css-bug.mp4?dl=0

TheZachh avatar May 31 '20 04:05 TheZachh

Is this issue going to be resolved in the next update perhaps? I just upgraded the wiki to "Hogfather" and the same thing happens. I had to edit the affected pages, and repaste in the bootstrap elements independently for it to render properly.

TheZachh avatar Jun 08 '20 17:06 TheZachh

This is a bizarre bug.

After save the page, inspect the HTML code using Developer Console. You see this ?

immagine

giterlizzi avatar Jun 09 '20 07:06 giterlizzi

Hmm I don't see that. Using the same example given above, here is the source output:

dokuwiki-glitch

TheZachh avatar Jun 10 '20 15:06 TheZachh