Bug #209
Issues with $wgUrlProtocols variable and external links (externallinks) in API and at Special:LinkSearch
| Status: | Closed | Start date: | 2012-02-14 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | Lukas | % Done: | 100% |
|
| Category: | Backend / Core | |||
| Target version: | - |
Description
Two major issues:
- bad formatting on the API documentation page - every single string / text is displayed as a link resulting in limited readability
- unable to find any external links through http://rbose.org/wiki/Special:LinkSearch - the list of supported protocols is empty
Related todos
History
Updated by Lukas 3 months ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Even if protocols have been defined in config and properly parsed on wiki pages, the reported problems were observed.
According to https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Manual:$wgUrlProtocols allowed values are:- array of strings
- string containing a regular expression before 1.6.0
Therefor a change from:
$wgUrlProtocols = 'http:\/\/|https:\/\/|ftp:\/\/|irc:\/\/|gopher:\/\/|news:|mailto:|mumble:\/\/|magnet:\?';
to:
$wgUrlProtocols = array('http://',
'https://',
'ftp://',
'irc://',
'gopher://',
'news:',
'mailto:',
'mumble://',
'magnet:',
);
solved the problems.
Documented because I haven't found this solution and these bugs reported on the web, hopefully it will help someone.
Updated by Lukas 3 months ago
- Status changed from Resolved to Closed
I discovered that the table of external links was screwed up somehow. rebuildall.php and refreshLinks.php did not work. Many links which did not show up through api and Special:LinkSearch. They were present in el_to column but their value in el_index was set strangely to './'. Somehow I'm not able to edit values in that table.
To fix the externallinks table:- set the database to read only mode in wiki configuration file
- backup externallinks table
- drop the externalinks table
- created and empty version of externalinks table
- launched refreshLinks.php (you may need to disable some plugins if you see errors, like gnuplot, graphviz, etc.)
That finally worked!