Information icon.svg The election booth for the RationalWiki 2019 Moderator Election is now open. Cast your votes today!

Template talk:Sex/Archive1

From RationalWiki
Jump to: navigation, search

This is an archive page, last updated 8 November 2016. Please do not make edits to this page.
Archives for this talk page:   , (new)(back)

12/13[edit]

Seems to be something wrong with this template - sometimes it displays 12 entries, sometimes 13. My limited Wiki skillz are insufficient to locate the problem, though. --AKjeldsenGodspeed! 12:00, 11 October 2007 (EDT)

The template was a part of the Human Sexuality category. I made the category part "includeonly" and now get 13 results consistently (refreshed 10-20 times or so without getting 12 results), so I think it's fixed... --Sid 15:42, 11 October 2007 (EDT)
Thanks guys! I was surprised I got it to work at all... humanUser talk:Human 17:01, 11 October 2007 (EDT)
I don't think it worked, I just counted 12. Here's what I think is happening - it is quite possible for the template to include the article currently being viewed, and I never really worried about it, thinking if that happened at would just turn up as a black link. However, I bet that it is simply not listing it when that happens. So testing the template itself won't show that issue (now that the cat has been includeonlyed). Is there a way to eliminate the "current pagename" from consideration for the random list? Not that this is really important, except for people thinking we can't count sometimes... or that we have cheap bakers... humanUser talk:Human 17:50, 11 October 2007 (EDT)
I know how to fix it, but I'm hesitating:

skipthispage

Syntax:
skipthispage=no

The default is yes, i.e. the page where your DPL query stands will never show up in the result set. Setting this parameter to 'no' may lead to runtime errors which are hard to track down. You should only use that parameter if your query is straight forward in its structure and you need the current page to show up in the result (if it matches the selction criteria).

It's exactly what we're looking for, but "may lead to runtime errors" sounds kinda ominous - no idea how they'd show up or what they'd do. This isn't my place, I'm not a sysop, so I won't put stuff in that may do damage.
I'll try something else now, but I felt like pointing out that there is an easy, but potentially buggy solution anyway. So "BRB". --Sid 18:38, 11 October 2007 (EDT)
And back. I think the workaround does what I want it to do, although there might be bugs (which I doubt at this point). I took out all pages matching the title {{PAGENAME}} from the selection between the steps "all pages from this category" and "13 random articles". Checking a couple of times led to 13 articles, so I think it worked.
My main concern had been that the matching would be too greedy, as in: the Sex page would never have Sex toys in its list. However, the matching seems to be exact, so the only worry would be two articles with the same pagename, but in different namespaces. But I don't think we actually have that case... and even then, we could probably work around that, too... maybe... --Sid 18:47, 11 October 2007 (EDT)
Yup, you didn't break it, and might have fixed it. And if we had, say, "sex" and "fun:sex" they should either be merged, or link to each other explicitly anyway. humanUser talk:Human 18:57, 11 October 2007 (EDT)
I propose giving Sid a demotion as "reward" for his hard work. Nods.gif --AKjeldsenGodspeed! 19:01, 11 October 2007 (EDT)

category[edit]

Do you guys think it is good practice to automate the catting like I did? humanUser talk:Human 18:58, 11 October 2007 (EDT)