LinkTitles extension does not work with sqlite
phazeet opened this issue · comments
After LinkTitles was installed on a wiki that uses sqlite.
Whenever a (non-minor) edit is made to a page, I get the following error:
A database error has occurred. Did you forget to run maintenance/update.php
after upgrading? See:
https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script
Query: SELECT page_title FROM page WHERE (page_namespace = 0) AND
(CHAR_LENGTH(page_title) >= 3) AND (page_title NOT IN ("")) ORDER BY
CHAR_LENGTH(page_title) DESC
Function: LinkTitles::parseContent
Error: 1 no such function: CHAR_LENGTH
Looks to me like the code assumes that the wiki uses mysql and therefor uses
CHAR_LENGTH function. A function that doesn't exist in sqlite.
Could you please try and remove the "CHAR_" parts in the query in LinkTitles.body.php? If this works, I can make the fallback query automatic.
Thanks!
I've put in fallback code to (hopefully) make it work with sqlite. The commit is 3bf0ddf. The release is 2.2.1.