Bugs » #31
This section on the Community is no longer supported, in favour of Wikidot's Official Feedback Site.
It is retained here for archiving purposes.
Bugs
Tags
Posted by David Marseilles on 15 Nov 2009 21:12, last edited on 12 Feb 2010 04:39
This bug has a workaround, but has not been fixed |
Description
If you use prependLine or appendLine in Listpages, and include a module like [[gallery blah="blah"]] in prependLine, ListPages won't render. I gather it is interpreting the starting quote of the internal module quote as the ending quote of the prependLine argument.
How to Reproduce
See sandbox flickr for working example.
See below for example code blocks.
Code block one returns "Error selecting page."
[[module ListPages category="flickr" limit="5" order="random" separate="no" prependLine="[[gallery size="square"]]" appendLine="[[/gallery]]"]]
: flickr:%%title%%
[[/module]]
Code block 2 works.
[[module ListPages category="flickr" limit="5" order="random" separate="no" prependLine="[[gallery]]" appendLine="[[/gallery]]"]]
: flickr:%%title%%
[[/module]]
Browsers
Has bug
Works correctly
Workarounds
Contact
Rate this Bug
Rate the urgency of this bug. If you think it is more urgent and important than it's current rating suggests, rate it up.
I don't know if this is worth fixing or if it even can be easily fixed, but I thought I'd report it just in case. Since ListPages is the foundation of a webapp creation platform, being able to include modules inside prependLine with its own arguments and its own quotations in those arguments might be useful someday.
But I'm not even rating up my own bug report because I can't think of any urgent reason to fix it now.
Hi David :)
According to the ListPages Module documentation, prependLine & appendLine will only work if separate="false/no"
λ James Kanjo
Blog | Wikidot Expert | λ and Proud
Web Developer | HTML | CSS | JavaScript
The error in this case occurs even only with separate set to false*. I've corrected the example code blocks (bad copy paste), but the underlying code is correct on the sandbox page. prependLine = anything with internal quote marks returns the stated error, prependLine in the exact same situation but with no internal quotes works.
I apologize for the confusion.
* as I recall, prependLine was ignored when I first tried it without separate="no". The error didn't start arriving until after I cleared that up.
David,
I've not tried this so don't know if it will work, but as a workaround, could you put the module call into an include file and then use prependLine="[[include filename]]" to avoid the extra quotation marks?
Sue
The problem is that a quotation mark is interpreted as the end of an attribute. So the code prependLine="[[gallery size="square"]]" is interpreted as so:
And of course, that causes an error. So the workaround is to use the amazing method, which is of my own creation, to use modules with attributes:
In action
λ James Kanjo
Blog | Wikidot Expert | λ and Proud
Web Developer | HTML | CSS | JavaScript
Whoa. I did not see that coming.
Color me impressed.