Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal exception of type "Error" on MW1.31 #28

Closed
marcluer opened this issue Oct 24, 2020 · 1 comment
Closed

Fatal exception of type "Error" on MW1.31 #28

marcluer opened this issue Oct 24, 2020 · 1 comment

Comments

@marcluer
Copy link

After installation, DrawioEditor 1.1 (d5f64f8) and NativeSvgHandler 1.3.2 (b5739af) show up fine on the "Version" page of my MediaWiki 1.31.10.
When editing an empty page, adding "{{#drawio:ChartName}}"and saving, I get the following error:

Internal error [13c6d33a32cbb7abf315266b] 2020-10-24 13:01:39: Fatal exception of type "Error"

With $wgShowExceptionDetail = true, I get:

[896dc7487e447ebbf9eccfc6] /index.php?title=Netzwerk&action=submit Error from line 91 of /var/www/extensions/DrawioEditor/src/DrawioEditor.php: Call to undefined method MediaWiki\MediaWikiServices::getRepoGroup()
Backtrace:
#0 /var/www/includes/parser/Parser.php(3426): MediaWiki\Extension\DrawioEditor\DrawioEditor->parse(Parser, string)
#1 /var/www/includes/parser/Parser.php(3127): Parser->callParserFunction(PPFrame_DOM, string, array)
#2 /var/www/includes/parser/Preprocessor_DOM.php(1277): Parser->braceSubstitution(array, PPFrame_DOM)
#3 /var/www/includes/parser/Parser.php(2942): PPFrame_DOM->expand(DOMElement, integer)
#4 /var/www/includes/parser/Parser.php(1293): Parser->replaceVariables(string)
#5 /var/www/includes/parser/Parser.php(443): Parser->internalParse(string)
#6 /var/www/includes/content/WikitextContent.php(323): Parser->parse(string, Title, ParserOptions, boolean, boolean, NULL)
#7 /var/www/includes/content/AbstractContent.php(516): WikitextContent->fillParserOutput(Title, NULL, ParserOptions, boolean, ParserOutput)
#8 /var/www/includes/page/WikiPage.php(2129): AbstractContent->getParserOutput(Title, NULL, ParserOptions)
#9 /var/www/includes/page/WikiPage.php(1655): WikiPage->prepareContentForEdit(WikitextContent, NULL, User, string, boolean)
#10 /var/www/includes/EditPage.php(2214): WikiPage->doEditContent(WikitextContent, string, integer, boolean, User, string, array, integer)
#11 /var/www/includes/EditPage.php(1506): EditPage->internalAttemptSave(array, boolean)
#12 /var/www/includes/EditPage.php(652): EditPage->attemptSave(array)
#13 /var/www/includes/actions/EditAction.php(60): EditPage->edit()
#14 /var/www/includes/actions/SubmitAction.php(38): EditAction->show()
#15 /var/www/includes/MediaWiki.php(500): SubmitAction->show()
#16 /var/www/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)
#17 /var/www/includes/MediaWiki.php(818): MediaWiki->performRequest()
#18 /var/www/includes/MediaWiki.php(524): MediaWiki->main()
#19 /var/www/index.php(42): MediaWiki->run()
#20 {main}

What am I missing to get this working?

@marcluer
Copy link
Author

Ok, I figured it out.

  1. Make sure to use the REL1_31 extension code for MediaWiki 1.31.x
  2. Use require_once "$IP/extensions/DrawioEditor/DrawioEditor.php";, despite https://www.mediawiki.org/wiki/Extension:DrawioEditor telling you to use wfLoadExtension( 'DrawioEditor' );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant