SemanticMediaWiki / Mermaid

Provides a parser function to generate diagrams and flowcharts with the help of the mermaid script language
https://www.mediawiki.org/wiki/Extension:Mermaid
Other
36 stars 24 forks source link

Crash on MW 1.31.1 with Mermaid::initExtension #20

Closed foretix closed 5 years ago

foretix commented 5 years ago

Setup and configuration

Issue

Produces a stack trace and outputs:

PHP Fatal error:  Uncaught UnexpectedValueException: callback 'Mermaid::initExtension' is not callable in D:\Wiki\Customer\includes\registration\ExtensionRegistry.php:360
Stack trace:
#0 D:\Wiki\Customer\includes\registration\ExtensionRegistry.php(159): ExtensionRegistry->exportExtractedData(Array)
#1 D:\Wiki\Customer\includes\Setup.php(116): ExtensionRegistry->loadFromQueue()
#2 D:\Wiki\Customer\includes\WebStart.php(88): require_once('D:\\Wiki\\Cus...')
#3 D:\Wiki\Customer\index.php(39): require('D:\\Wiki\\Cus...')
#4 {main}
  thrown in D:\Wiki\Customer\includes\registration\ExtensionRegistry.php on line 360

Steps to reproduce the observation (recommendation is to use the sandbox):

After upgrading to new MW and trying to run update.php. It failed with the message above. I remmed the line, run the update.php (all ok). Then unremmed, and still the same error. MW is unable to run the extension. I registered the extension as wfLoadExtension( 'Mermaid' );

kghbln commented 5 years ago

Thanks for reporting. I am not sure what is happening here, perhaps something connected to Windows. Anyways I ran Mermaid on MW 1.31.x without issues and the update to MW 1.32.x did not harm either.

@mwjames

foretix commented 5 years ago

Thanks for such a quick response. I solved it. Seems to be my mistake not following your installation procedure about composer. I originally just copied the zipped release to MW.

Later, I followed your composer steps, and run update.php. It suggested me to run composer update --no-dev, so I did it, and it works. I cannot find any breaking differencies except some background magic by composer.

I have few more wikis to upgrade, so I will let you know about the result.

kghbln commented 5 years ago

I solved it.

Good to hear. :)

Seems to be my mistake not following your installation procedure about composer

Well, I assumed that you already used Composer to update MediaWiki itself which in turn should have updated Mermaid, too.

I will close this for now. If you encounter issues you can still report back and reopen.

Cheers