LinkTitles will link to text inside a template tag i.e., {{Author|test test}}
which is bad as it may link to a part of the text and thus break the template. Has anyone else seen this behavior and perhaps know how to fix?
LinkTitles will link to text inside a template tag i.e., {{Author|test test}}
which is bad as it may link to a part of the text and thus break the template. Has anyone else seen this behavior and perhaps know how to fix?
Hi, it should not break the template -- I'll have to look into it. However, you can disable linking inside templates right now, it's configurable: https://github.com/bovender/linktitles#dealing-with-templates
Would you be able to provide an example of a template and a page title that breaks it that I can use for testing?
( ! ) Deprecated: Using ${var} in strings is deprecated, use {$var} instead in C:\wamp64\www\wiki\extensions\LinkTitles\includes\Special.php on line 184
Warning: Cannot modify header information - headers already sent by (output started at C:\wamp64\www\wiki\extensions\LinkTitles\includes\Special.php:184) in C:\wamp64\www\wiki\includes\WebResponse.php on line 75
using MW 1.39.6
PHP 8.2.13
Thanks for the hint, it's fixed in main (https://github.com/bovender/LinkTitles), I'll create a release in the next couple of days, please bear with me.
Hello,
When editing "heavy page" am getting this error :
"Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/wiki/extensions/LinkTitles/includes/Splitter.php on line 88"
When i change $wgLinkTitlesParseOnEdit = true; to $wgLinkTitlesParseOnEdit = false;, the error disappear.
A look to the file /LinkTitles/includes/Splitter.php lead to this fucntion "return preg_split( $this->splitter, $text, -1, PREG_SPLIT_DELIM_CAPTURE );"
Any idea how to improve the time execution?
Thanks!
There's no quick'n'easy way to improve this, unfortunately. The regex splitting is an expensive operation. Workarounds: Increase the execution time limit in php.ini, or consider splitting the page into several pages. I guess that's what you didn't hope to hear...
I believe commands ran from the command line don't face time limit restrictions. You might want to try running the script from there.
Hello, I just wanted to know if someone could share a wiki using LinkTitle? It would be useful to justify its use for a company wiki.
I'm afraid not. I'm aware of a couple of private wikis, but I don't know if a public wiki uses this.
There's not a lot of code, so if your managers are worried about data safety and security, you might want to have someone look at it with some knowledge of PHP?
Thank you for your quick answer. Yes, I just wanted to find an easy way to show the extension for people with little to no experience in PHP. Main worries are about efficiency or how the extension behaves with various names that could appear in a normal sentence.
Hi, unfortunately, MediaWiki 1.32 introduced changes in the code that prevents the LinkTitles extension from adding links when a page is being saved. This is likely not going to change. A workaround is to either use the 'link on render' mode, or have a cron job execute the command-line linker e.g. once per night.
The installation instructions that are automatically inserted using a template include information on really ancient MediaWiki versions (prior to 1.24). Note that these discontinued versions are not supported by this extension.