giterlizzi / dokuwiki-plugin-bootswrapper

Bootstrap Wrapper for DokuWiki
GNU General Public License v2.0
35 stars 22 forks source link

CSS Fatal Error #115

Open TheZachh opened 4 years ago

TheZachh commented 4 years ago

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.

giterlizzi commented 4 years ago

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.

TheZachh commented 4 years ago

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

TheZachh commented 4 years ago

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 commented 4 years ago

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.

giterlizzi commented 4 years ago

This is a bizarre bug.

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

immagine

TheZachh commented 4 years ago

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

dokuwiki-glitch