Bugs » #29
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 16 Jul 2009 20:22, last edited on 15 Nov 2009 14:03
This bug has been fixed |
Description
ListPages included in the live portion of a live template works, but if you use a custom format with it, it displays nothing. Not even an error.
How to Reproduce
Community Polls uses a Live Template on new polls inside which is a ListPages Module designed to display poll options that the user creates from that poll page. So long as there is no custom formatting to the ListPages module, it will display the right poll options, but if you add custom editing (in order to display the rating of the particular poll option) it displays nothing.
[[module ListPages category="polloptions" tags="%%page_unix_name%%" order="ratingDesc"]]
The above works and displays any options you create (the page variable %%page_unix_name%% is used for tags because the NewPage module uses this to make sure each polls polling options are kept unique to that poll while still being stored in the same directory. This limits what users are required to input while avoiding a directory explosion from creating a new directory for each poll).
[[module ListPages category="polloptions" tags="%%page_unix_name%%"]]
%%linked_title%% - %%rating%%
[[/module]]
The above, again, in the live template, displays nothing on the same page that a module with no custom formatting does work.
View the page source at the Template itself for more information.
Browsers
Has bug
Works correctly
Workarounds
Doesn't work — If RatedPages had a tags attribute, that would allow me to use that module instead.
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.
User creates a poll using newpage module on the side, this creates a page in the Polls category. There, the live template contains a newpages module that lets them create options in the polloptions category and automatically tags it with a unique id, and contains a ListPages module that displays all polloptions pages tagged with that poll's unique tag. That tagging allows you to keep all poll options from all polls in a single category but still be able to group them with the right poll, and to do so automatically without user intervention.
Without being able to use the custom formatting for Listpages (or having a tags attribute for RatedPages), the output isn't that useful for creating a versatile easy to display ([[include poll:3]]) polling utility for the community. The current structure allows easy creation and prevents category explosion. The custom formatting/live templates bug just kills it though.
Strange. I'm using custom ListPages formats in live templates all the time, and have not seen this problem. I'll log it and we'll investigate.
Portfolio
Thank you. Is it possible that some combination of listpages custom format along with the page variable I used in the Listpages tag attribute contributed to the problem? I'll try and check that out tomorrow.
I had a problem with the newpage module that I haven't logged yet because I haven't gotten to play with it and I'm not sure I didn't make a simple mistake—when it was in the Live template, also with the %%page_unix_name%% variable in its tag attribute, it returned an error that the template I made, polloptions, wasn't in the template category (template:polloptions). I decided a live template worked better for the situation anyway and it avoided the issue. I'll test that tomorrow and make sure I didn't make a stupid mistake. If not, perhaps the two incidents are related.
I wonder if using page variables as parameters to modules is supported at all.
Piotr Gabryjeluk
visit my blog
I don't know about supported, but it does work without the custom formatting.
Confirmed. Custom formatted ListPages does not work in _template when there are tags given by %%page_unix_name%%. We're trying to fix it.
And this also was fixed loooooooong time ago ;-)
Piotr Gabryjeluk
visit my blog
Tag changed to _fixed
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.