Jump to content

Topic on Extension talk:MissedPages/Flow

Vicarage (talkcontribs)

When I install the extension I get this error (can't post URL as it gets flagged as link spam)


A database query error has occurred. This may indicate a bug in the software.

[XOAl6aA29XsM89N4hG1ykAAAAAo] 2019-05-18 15:34:01: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"


As I can't find an issue tracker, I'm posting the problem here.


John

Samwilson (talkcontribs)

Sorry for the error! And thanks for reporting it.

Does running maintenance/update.php go without error? Can you inspect the database and see if there's a missed_pages database table there?

Vicarage (talkcontribs)

I ran update.php, no error, got an initial page with 4 title boxes, did a request for a page I knew was missing, went back to extension page and got new error


Internal error

[XOAqvE7NCdMCTVJ2OM67DAAAAAM] 2019-05-18 15:54:36: Fatal exception of type "Error"


wiki1 fancy-test.com Special:MissedPages

database has missed_pages table with Columns and Indexes below it

Samwilson (talkcontribs)

Can you add the following to your LocalSettings.php and try again?

$wgShowSQLErrors = true;
$wgShowDBErrorBacktrace = true;

If that doesn't make it show more detailed errors, have a read through How to debug and see if any of the suggestions there help.

Vicarage (talkcontribs)

[XOAyeSHg1bDh9SE8-v4XNAAAAAk] /Special:MissedPages Error from line 117 of /home/johnbray/wiki1.fancy-test.com/extensions/MissedPages/includes/SpecialMissedPages.php: Class 'Davaxi\Sparkline' not found

Backtrace:

#0 /home/johnbray/wiki1.fancy-test.com/extensions/MissedPages/includes/SpecialMissedPages.php(89): MediaWiki\Extension\MissedPages\SpecialMissedPages->getTableRow(stdClass)

#1 /home/johnbray/wiki1.fancy-test.com/includes/specialpage/SpecialPage.php(522): MediaWiki\Extension\MissedPages\SpecialMissedPages->execute(NULL)

#2 /home/johnbray/wiki1.fancy-test.com/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL)

#3 /home/johnbray/wiki1.fancy-test.com/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)

#4 /home/johnbray/wiki1.fancy-test.com/includes/MediaWiki.php(861): MediaWiki->performRequest()

#5 /home/johnbray/wiki1.fancy-test.com/includes/MediaWiki.php(524): MediaWiki->main()

#6 /home/johnbray/wiki1.fancy-test.com/index.php(42): MediaWiki->run()

#7 {main}


and the page I mentioned before has pages of debug stuff, which I don't want to repost here for security

Samwilson (talkcontribs)

Ah! Of course. I'm a fool, and failed to provide the correct installation instructions.

You need to run Composer, either directly in the extension's directory, or by adding MissedPages to your composer.local.json and running it in the root of MediaWiki.

I've updated the documentation.

Vicarage (talkcontribs)

Sadly I can't install composer, as I'm using a hosted wiki service, and have no root access to install it or any other php packages. Is there a way round this?

Samwilson (talkcontribs)

Hmm, sorry for the hassle!

You shouldn't need root, for sure. Do you have shell access? You should be able to install Composer locally (e.g. a composer.phar file in your own directory).

Vicarage (talkcontribs)

Installed composer locallly with

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php -r "if (hash_file('sha384', 'composer-setup.php') === '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" php composer-setup.php php -r "unlink('composer-setup.php');"


cd wiki/extensions/MissedPages

php ~/composer.phar install --no-dev

Loading composer repositories with package information

Updating dependencies

Package operations: 1 install, 0 updates, 0 removals

  - Installing davaxi/sparkline (1.1.2): Downloading (100%)         

Writing lock file

Generating autoload files


ls -l ./vendor/davaxi

total 4

drwxrwxr-x 4 johnbray pg9443188 4096 May 18 13:22 sparkline


but the wiki page still has the

[XOBp8kEoPp2CSkW7kFvF7QAAAAM] /Special:MissedPages Error from line 117 of /home/johnbray/wiki1.fancy-test.com/extensions/MissedPages/includes/SpecialMissedPages.php: Class 'Davaxi\Sparkline' not found


Not sure how I can tell it to look in that directory for it

Samwilson (talkcontribs)

That's a bug! :-) Thank you for finding it. I overlooked a config setting (that allows composer to install in either mediawiki/vendor/ or mediawiki/extension/MissedPages/vendor/). I've made a patch to fix it, which should be merged soon and then you'll be able to update and hopefully install properly.

Vicarage (talkcontribs)

Hacking that patch in .... it works!


Thanks for helping me with this. I plan to use it as part of porting a wikidot wiki to mediawiki, and seeing what pages break because of different naming conventions.


Another bugette, the Help button brings up a missing page Special:MyLanguage/Help:Extension:MissedPages

Samwilson (talkcontribs)

Oh great! That patch has just been merged, so you should be able to update without issue (although, there's no other changes yet so there's no hurry). I do have a patch in the works that will enable looking at the ignored pages, and the full list of chronological misses.

I'll update the help page now. :-)

Thanks for helping! I'm glad this is of some use to someone.

Reply to "Database error"