User talk:Dispenser/Dablinks

dabfinder error
Wasn't sure how to contact you on ToolServer so I figured this would be the next best place. The script doesn't appear to be working.

./dabfinder.py Web pywikipedia --> -->  Python 2.5.2: /usr/bin/python Thu Jan 1 00:07:42 2009

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

/home/dispenser/public_html/cgi-bin/dabfinder.py in 130                wikipedia.startContent(form=False) 131                main 132        finally: 133                wikipedia.endContent(replag=replag ) 134                wikipedia.stopme wikipedia = , wikipedia.endContent = , replag = /home/dispenser/public_html/cgi-bin/dabfinder.py in replag 21        """ Lazy man's Replag, determines the date of the newest entry   22         """ 23        c = db.cursor 24        c.execute("SELECT time_to_sec(timediff(now,rev_timestamp)) as replag FROM revision ORDER BY rev_timestamp DESC LIMIT 1") 25        return c.fetchone[0] c undefined, db undefined

: global name 'db' is not defined args = ("global name 'db' is not defined",) message = "global name 'db' is not defined"

Thanks for such a useful tool! §hep  •   ¡Talk to me!  00:11, 1 January 2009 (UTC)

Your Dab tool
Instead of going alphabetically, could you arrange the tool to list dab link be section header? It would make life a lot easier. TomStar81 (Talk) 04:39, 8 January 2009 (UTC)
 * The tool currently queries the Toolserver databases for all information. It is a wonderful idea, but it requires downloading the page.  You may wish to use User:Splarka/dabfinder.js.  — Dispenser 06:50, 26 January 2009 (UTC)
 * Oh, well. Thanks anyway. TomStar81 (Talk) 05:28, 8 February 2009 (UTC)

False alarm on Daylight saving time
When I apply the tool to Daylight saving time, the result says the article links to the disambiguation page DST (disambiguation). But this is done inside a dablink hatnote: The tool is supposed to ignore links from about to dabs, right? It currently is ignoring the link to Summer time (disambiguation) so my hypothesis is that the tool has a limit of ignoring at most one such dab. It should ignore them all. Eubulides (talk) 19:35, 7 October 2009 (UTC)
 * Fixed it for you. It only ignore those with circular linking (Topic X → Disambiguation → Topic X) which is the intent of of the hatnotes.  The problems only come when dealing with redirects, it ignores then if they are linked from the disambiguation page, but not from the article pages.  — Dispenser 21:59, 7 October 2009 (UTC)

Edit summary
How about including an edit summary that we can use on the articles after fixing the links to dabs? Something like, "Fixed disambiguation links using Dablinks." It'd be nice to raise awareness of this tool.  Mahanga Talk 18:03, 20 October 2009 (UTC)
 * Sorry about the long response, I had wanted to keep silent before unveiling Dab solver. It'll try provide an intelligent edit summary with link if you don't put any in.  — Dispenser 02:36, 2 February 2010 (UTC)

Problem with non-Latin letters in templates
Hello. I started to write a userscript that would call your nice tool with callback parameter. Unfortunately, there seems to be a bug with non-Latin characters in template names. When I try to get http://toolserver.org/~dispenser/cgi-bin/dablinks.py?format=json&page=ru:KDE it outputs the error page with the following data inside:  ... : 'ascii' codec can't decode byte 0xd0 in position 56: ordinal not in range(128) args = ('ascii', '{"ns":0, "title":"Harmony", "linksback": 0, "template":"\xd0\x9d\xd0\xb5\xd0\xbe\xd0\xb4\xd0\xbd\xd0\xbe\xd0\xb7\xd0\xbd\xd0\xb0\xd1\x87\xd0\xbd\xd0\xbe\xd1\x81\xd1\x82\xd1\x8c"}', 56, 57, 'ordinal not in range(128)') encoding = 'ascii' end = 57 ... where "template" value exactly corresponds to UTF8 representation of the template name ru:template:Неоднозначность (our version of ) which is inside Harmony page. Could you please take a look and hopefully fix this issue? Thank you. — AlexSm 17:53, 26 October 2009 (UTC)


 * I accidental joining a unicode string with the byte string which cause the whole thing to be converted to a unicode string. This has been fixed.  The support for foreign language wiki is limited somewhat for non-english namespaces, mostly due to a lack of demand.  — Dispenser 18:45, 26 October 2009 (UTC)

Help
I am completely failing to understand how User:Dispenser/Dablinks is telling me how to resolved the dabs. Perhaps it is intended for someone with a deeper background than mine. Jim.henderson (talk) 19:43, 14 March 2010 (UTC)


 * There are currently two tools Dablinks and Dab solver. Dablinks identifies disambiguation links on a page and can be combined with generators to scan lists and categories of pages.  Dab solver is a new tool which assists in quickly disambiguating all links on a given page.  General instruction on manually fixing disambiguation pages is given at WikiProject Disambiguation/Fixing a page.  This subject page is just for documenting the parameters that can be passed to Dablinks.  — Dispenser 04:53, 6 April 2010 (UTC)

Suggestion
Can you make it so I can save from the tool, instead of redirecting to the page to save, and so it stays in the program. After saving, I have to go to my user page to refind the link for the tool. C T J F 8 3 chat 19:30, 18 March 2010 (UTC)


 * The question is a bit vague on details. I will not setup a bot that users can save through, since enwiki users are too bot phobic.  You can enable the save button in the preference menu by storing your edit token, which is usually good for an hour.  If you're having trouble navigating you can install bookmarklet or user script to move between the tool and Wikipedia quickly.  Also, you may not be aware but right clicking on the back button gives a menu to jump back multiple pages.
 * Or... A while back I was toying around with the idea of creating something like AWB for the web. I abandoned it after the admins got annoyed at how I worked around The Rules to get a feature working.  However, most of the concepts and maybe code could be reused to steamline the disambiguation process with Dab solver.  — Dispenser 05:59, 6 April 2010 (UTC)
 * I guess the back button is an easy solution. Just curious as to why edits can't be saved from within the tool, and you have to use the show preview, and then save it on Wikipedia?  C T J F 8 3  chat 06:15, 6 April 2010 (UTC)
 * You must be using Internet Explorer 8. I had to disable those buttons since the "XSS Filter" would purposely corrupt the textarea after loading the first diff or preview page.  Downgrade to IE7 or use either Firefox or Google Chrome.  — Dispenser 17:44, 6 April 2010 (UTC)
 * I actually have FF 3  C T J F 8 3  chat 17:52, 6 April 2010 (UTC)
 * It is because a) MediaWiki security feature (see Edit token) and 2) Toolserver tools may not ask for password (Rules #8). You would still end up landing on the Wikipedia page using the edit token.  — Dispenser 19:40, 6 April 2010 (UTC)
 * Ok, thank you,  C T J F 8 3  chat 20:14, 6 April 2010 (UTC)

The Dab'n suffix "disambiguation"
A counter-productive behavior of the bot would be explained if it were set up in light of a misconception. That misconception is
 * The sole purpose of the title John Adams (disambiguation) is to provide a title for the page disambiguating among the senses of "John Adams", in light of the fact that the 2nd president of the US is the primary topic for the "base title" "John Adams", and the Dab can't be at John Adams since that page has that pres't's bio.

The truth is that there are many Rdr pages with the suffix, always pointing to a Dab with the unsuffixed title. For instance, Jerk (disambiguation) is a Rdr to the Dab pg Jerk, since there is no topic that would be a primary topic for the title "Jerk". The purpose of this is described at WP:Dab, and permits countering the above misconception with
 * Both John Adams (disambiguation) and Jerk (disambiguation) share (with each other and every page with that suffix) a common purpose (in addition to the former's necessary purpose of providing a place for the Dab that's distinguishable from that of the primary topic) of permitting editors to link (directly or via an intentional Rdr, depending on whether there's a primary topic) to the Dab page in a way that makes it clear the link is intentional.

By failing to respect the plain intent of editors who place lks to pages so suffixed, the tool misleads users by suggesting that such links either are never valid, or are so rarely valid that the plain intention should not be accepted at face value. I'm not sure that that matters when such a link appears within a prose passage, but they are so common within Dab pages (usually in the "See also" section) and some other kinds of lists that such occurrences cannot reasonably be lumped together with links to Dabs without that suffix. IMO, suggestions to consider "fixing" links from Dab pages to "disambiguation"-suffixed pages (whether Dabs or Rdrs to Dabs) should not ever be displayed on the corresponding talk pages. I also think it would probably be better to never suggest on talk pages the "fixing" of links to "disambiguation"-suffixed pages, than to list them when they appear in See-also sections or in non-prose portions of SIA pages. That being said, i found the tool's talk page annotation quite useful in the last 6 hours of my editing, and appreciate its creation! --Jerzy•t 07:11, 27 May 2010 (UTC)


 * I think your confusing three different things: WildBot, Dablinks, and Dab solver. WildBot tries to respect the conversion of linking to a disambiguation page by not listing titles with  in them.  Dablinks uses a more sophisticated method of circular link detection to determine if a link is the primary topic.
 * I am not convinced that linking to a disambiguation page is ok, because linking to wiktionary (definitions), creating or find a red links (notable topic), creating a redirect to a section (not notable enough), or unlinking (non-notable) are always better choices. All these methods assume that your running it on an article, there are different rule for formatting disambiguation pages.
 * If you suggesting the creation of a tool to detect if a link might be using the primary topic incorrectly. Its already been done, it isn't as useful as you might think.  — Dispenser 14:31, 27 May 2010 (UTC)

List of The Apprentice Candidates (UK)
Your tool is listing circular redirects for this article which don't exist. (Or at least I can't find them.) Help? &mdash;D'Ranged 1 talk 06:26, 3 May 2011 (UTC)

Dabsolver incorrectly reporting a Section Link as invalid
Dabsolver incorrectly reports the section link in RNT Studio as invalid when it is fine (see RNT Studio) and unhelpfully attempts to change it to RNT Studio without even offering a choice about whether to change this. I therefore had to abandon using Dabsolver.

Jim Craigie (talk) 12:56, 11 November 2011 (UTC)


 * Section titles are volatile and any change (e.g. capitalizing, correcting dashes, or renaming) will break existing links. The only way to check for these broken links is to download the target page's HTML which happens to be computationally expensive (just ask WildBot).  The commonfixes library (which Dab solver can use if checked on the landing page) attempts to find the closest matching section redirect to replace the text.  This method limits checking inbound links to the small set of redirects and makes breaking off sections easier.  Finally, "INVALID ATTRIBUTE : Removing: ;" was referring to invalid HTML markup in the table not the redirect.  — Dispenser 02:16, 13 November 2011 (UTC)

couple of Dab solver observations
First one is mundane: why is this calling the template a disambig?

Second, I've noticed that if you aren't logged in, it can take a long time for Dab solver to load. Any more, when I see it hanging, I just open an empty link to Dabfix, log in, and reload Dab solver. Works for me, but could be a problem for inexperienced users. -- Ja Ga  talk 15:55, 11 November 2011 (UTC)


 * First one is obvious, Template messages/Cleanup transcludes disambiguation cleanup which is listed on MediaWiki:disambiguationspage as a template for marking disambiguation pages. Other programs typically don't handle non-mainspace disambiguation pages like Blanking.  Dab solver doesn't handle these since its tricky to write multilingual regular expressions and the corner case of needing to prefix ':' to Category and File links.


 * The second one is trickier. Signing in only temporarily stores the  and only echos it for the edit box (and enables "Save Page").
 * The real-time tally bar may be responsible for your slow down as it executes some queries which could take longer then expected. Fortunately, they have short timeout intervals (<5 s) and the query-killer should kill them within 15 seconds.  Additionally, it has some watchlist magic which uses WMF's API interface.  Typical response times for the API is between 0.5 and 3 seconds.  Of course all this varies dependent on intermediate caches.
 * That's the stuff before the page is rendered. Afterwards, a loading message is splashed up and related.py script is call which tries to compute the "relatedness".  This is the most costly operation, with a median time of about 5 seconds.  Optimizing this bottle neck is proving to be difficult and likely the best method is to build a graph tree in Java (like with the Connectivity Project).  — Dispenser 00:24, 13 November 2011 (UTC)


 * Fixed I eventually was able to reproduce the problem.  My real time points adder was using (rev_id, rev_user_text) which no index exists for instead of usertext_timestamp (rev_timestamp, rev_user_text).  — Dispenser 02:44, 13 November 2011 (UTC)
 * Awesome, thanks! -- Ja Ga  talk 21:47, 13 November 2011 (UTC)

Dablinks missed one?
Check this out:

But if you look at the article, it does link to the disambiguation page Will Brown. -- Ja Ga  talk 20:13, 15 November 2011 (UTC)

bug report - when disambig article name contains double quotes.
hi.

it turns out there is a problem with the tool when used in "json/callback" mode, when one of the articles it tries to return contains double quotes in its name.

you can see an example in this link, that returns as one of the disambiguationlinks he:ש"ס.

the problem is the generated callback (note the title of first "disambiguationlinks"):

specifically, note: "title":"ש"ס". this cause the callback to fail with "Uncaught SyntaxError: Unexpected identifier"

quotes as part of an article name are pretty common on hewiki, because in hebrew quotes are used to denote acronyms.

thanks, peace - קיפודנחש (talk) 18:08, 18 December 2011 (UTC)


 * Fixed. Thanks as this was a pretty bad security bug.  — Dispenser 06:04, 19 December 2011 (UTC)
 * thanks! peace - קיפודנחש (talk) 15:59, 19 December 2011 (UTC)

interiwki simple:
tools:~dispenser/cgi-bin/dablinks.py?ref=simple:ABC has problems with simple:, it seems like it doesn't even know what simple: is.

In a unrelated note, is there a way to exclude namespaces, or only concentrate on article space? Josh Parris 04:06, 27 March 2012 (UTC)

Problem in ruwiki
Hello, Dispenser. I see here a section about lack of demand, written in 2009. Now I brought some demand to you: your tool works good in russian wikipedia, but refuses to work in Templates namespace, which is called "Шаблон" in russian. Script returns "No dab links found" or smth like that, and if I move template's code to a namespace #0, then it works fine. Could you please fix it? In ruwiki we have alot of disambig links in templates. --Rave (talk) 20:24, 5 January 2013 (UTC)

How often is the data updated?
I thought dablinks was updated constantly or at least daily. When running the dab for Sandwich, it's showing links that don't exist. Namely, the redirect Grilled cheese redirects to Cheese sandwich, not to Grilled cheese (disambiguation) as indicated by dablinks. And there's no backlink to Sarnie, either. Why would the tool show this? Ibadibam (talk) 00:01, 20 April 2013 (UTC)

Namespace
Hi Dispenser. I love dablinks. Any way of limiting the tool to main namespace only (on Czech Wikipedia)? Regards Littledogboy (talk) 16:07, 19 June 2013 (UTC)

Outdated link in summary
The link in summary - as seen in cawiki - points to https://toolserver.org/~dispenser/view/Dab_solver, wich is outdated. It should be updated to the present tool.

Anyway, this tool is great.--Pere prlpz (talk) 22:46, 14 December 2014 (UTC)
 * I found out what the actual link is - it is http://dispenser.homenet.org/~dispenser/cgi-bin/dab_solver.py MadGuy7023 (talk) 23:01, 24 February 2015 (UTC)
 * I know, but showing it correctly in summary would help more people to know about the tool. Anyway, there are more important things to update - for example, the noreferences.py version used.--Pere prlpz (talk) 08:59, 25 February 2015 (UTC)

Dablinks malfunction
I'm trying to use the tool to sort dablinks on my watchlist. I'm clicking on fix and then selecting the relevant option from the drop down list. I then save my changes but the tool then appears to be blanking the article up to the Dablink I've just tried to fix. Happened here and here. Any ideas? 5 albert square (talk) 16:40, 24 November 2015 (UTC)


 *  Fixed  And I've repaired all affecting edits.  — Dispenser 19:12, 24 November 2015 (UTC)
 * Thanks. I just tried it on a couple of articles and appears to be OK for me now. 5 albert square (talk) 14:27, 25 November 2015 (UTC)

Turning off common fixes?
Above it was mentioned that on the landing page, there were a checkbox to turn off the common fixes. I don't see that checkbox.This is the landing page, right? I'm viewing the page on a tablet PC. --Distelfinck (talk) 18:50, 14 December 2015 (UTC)


 * That would actually be on the Dab solver's landing page. But preferences has been migrated to sign in drop down (top right) where you can disable from there.  — Dispenser 19:04, 14 December 2015 (UTC)


 * Ahh there it is! Thanks --Distelfinck (talk) 20:06, 14 December 2015 (UTC)

Dablinks not working
Hi everyone,

Dablinks is not working for me?

I go on to the tool, click Dab solver and click Watchlist Dablinks. Under there, ITV is showing as a disambiguation page, I click on Fix list and the following error appears:

No webservice

The URI you have requested, /dplbot/dab_fix_list.php?title=ITV&client=watchlist_points, is not currently serviced.

If you have reached this page from somewhere else... This URI is part of the dplbot tool, maintained by Russell Blau and JaGa.

That tool might not have a web interface, or it may currently be disabled.

If you're pretty sure this shouldn't be an error, you may wish to notify the tool's maintainers (above) about the error and how you ended up here.

If you maintain this tool You have not enabled a web service for your tool, or it has stopped working because of a fatal error. You may wish to check your logs or common causes for errors in the help documentation Any ideas?--5 albert square (talk) 21:14, 21 January 2016 (UTC)


 * The dab fix list isn't my tool. But since everyone keeps asking, I've asked to become a maintainer.  I probably should copy it since somehow despite the computer bluescreening today, I'm told it has better uptime than Labs.  — Dispenser 01:29, 22 January 2016 (UTC)