User talk:SuggestBot

From Wikipedia, the free encyclopedia
Jump to: navigation, search

If you're here because you want SuggestBot to send you suggestions, please see the instructions at the top of User:SuggestBot. We offer both subscription services and the possibility of receiving a single set of suggestions.

Feedback on recommendations, ideas for new features, questions about how SuggestBot works, or anything else related to SuggestBot are all examples of topics welcome below. A bot moves older feedback to the archives regularly, there is also an archive in User:SuggestBot/FeedbackArchive. Thanks for stopping by to let us you what you think! Cheers, Nettrom (talk) 11:07, 25 December 2013 (UTC)

Lists inside spans[edit]

Hi, I noticed that WP:Community Portal/Opentask attempts to nest every list inside a span. This is non-conforming to HTML5 spec, and MediaWiki gets weird with it. The result is the spans get cloned and moved inside the line items, causing non-validating HTML output due to duplicate HTML id's.

This wikitext:

<span id="copyedit">
* [[...]]
* [[...]]
* [[...]]
* [[...]]
* [[...]]</span>

Generates this HTML:

<li><span id="copyedit"><a href="...">...</a></span></li>
<li><span id="copyedit"><a href="...">...</a></span></li>
<li><span id="copyedit"><a href="...">...</a></span></li>
<li><span id="copyedit"><a href="...">...</a></span></li>
<li><span id="copyedit"><a href="...">...</a></span></li>

This is an easy fix for the page itself — replace the spans with an element that allows lists inside, such as div. SuggestBot would need an update, though. Would it be possible, in, to edit these regular expressions to work with any tag and not just span? Or, if that's not possible, just swap span for div?

                for (taskId, pageList) in self.foundTasks.iteritems():
                        tasktext = re.sub(ur'<span id="{taskid}">(.*?)</span>'.format(taskid=taskId),
                                          ur'<span id="{taskid}">{pagelist}</span>'.format(taskid=taskId, pagelist=pageList),

Matt Fitzpatrick (talk) 05:52, 4 September 2017 (UTC)

Hi Matt Fitzpatrick, thanks for bringing this to my attention! I should've known better than to put a block level element (ul) inside an inline element (span) like that, and I'm not surprised the end result is some horrible HTML. Both of your suggestions should be possible, but I'm not sure which one I prefer. Allowing any HTML element makes for a slightly incomprehensible regular expression (see below), whereas using div is similar to the one we already have. But, I can also see that specifying that div has to be used makes future updates more difficult since they'll require a code update as well. If you have a preference, feel free to let me know.
I'll have to do some testing, but I think this is what the regular expression will look like if we allow any element (I'll make sure it's case-insensitive matching as well):
<([a-z][a-z0-9]*) id="{taskid}">(.*?)</\1>
Cheers, Nettrom (talk) 02:41, 5 September 2017 (UTC)
The regex any tag and backreference is a neat idea. Still, I'm starting to lean toward the simple <div> version. The tag could change someday, but so could the attributes. It seems hard to try to predict the future, but easy to change to a known tag when the time comes. Matt Fitzpatrick (talk) 04:31, 5 September 2017 (UTC)
Matt Fitzpatrick: I'm also in favor of keeping it simple for now. If things change in the future, we can revisit and adapt. The change has been implemented and code updated and seems to be working fine. The HTML is much better, thanks again for bringing this up so I could fix it! Cheers, Nettrom (talk) 17:27, 9 September 2017 (UTC)

Missing regular suggestion(s)[edit]

My last new message with new suggestions was two weeks ago. I was wondering if I'd somehow 'unsubscribed' or is this down to the 'move' noted here. Thanks. Eagleash (talk) 10:07, 30 September 2017 (UTC)

Hi Eagleash, thanks for getting in touch about this! Our lack of sending out suggestions is related to the move we did. I've had some chaotic weeks here and not gotten around to setting SuggestBot up to send them out as it should. In the meantime it's been serving up one-time requests just fine, so everything seems to be working. I had a bit of time today to get things set up correctly and you should get the next set of suggestions in a few hours!
BTW, I had a look at your user page, enjoy the Malaysian GP tomorrow! Thanks again for nudging me to get SuggestBot working properly, and for using the bot, appreciate it! Cheers, Nettrom (talk) 22:44, 30 September 2017 (UTC)
Thanks; look froward to some new suggestions. Not so much Malaysian GP, although one of the main protagonists starting from the back may make it a bit more interesting than usual! Best regards, Eagleash (talk) 23:10, 30 September 2017 (UTC)

Make shorter[edit]

Make less suggestions, like ten suggestions. i forget which ones i did and it takes up space. — Preceding unsigned comment added by Ilovemathtothe6power (talkcontribs) 21:27, 30 September 2017 (UTC)

More than 500[edit]

The main issue I have with this is that it only bases it off my last 500 edits. My last 500 edits are never representative of my patterns. This time it overrepresented articles relating to India. It should include far more than 500 edits in the calculation.  — Mr. Guye (talk) (contribs)  00:41, 1 October 2017 (UTC)


I also encourage you to have more customizations. — Mr. Guye (talk) (contribs)  00:43, 1 October 2017 (UTC)

WikiProject Suggestions[edit]

I used the Wikipedia:Teahouse/Suggestions/SuggestBot template on my talk page with category1=WikiProject_Databases, in hopes of getting a list of suggested edits for pages within that WikiProject. The results include many pages that aren't tagged with the WikiProject Database template. Was this intended, or a bug? Linearizable (talk) 20:12, 15 October 2017 (UTC)