Last modified: 2014-05-04 19:50:11 UTC
Notice: Use of undefined constant CONTENT_MODEL_CSS - assumed 'CONTENT_MODEL_CSS' in /SyntaxHighlight_GeSHi.php on line 75 Notice: Use of undefined constant CONTENT_MODEL_JAVASCRIPT - assumed 'CONTENT_MODEL_JAVASCRIPT' in SyntaxHighlight_GeSHi.php on line 76 Code not compatible with php 5.32 and mediawiki 1.20.3
Which problems does this create which make the "code not compatible"? Looks like these are just warnings?
(In reply to comment #1) > Which problems does this create which make the "code not compatible"? > Looks like these are just warnings? It depends on the ContentHandler code added in 1.21 (?). Do note, we generally don't support "master" of extensions to work with random older versions of mediawiki
Even more so when we have a branched version for 1.20 https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/SyntaxHighlight_GeSHi.git;a=log;h=refs/heads/REL1_20
Sam, and everyone else who has contributed, Thank you for making such a great feature available. I'm seeing the same problem originally reported by webpaul. I see Sam's comments about 1.21 being required, but this appears to be an alpha version of Mediawiki. I installed the 1.20 branch of SyntaxHighlight(GeSHi) but received the same errors. In reviewing the change log of the branch, I don't see any mention of this problem so I don't believe the problem was addressed there. Is there something else that I can try to avoid the error messages from appearing? Problem Description: After installing and configuring SyntaxHighlight(GeSHi), Errors appear on all wiki pages when running PHP 5.3 and Mediawiki 1.20 and using the latest SyntaxHighlight(GeSHi).
1.21 is alpha (and will be stable in about six weeks). You might get the same issue in 1.20 as "It depends on the ContentHandler code added in 1.21 (?)". So I'd say best to wait a few weeks here.
those notices are being generated for no actual reason (the code that uses those constants is commented out).. I think that it's a quick hotfix and does not depend on anything.. file: $IP\extensions\SyntaxHighlight_GeSHi\SyntaxHighlight_GeSHi.php ===================================================================== just wrap CONTENT_MODEL_CSS (line 75) and CONTENT_MODEL_JAVASCRIPT (line 76) with quotes and you're good to go..
(In reply to comment #6) > those notices are being generated for no actual reason (the code that uses > those constants is commented out).. It's certainly not in master
Why this bug marked as "RESOLVED INVALID"? Will this simple bug (to add just couple of quotes for PHP compatibility) be fixed in this repo, or all have to fork the repo to fix it?
Stas: You might want to start with explaining which MediaWiki version and which version (branch) of SyntaxHighlight_GeSHi you use. You can find the reason for closing by clicking "History" in the upper right corner.
Oops, I didn't mean to close this again.
* MediaWiki 1.8 (but it is not important) * Latest SyntaxHighlight_GeSHi (from master branch, but all branches have same problem) --------------- $wgSyntaxHighlightModels = array( CONTENT_MODEL_CSS => 'css', CONTENT_MODEL_JAVASCRIPT => 'javascript', ); --------------- PHP sees this syntax, but it throws an E_NOTICE, * which has some performance overhead. * writes a lot of spam in the log (or spam in console, if we run maintenance scripts, or even spam in HTML output if we debugging and "display_errors = On" in php.ini). And it is not OK, see "Why is $foo[bar] wrong?" in official PHP documentation http://php.net/manual/en/language.types.array.php
MediaWiki 1.8!?
Sorry, MW 1.18, of course. It does not matter.
1.18 is not supported by the git master version of SyntaxHighlight anymore. You can use an older version instead.