Extension talk:ExternalLinks
This page used the LiquidThreads extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
wgELtoolboxLink
$wgELtoolboxLink on version 1.1
If I enable $wgELtoolboxLink, I get this error:
- Call to undefined method SkinMonoBook::getTitle() in /usr/share/mediawiki-extensions/externallinks/ExternalLinks.php on line 30
I'm using mediawiki 1.15 (Debian/stable) on my server.
--Hans Bausewein Thu Oct 18 20:49:58 UTC 2012 Hans Bausewein (talk) 20:53, 18 October 2012 (UTC)
- Thanks, will fix later this evening. Subfader (talk) 08:33, 19 October 2012 (UTC)
- Fixed in version 1.1.1 Subfader (talk) 17:37, 19 October 2012 (UTC)
- Works!
- ... but ...
- I had to add a check for $wgELenableSessionStoring to avoid updating the 'el_last_validated' column:
if (($wgELenableSessionStoring) &&( $storeSession != NULL )) { $this->updateLastValidated( $link ); }
- Or maybe the links should contain storeSession=off if $wgELenableSessionStoring=false?
- (or better both) Hans Bausewein (talk) 18:40, 21 October 2012 (UTC)
User rights, open_basedir and
Hi Subfader,
first thanks for this great extension!
However, I encountered some issues:
- It seems the default setting for $wgELuserRight is not 'edit'. If I don't set $wgELuserRight at all even sysop can't see the special page (neither anons nor other user groups). If I set $wgELuserRight to 'edit' in LocalSettings it works fine.
- I enabled the link checker (by setting $wgELvalidationMode to cURL). If I run a link check the results are returned but I get dozens of the following warnings:
- Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in /var/www/web1388/html/mediawiki_test/mediawiki/extensions/ExternalLinks/SpecialExternalLinks.php on line 462
- Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in /var/www/web1388/html/mediawiki_test/mediawiki/extensions/ExternalLinks/SpecialExternalLinks.php on line 462
- safe_mode is off. Do you know how I can fix this?
- What does $wgELtoolboxLink do? I set $wgELvalidationMode to cURL and the checkbox to check links appears. It seems I don't need $wgELtoolboxLink to see the checkbox.
Thanks. Stefahn (talk) 17:12, 25 October 2012 (UTC)
- $wgELuserRight: I found the bug. Will upload a new version later.
- php error: No idea if safe_mode is really off :/ I googled "CURLOPT_FOLLOWLOCATION open_basedir safe_mode off" and found solutions like changing the host. Try editing SpecialExternalLinks.php and set
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
tocurl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
- Not sure if validating with CURL will still work then. - $wgELtoolboxLink: The description was unclear. It adds a toolbox link in the sidebar to "validate external URLs" used on the current page. The link will appear on non-special pages to users allowed by
$wgELuserRight
. Subfader (talk) 14:53, 16 November 2012 (UTC)
Search by namespace
It would good to be able to sort by namespace on this extension. Inops (talk) 17:52, 14 November 2012 (UTC)
success instand of error in exaple.cm
Hello, I've tried the extension. Soon I had my first problem. I had to use absolute paths in the LocalSettings.php. Now I have another problem:A Link, which doesn't exit hat a true result (the bottom is the Firefox-extension HTTPFox.): http://www.mediafire.com/view/?dbxx5j42hbom3g0
m.f.G.:Thomas Zach
Edit:I use CURL. I will try the other method. Thomas1311 (talk) 19:56, 14 January 2013 (UTC)
- It works with getHeaders!
- --Thomas1311 (talk) 15:45, 18 January 2013 (UTC)
Extension broken in MW1.21
The function wfLoadExtensionMessages has been removed in Mediawiki 1.21.1, please remove this line from the extension :) MathiasLidal (talk) 08:49, 2 August 2013 (UTC)
- Confirmed, it does not work in 1.21.1 217.196.8.10 12:27, 2 August 2013 (UTC)
Question mark in Server response
I installed the extension, but in Server response it only shows ? -mark for real external links. But links which are pointed to same wiki http://mywiki.com/wiki/pagename are shown correctly. How would I solve the problem?
My MediaWiki version is 1.22.2 and with $wgELvalidationMode = 'cURL'; the php info() for "cURL support" is "enabled".
Thanks! 89.166.60.185 06:43, 3 May 2014 (UTC)
Extension:ExternalLinks/Translation
Is it valid translation? I thought translation was to be done at translatewiki.net.... — Revicomplaint? 06:51, 3 May 2014 (UTC)
- Yes, since this extension is not handled via the WMF repository and is thus not getting translations. However, I do not know how this fits into existing code, i.e. if the extension provides I18n capabilities. [[kgh]] (talk) 07:27, 3 May 2014 (UTC)
- I will contact author of this extension to ask if it is valid. — Revicomplaint? 07:30, 3 May 2014 (UTC)
- Great idea. Probably he will incorporate the translations into the next version. [[kgh]] (talk) 07:45, 3 May 2014 (UTC)
- I think you talk about finnish translation I few hours ago added. I translated it for my own use and supposed it would be handy for some others if needed. I did not find extension from translatewiki.net so I added it to the page you offered. It works fine when just add it after english and german translations in existing file. 89.166.60.185 09:18, 3 May 2014 (UTC)
- Yep, but I think translation of MediaWiki extensions are usually done in transltewiki.net and I thought it was not a good way of translations. It should be in the code already when you get the code. — Revicomplaint? 09:21, 3 May 2014 (UTC)
- Yes, I agree with you! I tried this extensions's front page link (in the green box) Translate the ExternalLinks extension if possible but there was not translation for that in translatewiki. I'm not yet familiar how to add a translation there.
- Many times when you click same kind of link on other extensions, they straight open the translatewiki.net page on your language and you can straight start to translate. I supposed, there is not any translation of this extension and that was my reason to do this way. If I find a way to do it in translatewiki, I'll be happy to move them there. 89.166.60.185 10:33, 3 May 2014 (UTC)
- It is only possible to translate an extension if it is available at translatewiki.net, so if the link points into the void it is not available there. An extension must be in the WMF repo for this as mentioned in my first post to this thread. I have done a change to the wording within the info box. If it lasts it will hopefully be easier to figure out and not as confusing. [[kgh]] (talk) 19:15, 3 May 2014 (UTC)
- Yep, but I think translation of MediaWiki extensions are usually done in transltewiki.net and I thought it was not a good way of translations. It should be in the code already when you get the code. — Revicomplaint? 09:21, 3 May 2014 (UTC)
- I think you talk about finnish translation I few hours ago added. I translated it for my own use and supposed it would be handy for some others if needed. I did not find extension from translatewiki.net so I added it to the page you offered. It works fine when just add it after english and german translations in existing file. 89.166.60.185 09:18, 3 May 2014 (UTC)
- Great idea. Probably he will incorporate the translations into the next version. [[kgh]] (talk) 07:45, 3 May 2014 (UTC)
- I will contact author of this extension to ask if it is valid. — Revicomplaint? 07:30, 3 May 2014 (UTC)
Table in German Mediawiki 1.22
I Think, the wikitable script ist not loaded. Is there a switch, to turn it on? [[User:Bmrberlin| Bernd M.]] (talk) 12:22, 1 September 2014 (UTC)
Wiki urls
I use Mediawiki 1.19.2 and habe Problems with links like
which have falsely the error Domain Not Found? I use the parameters as in the example Amabu (talk) 13:23, 27 November 2014 (UTC)
- I further have a strange field Site ID [ ] and no results. Works only for the first site when id=1 , otheriwse the wiki returns to the startsite Amabu (talk) 13:35, 27 November 2014 (UTC)
- This plugin scans only one page with problems and is not supported
- The proposed alternative is a firefox-ping-plugin, but ....
- The better solution is XENU with wildcards
- http://home.snafu.de/tilman/xenulink.html#wild
- (because of the scan of old deleted pages)
- with like
- action=history*
- /Discussion:*
- and also *oldid=*
- and
https support
I tried the following and it seems to work:
removing the if:
lines 448-452 and 466
inserting line
456 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
see http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/
Rainbow_75 178.7.186.131 (talk) 17:22, 20 February 2016 (UTC)
Not working on MW 1.27.1
- Breaks the wiki if $wgELuserRight is used. Then although it's listed at Special:Version Special:ExternalLinks doesn't work. Also there is no Validate external URLs in sidebar. Rob Kam (talk) 22:18, 5 September 2016 (UTC)
- Cannot fix since I can't even log in to MW 1.27.1. Subfader (talk) 13:45, 7 September 2016 (UTC)
- Just installed 1.1.3 with MW 1.27.1 - added $wgELvalidationMode = 'cURL'; to LocalSettings.php. Links are detected correctly but not validated. Anything else required to enable validation? Anthony Jay Corman (talk) (talk) 17:38, 29 November 2016 (UTC)
- Very strange: reinstalling in a clean MW 1.28, I see ExternalLinks in Versions but not listed on Special Pages. In the PHP error log I see this: PHP Warning: Parameter 1 to efExternalLinksToolbox() expected to be a reference, value given in /Applications/MAMP/htdocs/wiki/includes/Hooks.php on line 195 Anthony Jay Corman (talk) (talk) 20:39, 24 January 2017 (UTC)
Solution for https
I found a solution for https: http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/ basically in your if clause on row 448 I removed
$respNum = ;
with the content of the else clause and added
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
It works now, but I get "forbidden" or "not found" on some https-links that deliver PDF-documents, not HTML pages. Krabina (talk) 14:32, 6 October 2016 (UTC)
Declined extension on Miraheze
The extension has been declined on Miraheze wiki farm because of security concerns. https://phabricator.miraheze.org/T1555
Please can these be resolved? This is a vital extension for any wiki (imho should be in core). Rob Kam (talk) 12:19, 26 March 2017 (UTC)
XSS Vulnerabilites
Hey, just wanted to let you know that there are some pretty obvious XSS flaws in this extension.
The variables $filterURL
and $filterURLnot
are fetched from the http request and put right back into the HTML without validation. Consider using the HTML class instead of raw HTML. BrentLaabs (talk) 07:30, 6 April 2017 (UTC)
- I think $request->getVal() has security checks built in: Manual:WebRequest.php Subfader (talk) 11:21, 16 September 2017 (UTC)
Regarding alternatives
- Wikimedia uses the DeadlinkChecker library
- m:Fixing dead links
- m:InternetArchiveBot
- mw:Manual:Pywikibot/refLinks
- mw:Manual:Pywikibot/weblinkchecker.py
- w:Link rot
- w:Wikipedia:Link rot
- w:User:InternetArchiveBot Rob Kam (talk) 10:57, 12 September 2017 (UTC)