Last modified: 2012-05-26 00:09:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T33992, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31992 - After removing custom prefix from the interwiki table the old links still points to the target wikis
After removing custom prefix from the interwiki table the old links still poi...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Interwiki (extension) (Other open bugs)
unspecified
All All
: Lowest normal (vote)
: ---
Assigned To: X!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-27 15:31 UTC by Helder
Modified: 2012-05-26 00:09 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Helder 2011-10-27 15:31:07 UTC
I downloaded [[mw:Extension:Interwiki]] and put the following on my
LocalSettings.php:
   require_once("$IP/extensions/Interwiki/Interwiki.php");
   $wgGroupPermissions['*']['interwiki'] = false;
   $wgGroupPermissions['sysop']['interwiki'] = true;

Then, I went to [[Special:Interwikis]] and added prefix "w2" (http://pt.wikipedia.org/wiki/$1) (trans: 0) (local: 1) to
the interwiki table.

Next, I created a page with
*[[:w2:Main Page]], which points to http://pt.wikipedia.org/wiki/Main Page
*[[:w2:en:Main Page]], which points to http://pt.wikipedia.org/wiki/en:Main Page

Then I removed prefix "w2" from the interwiki table and made an edit on the page again. The links were still pointing to pt.wikipedia.org.

I think they should not be pointing there anymore after being deleted.
Comment 1 Helder 2011-10-27 15:34:03 UTC
Besides, if I recreate the prefix "w2" pointing to another site, it still points to the previous url (i.e. pt.wikipedia.org)
Comment 2 Helder 2011-10-27 15:36:37 UTC
Using the "Edit" link doesn't change the target page either. The link will still point to the old URL...
Comment 3 Mark A. Hershberger 2011-10-27 15:38:12 UTC
Note, sql can be used to add these:

insert into interwiki (iw_prefix,iw_url,iw_local,iw_trans) values ('w2', 'http://pt.wikipedia.org/wiki/$1', 1, 0);
 insert into interwiki (iw_prefix,iw_url,iw_local,iw_trans) values ('en2', 'http://en.wikibooks.org/wiki/$1', 1, 0);
Comment 4 Mark A. Hershberger 2011-10-27 15:41:50 UTC
Note that ?action=purge on pages where the links exist makes them disappear (become redlinks).
Comment 5 Helder 2011-10-27 16:09:13 UTC
After action=purge, the links are still blue, and pointing to the old url.

The problem also happens on trunk version.

The command 
    select * from interwiki where iw_prefix in ('w2');
returns
    Empty set (0.01 sec)

and this is consistent with the table displayed on [[Special:Interwikis]].
Comment 6 Daniel Friesen 2011-10-28 01:52:22 UTC
php maintenance/clear_interwiki_cache.php
Comment 7 Robin Pepermans (SPQRobin) 2012-05-25 17:09:10 UTC
I doubt any wiki outside WMF uses the interwiki cache, as the script building it is WMF-specific (in WikimediaMaintenance). It is impossible to modify the interwiki cache through Special:Interwiki.

And clear_interwiki_cache.php clears, well, the interwiki cache so this won't have any effect.


And I haven't had the described problem, it works for me.
Comment 8 Robin Pepermans (SPQRobin) 2012-05-25 22:32:02 UTC
Correction for my previous comment:

Now I understand that there are two types of interwiki caching, and clear_interwiki_cache.php is for the memcached caching, so in case the wiki uses memcached, clear_interwiki_cache.php can indeed be used.

I documented this on https://www.mediawiki.org/wiki/Interwiki_cache, there was almost no documentation on this.

So what the Interwiki extension could do is just clear the cache for the deleted prefix. Should be simple enough.
Comment 9 Robin Pepermans (SPQRobin) 2012-05-26 00:09:18 UTC
Correction again :)

Apparently this has been fixed in the extension a month ago, in r114912. So it will delete the interwiki prefix in memcached too, when deleting a prefix through Special:Interwiki.

So, assuming the bug reporter was using memcached, I'm marking this bug as resolved.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links