Topic on Project:Support desk

MW 1.29.0 bug with SyntaxHighlight extension

29
Aka sektor (talkcontribs)

After upgrade MediaWiki from 1.28.2 to 1.29.0 - I am find, what appeared bug Extension:SyntaxHighlight

Not highlight lang "LUA"

Sample:

<syntaxhighlight lang="lua">

there_is_code

</syntaxhighlight>

In the bottom just write: "Pages with syntax highlighting errors"

Aka sektor (talkcontribs)
Aka sektor (talkcontribs)

Is it again developers of MediaWiki allowed mistake in packaging, like in 1.28.0 & 1.28.1?

AhmadF.Cheema (talkcontribs)

I am assuming the extension worked when you were using MediaWiki 1.28.2.

Can you again make sure that execute permissions are set for the pygmentize binary: extensions/SyntaxHighlight_GeSHi/pygments/pygmentize?

Sometimes, upgrades mess up file permissions.

In case you installed the extension from Git, you will also need to update composer.

Aka sektor (talkcontribs)
AhmadF.Cheema (talkcontribs)

I am assuming that you are running MediaWiki on Linux.

If you have access to SSH, change your directory (cd) to your Wiki directory and run the following command:

chmod a+x extensions/SyntaxHighlight_GeSHi/pygments/pygmentize

OR, if you have access to a file explorer for your uploaded files, browse to <WIKI DIRECTORY>/extensions/SyntaxHighlight_GeSHi/pygments/, there should be a pygmentize file inside and a column for file permissions. See what permissions it has been set.

Aka sektor (talkcontribs)
Aka sektor (talkcontribs)

Checked. Not any effect.

AhmadF.Cheema (talkcontribs)

Does your hosting provide a file manager for your uploaded files? Can you visually check what permissions have been set for the pygmentize file?

OR, if that's not possible run the following command:

ls -la extensions/SyntaxHighlight_GeSHi/pygments/pygmentize > foo.txt

and see what gets written in foo.txt in your Wiki directory.

Aka sektor (talkcontribs)

Ok, I do it, this writen in the foo.txt:

-rwxr-xr-x 1 h99724 h99724 842005 Jul 13 22:15 extensions/SyntaxHighlight_GeSHi/pygments/pygmentize

Of course I have file manager on hosting, but I use FileZilla and FTP access.

How check that permissions? Open in the Notepad file pygmentize? But Notepad dont understand file syntax.

I can only read the first line:

#!/usr/bin/env python

AhmadF.Cheema (talkcontribs)

The -rwxr-xr-x part in foo.txt are describing the permissions for the pygmentize file, which are fine.

Aka sektor (talkcontribs)

Yes, your code for lang python is highlighting.

But my problem with lang "lua".

AhmadF.Cheema (talkcontribs)

Apologies, I misunderstood, I thought all languages were having problems highlighting.

Aka sektor (talkcontribs)

No more ideas how to fix the problem?

Aka sektor (talkcontribs)

Have to wait for the update 1.29.1

Aka sektor (talkcontribs)

Where update?

AhmadF.Cheema (talkcontribs)

This issue is present for some users in at-least MediaWiki v1.28.2 too. I think a bug report will need to be filed for this.See, How to report a bug.

Aka sektor (talkcontribs)

In 1.28.2 - it's work 100%

Aka sektor (talkcontribs)

Why do not they fix it for so long? Where is the update?

AhmadF.Cheema (talkcontribs)

Have you already reported this bug on phabricator?

Aka sektor (talkcontribs)
91.248.150.85 (talkcontribs)

I understand that with Mediaiki 1.29, the language "lua" no longer gets highlighted.

Although highlighting worked correctly in MW 1.28.2, I think this is not one of the usual cases where highlighting support was present in older versions of MediaWiki (where in fact GeSHi had still been used), but went away in newer ones. According to https://releases.wikimedia.org/mediawiki/1.29/mediawiki-1.29.0.tar.gz, the extension should parse "lua" just fine...

Maybe there still are some files from older versions of MediaWiki present inside the installation?

Aka sektor (talkcontribs)

For example? What files? Folder Extenisions? SyntaxHighlight_GeSHi ?

No. I did not touch it. Only installed the engine from the archive.

I repeat: the extension works partially.

If I did something, it would not work at all

94.217.149.6 (talkcontribs)
This post was hidden by 151.249.164.138 (history)
Aka sektor (talkcontribs)

No. This 100% mistake of developers MediaWiki. They already admitted this error in versions 1.28.0 & 1.28.1

Check: https://lists.wikimedia.org/pipermail/mediawiki-announce/2017-April/000209.html

"Due to a mistake in packaging, the releases 1.27.2 and 1.28.1 did not contain the fix for SyntaxHighlight_GeSHi. This new release does contain that fix."

Nothing remains, except how to expect the release of the next version 1.29.1

2003:72:6D05:7900:EDB3:E480:1C2A:17 (talkcontribs)

I would now download the MediaWiki tarball again and extract it somewhere on the server. Then I would run diff to compare the newly downloaded files with what is present in the installation. This will show which additional files are there...

Aka sektor (talkcontribs)
AhmadF.Cheema (talkcontribs)

The old phabricator task appears to be limited to only when using Extension:Flow, and with all languages. Your issue comes up outside of Extension:Flow and is only related to the Lua language. I do not believe that the two phabricator tasks (bug reports) are the same.