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

CDATA shown on page when used in sidebar #173

Closed
Harvie opened this issue Feb 25, 2017 · 5 comments
Closed

CDATA shown on page when used in sidebar #173

Harvie opened this issue Feb 25, 2017 · 5 comments
Labels

Comments

@Harvie
Copy link

Harvie commented Feb 25, 2017

It displayed CDATA mess when i used indexmenu in sidebar. Had to change syntax/indexmenu.php from
$out = "<script type='text/javascript' charset='utf-8'>\n";
to
$out = "<script type='text/javascript' charset='utf-8' style='overflow: hidden; height: 0px;' >\n";

because something was automatically adding style='display:block;' one second after indexmenu was displayed. which (at least in chrome) resulted in showing CDATA as text on page. I am not sure what does this, but this workaround helps to fix that.

@magnebra
Copy link

magnebra commented Feb 28, 2017

The offending code seems to be in lib/scripts/page.js#makeToggle. The line $child = $content.children() (line 132) will also return script tags if any.
The result is that they later will be have the display=block style set on them.

@Harvie
Copy link
Author

Harvie commented Mar 28, 2017

@magnebra do you think there's some less-hacky solution than the one i've used? Anyway... it would be nice to get some kind of official fix for this...

@Klap-in Klap-in added the bug label Jul 11, 2020
@DevonFrosch
Copy link

We had this problem on our wiki as well. It turns out we had a missing <div class="group"> underneath the <div class="content"> in the main.php of the template (default: lib/tpl/dokuwiki/main.php).

This changed in 2015, quite a while ago (dokuwiki/dokuwiki@82246f1#diff-de0e793668ff824f0b6b6a8882ca20e3) and we missed it when we updated back then.

Hope this helps others as well, and I think it's not a bug of this plugin.

@magnebra
Copy link

magnebra commented Jan 4, 2021

I can confirm that @DevonFrosch observation is correct. Changing this in our template fixed this issue.

@Klap-in
Copy link
Collaborator

Klap-in commented Jul 10, 2021

Great, so updating the template seems to fix this issue.

@Klap-in Klap-in closed this as completed Jul 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants