I found a very old issue like this one, but although it still appears active, nothing seems to have been done on it, and it applied to a dev version of Collapse Text. I've tried setting up my page as described in the Readme file, but I get a long string of error messages (see attached txt document). My instructions to collapse the block of text are ignored as is the title. All that displays is the default title above the text to be collapsed. It does work in that clicking on the title will collapse the text.
My code looks like this:
[collapsed title="Why not a Welcoming Church or Denomination?"]
<p>My content here.</p>
[/collapse]I've tried using [collapse collapsed title="title"] and several other variations, but nothing seems to work.
When I look at the generated source code (using Firebug), it looks like this:
<fieldset class="collapse-text-fieldset collapsible collapse-text-default-title form-wrapper collapse-processed"><legend><span class="fieldset-legend"><a href="#" class="fieldset-title"><span class="fieldset-legend-prefix element-invisible">Hide</span> Use the arrow to expand or collapse this section</a><span class="summary"/></span></legend><div class="fieldset-wrapper"><div class="collapse-text-text">
<p> My content here.</p>
</div></div></fieldset>
It looks like to me that the module/filter is parsing the markup partially correctly, but I can't find what's generating the errors and what's happening to my title. By the way, I also tried defining the title in <h2></h2> tags above the [collapse collapsed][/collapse] markup. That didn't change anything, except that the title displayed with the "Use the arrow ..." hyperlink below it; I still got all the error messages.
Any help that you can give me on getting this to work would be greatly appreciated. I'm sure I must be doing something stupidly wrong, but I can't figure out what it is. If I could get it to work, this would be a fantastic module and something that I really need.
| Comment | File | Size | Author |
|---|---|---|---|
| error_messages.txt | 11.99 KB | LarryTX |
Comments
Comment #1
pukku commentedIf you use the dev version, that that fix the problem?
Comment #2
LarryTX commentedThe dev version works -- sort of. I'm using Collapse Text with CKEditor, and it appears that you have to set config.entities = false;. Also, CKEditor brackets the [collapse] markup with
<p></p>tags. That doesn't seem to bother Collapse Text; in fact, I think I found that Collapse Text requires it. However, if you have multiple collapse blocks of text, one above the other, you end up with [/collapse] on one line and [collapse] on the next line in your code. After CKEditor mucks with the code, it renders it as<p>[/collapse][collapse]</p>, and it seems that Collapse Text doesn't like that one bit.What I've come up with is that, if I ensure that the code is just right in the Source view of CKEditor and then save it, Collapse Text works perfectly. However, if I have to go back in to edit anything at all in CKEditor, then CKEditor mucks with the source code again, and the whole thing blows up.
I tried doing all the editing in a text format that doesn't have CKEditor attached to it, but it looks like Collapse Text expects some of the encoding that CKEditor does, and I never could get that approach to work. (If I could, it wouldn't be bad since I usually do most of my development of static pages in Dreamweaver, and then, copy the source code from Dreamweaver to the source code for CKEditor. That seems to work just fine in all other cases.)
Anyway, this page that I'm working on now is working. I'm just hoping that I don't have to go back in and do any edits and that I can repeat my success on the other pages like this one that I have to do.
Comment #3
pukku commentedHi! Collapse_text should work fine without any CKEditor specific code -- we use it with Markdown. There are some heuristics to try and work around the cruft introduced by WYSIWYG editors, but it shouldn't require any of that.
Comment #4
pukku commentedHi! I'm going to close this. The issues around trying to create markup that works with WYSIWYG editors are huge; there are heuristics to try and make it work, but you may find that just using full HTML will be easier to control.
Sorry,
Ricky
Comment #4.0
pukku commentedAdded code tags