Page MenuHomePhabricator

SyntaxHighlight extension installed sucefull but not work
Closed, InvalidPublicBUG REPORT

Description

Steps to Reproduce: During Mediawiki installation I checked the option for SyntaxHighlight, and it created a LocalSettings line, wfLoadExtension( 'SyntaxHighlight_GeSHi' );... And after all, Mediawiki perfect for all, I see it at Especial:Version page that "SyntaxHighlight 2.0" was activated. But, it is not working, all source-tag fragments are with error (generated category) and shows as tag <pre>.

Actual Results: all source-tag fragments are with error (generated category) and shows as tag <pre>. More details, see also https://stackoverflow.com/q/57515213/287948

Expected Results: no error-category and to Syntax Highlighting.

Event Timeline

Krauss created this task.Aug 21 2019, 1:16 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 21 2019, 1:16 PM

Which exact MediaWiki version is this about?
Which exact version of Pygments is installed?
What is $wgPygmentizePath set to?
If you created a Python file test.py with test code, what is the output of a command like pygmentize -O full -o test.html test.py?

According to the stackoverflow link, the wiki in question is 1.33.

Hi @Aklapper and @Dinoguy1000

wgPygmentizePath

I not understand, please show a link for debug tasks. I try die(" debug $wgPygmentizePath ") at

  • end of LocalSettings I have *"Notice: Undefined variable: wgPygmentizePath"*.
  • before $mediaWiki->run() I have empty string.

pygmentize

I try at server terminal pygmentize,

Command 'pygmentize' not found, but can be installed with:
sudo apt install python-pygments
Aklapper closed this task as Invalid.Aug 23 2019, 2:05 PM

See https://www.mediawiki.org/wiki/Extension:SyntaxHighlight#Configuration - closing as invalid as this seems to be a misconfiguration as pygmentize is not installed but not like an issue in the code base. See https://www.mediawiki.org/wiki/Project:Support_desk for support requests - thanks!

Krauss added a comment.EditedAug 23 2019, 5:09 PM

Hi @Aklapper , sorry, I see it as a bug, perhaps only documentation (please check my NOTE here), but seems also a "Wizard bug" on the Mediawiki online installation Wizard: if the install process is not a complete success, it must say "something wrong..." and add a link to the solution.

(please check my NOTE here)

I don't know what sentence where is "your note". Feel free to link to specific edits.

but seems also a "Wizard bug" on the Mediawiki online installation Wizard: if the install process is not a complete success, it must say "something wrong..." and add a link to the solution.

I do not see how the installer in MediaWiki Core itself could test and cover each and every Extension's requirements?

(please check my NOTE here)

I don't know what sentence where is "your note". Feel free to link to specific edits.

See this diff.

but seems also a "Wizard bug" on the Mediawiki online installation Wizard: if the install process is not a complete success, it must say "something wrong..." and add a link to the solution.

I do not see how the installer in MediaWiki Core itself could test and cover each and every Extension's requirements?

It is a human-interface bug (not a issue for new installer proposal). The bug is the illusion or perception of "complete and successful" installation.

A good solution is, perhaps, to classify the extensions: no-extra-requirements (e.g. Parse functions); only-run-Composer-again (some one solves with it?) and more-complex (need for apt or etc. procedures). It is not a classification for "every Extension", but only the small set of extensions suggested by the Wizard form....
So, after Wizard's successful installation there is a logic to say or not "Sorry, it is not complete, you need to do something X more to install extension Y".

Ah, thanks. Feel free to propose a clear and well-scoped feature request with steps to reproduce, expected behavior, and actual behavior for the MediaWiki-Installer in a separate clean ticket, I'd say. Thanks :)