Bugs item #2776438, was opened at 2009-04-20 09:13 Message generated for change (Comment added) made by valhallasw You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2776438...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: interwiki Group: confirmed Status: Open Resolution: None Priority: 6 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Section headers with templates are not correctly recognised
Initial Comment: Sometimes bot removes valid interwiki which lads to anchor in other article. See http://cs.wikipedia.org/w/index.php?title=Platnost_(pr%C3%A1vo)&action=h...
----------------------------------------------------------------------
Comment By: Merlijn S. van Deen (valhallasw)
Date: 2012-03-18 14:41
Message: Long story short: it's impossible to do without another API query. We can use
http://en.wikipedia.org/w/api.php?action=parse&prop=sections&page=He...
to do this. We cannot do it using regexps because of template expansions.
----------------------------------------------------------------------
Comment By: Merlijn S. van Deen (valhallasw) Date: 2012-03-17 15:30
Message: Based on the wikitext, it's hard to determine whether the section title is there (evil regexp). We could combine it with a fallback to the API with action=parse, i.e. http://de.wikipedia.org/w/api.php?action=parse&text=%7B%7B:G%C3%BCltigke...
the rewrite doesn't raise SectionErrors altogether.
options: - stripping the check - try to get the regexp working - keep a simple regexp with an API fallback
questions - how to implement this in the rewrite?
----------------------------------------------------------------------
Comment By: Merlijn S. van Deen (valhallasw) Date: 2012-03-17 14:29
Message: valhallasw@dorthonion:~/src/pywikipedia/trunk$ python interwiki.py cs:Platnost_%28právo%29 Getting 1 page from wikipedia:cs... [[cs:Platnost (právo)]]: [[cs:Platnost (právo)]] gives new interwiki [[de:Gültigkeit#Gültigkeit im Recht]] Getting 1 page from wikipedia:de... NOTE: [[de:Gültigkeit#Gültigkeit im Recht]] does not exist. Skipping. ======Post-processing [[cs:Platnost (právo)]]====== Updating links on page [[cs:Platnost (právo)]]. Changes to be made: Robot: Removing [[de:Gültigkeit#Gültigkeit im Recht]] - [[de:Gültigkeit#Gültigkeit im Recht]]
ERROR: Found incorrect link to de in [[cs:Platnost (právo)]] Submit? ([y]es, [n]o, open in [b]rowser, [g]ive up, [a]lways)
tries to refer to === {{Anker|Rechtsg\xfcltig}}G\xfcltigkeit im Recht ===\
using #G.C3.BCltigkeit_im_Recht instead does not help
removing {{Anker|...}} does work, if the #Gültigkeit im Recht version is used...
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2776438...