Project:Support desk

Jump to navigation Jump to search

About this board

Welcome to the MediaWiki Support desk, where you can ask MediaWiki questions!

(Read this message in a different language)

See also

Other places to ask for help:

Before you post

Post a new question

  1. To help us answer your questions, please indicate which versions you are using, as found on your wiki's Special:Version page:
    • MediaWiki version
    • PHP version
    • Database type and version
  2. Please include the web address (URL) to your wiki if possible. It's often easier for us to identify the source of the problem if we can see the error directly.
  3. To start a new thread, click "Start a new topic".

LocalSettings.php seems to be stuck in cached/old/not working version?

2
74.199.26.183 (talkcontribs)
MediaWiki 1.35.1 (4d90545)

00:32, 11 August 2020

PHP 7.4.16 (cgi-fcgi)
MySQL 5.7.32-35-log

Just upgraded the wiki to 1.35 yesterday. In installing updated extensions did not realize that DynamicPageLists3 and the old DynamicPageLists that has been depreciated would conflict - and so an error occurred


Fatal error: Uncaught UnexpectedValueException: callback 'DynamicPageListHooks::onRegistration' is not callable in /home/customer/www/sentinelswiki.com/public_html/includes/registration/ExtensionRegistry.php:539 Stack trace: #0 /home/customer/www/sentinelswiki.com/public_html/includes/registration/ExtensionRegistry.php(232): ExtensionRegistry->exportExtractedData(Array) #1 /home/customer/www/sentinelswiki.com/public_html/includes/Setup.php(161): ExtensionRegistry->loadFromQueue() #2 /home/customer/www/sentinelswiki.com/public_html/includes/WebStart.php(89): require_once('/home/customer/...') #3 /home/customer/www/sentinelswiki.com/public_html/index.php(44): require('/home/customer/...') #4 {main} thrown in /home/customer/www/sentinelswiki.com/public_html/includes/registration/ExtensionRegistry.php on line 539


As I have come to understand this is due to the two extensions having the same namespace. I have attempted to remove the files - both the extensions and from localSettings.php


However - it doesn't seem to be working. Currently there is no reference in LocalSettings.php to either extension, and yet load.php shows:


Notice: Constant NS_DYNAMICPAGELIST already defined in /home/customer/www/sentinelswiki.com/public_html/LocalSettings.php on line 174


But the LocalSettings.php does not have that in there:

the lines surrounding it:

wfLoadExtension( 'TimedMediaHandler' );

wfLoadExtension( 'PageInCat' );

wfLoadExtension( 'Bootstrap' );

# HeaderTabs Functionality

$wgHeaderTabsRenderSingleTab = true;


line 172 is the Bootstrap load and and line 175 is the headertabs comment - like 174 would of course be the line where the DPL3 was installed but is no longer.


interestingly ... it is ONLY the main page where this error occurs. If I go to any other page on the wiki directly, They load (mostly well - some errors here or there I assume are lreated to this)


I have tried clearing the JobQueue -- is there any other cache / queues or something that I can clear to force it to reload properly?

74.199.26.183 (talkcontribs)

This was resolved by restarting PHP - Should have thought of that earlier.

Reply to "LocalSettings.php seems to be stuck in cached/old/not working version?"
2A02:2E02:97CE:4300:4CB4:5295:B1DC:A487 (talkcontribs)
Ammarpad (talkcontribs)

This has been fixed on master branch and has been backported to MW 1.35. So your should update you wiki to the stable release, or downgrade PHP to 7.x

Reply to "Error uploading a JPG"

Put a template in each entry on the site

1
Novike (talkcontribs)

I have a widget of comments on the site, and I want to put it on every page on the site. How do I do that?

Reply to "Put a template in each entry on the site"
Marcoemmegi (talkcontribs)

Hello to everybody. I have a wiki installed on a server Debian Buster + Apache2.

I don't understand why gzip is not enabled. The url of the wiki is https://guide.debianizzati.org/index.php/Speciale:Versione

In all other cms (phpbb, wordpress and plain php) it works with mod_delfate.

I really don't know what check :(

Thank you in advice!

Reply to "Gzip not enabled"

Scribunto - Lua error: Cannot create process: proc_open(C:/lua-error.log): Failed to open stream: Permission denied

17
ChromiaIV (talkcontribs)

Hello everyone,

After I received "Lua error: Internal error: The interpreter exited with status 1" when trying to create a module, I assigned an error file log through LocalSettings.php. Said file is the one mentioned in the title above (C:/lua-error.log), though it wasn't created by the server, as also exposed on the title. Nevertheless, whenever I try to create a module in my wiki, besides obtaining "Lua error: Cannot create process: proc_open(C:/lua-error.log): Failed to open stream: Permission denied", I get this:


Warning: proc_open(C:/lua-error.log): Failed to open stream: Permission denied in C:/xampp/htdocs/mediawiki/extensions/Scribunto/includes/engines/LuaStandalone/LuaStandaloneInterpreter.php on line 153


I tried to view if php's proc_open was restricted, either in .htaccess or in php.ini, but it seemed to not be the case. I didn't manually download this extension (it came with the original mediawiki download), and I don't know if I need to execute the command "chmod a+x /path/to/extensions/Scribunto/includes/engines/LuaStandalone/binaries/yourOS/lua" (and where I would need to execute it [in Ubuntu? I don't know, I'm fairly a noob when it comes to this]).


A thing I found really strange is that I was making a wiki from scratch in my new pc, so I exported all the wiki's articles and contents from my old pc to the new one, but when I searched through the old one's files, I discovered that it didn't have the LuaStandaloneEngine.php and LuaStandaloneInterpreter.php in it's LuaStandalone folder. Even so, it worked very well with modules and such. I tried to delete them in my new pc just for curiosity, but it obviously didn't work.

I use the latest MediaWiki version, just for your information.


Please, help me fix this,

Thanks in advance.

Bawolff (talkcontribs)

what did you put in LocLSettings.php to setup logging? The error suggests you might have a config error.

ChromiaIV (talkcontribs)

I put those things below:


$wgScribuntoDefaultEngine = 'luastandalone';

$wgScribuntoUseGeSHi = true;

$wgScribuntoUseCodeEditor = true;

$wgScribuntoEngineConf['luastandalone']['errorFile'] = 'C:/lua-error.log';


$wgDebugLogFile = "c:/xampp/htdocs/mediawiki/debug-{$wgDBname}.log";

Bawolff (talkcontribs)

i might have just been confused by the error message. Try putting the eror file in a different location (maybe your images directory) it sounds like there is a permission issue at play.

ChromiaIV (talkcontribs)

I changed the location to "c:/xampp/htdocs/mediawiki/images", and it said the same thing as before. I changed it to "/Images" too (just to make sure I haven't misunderstood what you meant by 'images directory') but it also didn't work, unfortunately. What should I do?

Ciencia Al Poder (talkcontribs)

c:/xampp/htdocs/mediawiki/images should be good, but it will throw the same error if that folder is not writable by the web server. Try to give write permissions to the "everyone" group.

ChromiaIV (talkcontribs)

Forgive me, but could you explain how should I edit those permissions?

Anyway, I searched through the mediawiki folder, and I found that when I changed the location to "/Images", it created a file in "c:/(...)/mediawiki" called "Images", upon reading it, I discovered that it was the log file I was trying to set up. The following was written there:


'""C:\xampp\htdocs\mediawiki\extensions\Scribunto\includes\engines\LuaStandalone' não é reconhecido como um comando interno

ou externo, um programa operável ou um arquivo em lotes.


Translating to english: '""C:/[...]/LuaStandalone' is not recognized as an internal or external command, an operable program or a batch file.

What should I do?

130.193.234.62 (talkcontribs)

NO

ChromiaIV (talkcontribs)

Ok, I suppose you answered the first question, which didn't need to be replied at all, given that I had already found the log file, so I didn't need to edit permissions anymore. The only real question I posed is what should I do to fix my Standalone Lua Interpreter that visibly cannot be executed, as said through the following found in the log file: '""C:/[...]/LuaStandalone' is not recognized as an internal or external command, operable program or batch file.

Thank you.

Ciencia Al Poder (talkcontribs)

C:\xampp\htdocs\mediawiki\extensions\Scribunto\includes\engines\LuaStandalone is not executable because it's a directory.

You'll need to set $wgScribuntoEngineConf['luastandalone']['luaPath'] to the full path to lua executable for Windows. Locate the exact executable file name inside that folder

ChromiaIV (talkcontribs)

I tried to set up the lua path on "C:/xampp/(...)/LuaStandalone/binaries/lua5_1_5_Win64_bin/lua5.1" and it gave me the same message as before (Warning: proc_open(C:/Images): Failed to open stream: Permission denied in C:/xampp/htdocs/mediawiki/extensions/Scribunto/includes/engines/LuaStandalone/LuaStandaloneInterpreter.php on line 153). Then, I also tried to change the path a little, just to see if it would work. I used "/extensions/(...)/lua5.1", "c:/(...)/lua5.1", "c:/(...)/lua5_1_5_Win64_bin" etc. They also gave me that message.

Ciencia Al Poder (talkcontribs)

If the error message says "C:/Images" (as you have written here), there must be some error in your configuration pointing to C:/Images

ChromiaIV (talkcontribs)

You were right, there was an error in that configuration. I corrected it, and the error log is now working. I then changed the configuration of the lua path in LocalSettings to C:/xampp/htdocs/mediawiki/extensions/includes/engines/LuaStandalone/binaries/lua5_1_5_Win64_bin/lua5.1, but it failed when I tried to create a module on my wiki. Checking the error log, this was present:

'""C:' is not recognized as an internal or external command, operable program or batch file.

I tested if transforming the lua path to /xampp/htdocs/(...) would do it, but I received this instead:

'""' is not recognized as an internal or external command, operable program or batch file.

113.161.150.5 (talkcontribs)

Please i had the same problem, did you solve this issue ?

Ciencia Al Poder (talkcontribs)

Follow the same advices given on this thread

113.161.150.5 (talkcontribs)

My error log is working fine on this path C:\xampp\tmp\error.log.

Since I sign in PC via non-admin, is there any problem with it?

Ciencia Al Poder (talkcontribs)

If your log is working - define "working", is it getting logs from the wiki or from somewhere else? The wiki must be using a log for itself only, not shared between applications, which may cause contention or locking problems.

Reply to "Scribunto - Lua error: Cannot create process: proc_open(C:/lua-error.log): Failed to open stream: Permission denied"

non of the pages show citations

3
Baratiiman (talkcontribs)
Malyacko (talkcontribs)

@Baratiiman Welcome to the support desk for the MediaWiki software. In general: For local problems on Farsi Wikipedia, see either w:fa:ویکی‌پدیا:قهوه‌خانه/فنی, or meta:Tech (if help is needed related to tech on a Wikimedia wiki) or, if it turns out to be a server side problem, How to report a bug.

Looking at the HTML source code of your link, you can see a lot of ScribuntoErrors about expandTemplate: invalid title \"[[#invoke:Citation/lang]]'\"`UNIQ--item-641--QINU`\"'

2.135.65.240 (talkcontribs)
Reply to "non of the pages show citations"

ResourceLoader breaking a JavaScript library

3
DawnPaladin (talkcontribs)

I'm trying to have ResourceLoader load a JS library for me, but it keeps breaking. My browser console says "Uncaught SyntaxError: unexpected token: identifier". I click on the error to inspect the code, and it shows me what load.php is serving up. Here's where the error is:


[long line of code]"pnLb":[function(require,module,exports){"use strict";Object.defineProperty(

exports,"__esModule",{value:!0});[code continues]


I think ResourceLoader is breaking the line between "(" and "exports", and that's causing the syntax error.


I'm loading other JS files successfully; this is the only one that breaks. When I load the page using ?debug=true everything loads fine. Any suggestions?

Bawolff (talkcontribs)

use babel to cross compile to older version of javascript maybe.

DawnPaladin (talkcontribs)

I'm using Parcel to compile it for es5. Is that old enough?

Reply to "ResourceLoader breaking a JavaScript library"

Problem with the position of the sidebar

15
90.40.182.3 (talkcontribs)

After upgrading Mediawiki from version 1.30 to 1.35, the sidebar is no longer on the left, it is at the bottom of the page.


Who can help me correct this problem?


See the home page

Bawolff (talkcontribs)

please set $wgShowExceptionDetails=true; after doing that, https://www.gennievre.net/wiki/load.php?debug=false&lang=fr&modules=mediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.sectionAnchor%7Cmediawiki.skinning.content.externallinks%7Cmediawiki.skinning.interface%7Cskins.monobook.styles&only=styles&skin=monobook should have a more descriptive error.


Also make sure you have the correct version of monobook for your version of mediawiki (if you got it from somewhere that wasnt the official 1.35 tar download)

Gennievre (talkcontribs)

Hello

Thanks for this help.

I added in variable in LocalSettings, I copied the url for the test and here are the answers:

[YDtHdNYsMHvBvodBtonPdQAAANQ] /wiki/load.php?debug=false&lang=fr&modules=mediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.sectionAnchor%7Cmediawiki.skinning.content.externallinks%7Cmediawiki.skinning.interface%7Cskins.monobook.styles&only=styles&skin=monobook Error from line 657 of /home/clients/16e57d37cb3303adbeb9d6dbf80efffb/web/wiki/includes/exception/MWExceptionHandler.php: Class 'FormatJson' not found

Backtrace:

#0 /home/clients/16e57d37cb3303adbeb9d6dbf80efffb/web/wiki/includes/exception/MWExceptionHandler.php(195): MWExceptionHandler::logError(ErrorException, string, string)

#1 /home/clients/16e57d37cb3303adbeb9d6dbf80efffb/web/wiki/includes/AutoLoader.php(81): MWExceptionHandler::handleError(integer, string, string, integer, array)

#2 /home/clients/16e57d37cb3303adbeb9d6dbf80efffb/web/wiki/includes/AutoLoader.php(81): require()

#3 [internal function]: AutoLoader::autoload(string)

#4 /home/clients/16e57d37cb3303adbeb9d6dbf80efffb/web/wiki/includes/resourceloader/ResourceLoader.php(141): spl_autoload_call(string)

#5 /home/clients/16e57d37cb3303adbeb9d6dbf80efffb/web/wiki/includes/resourceloader/ResourceLoader.php(752): ResourceLoader->preloadModuleInfo(array, ResourceLoaderContext)

#6 /home/clients/16e57d37cb3303adbeb9d6dbf80efffb/web/wiki/load.php(53): ResourceLoader->respond(ResourceLoaderContext)

#7 {main}

TiltedCerebellum (talkcontribs)

Are you using the MW 1.35 version of the skin as Bawolff mentioned?

Gennievre (talkcontribs)

I reverted to version 1.30 and that's when the display issue occurred.

Version 1.35 had to modify the database I think.

But I did use an official download.

TiltedCerebellum (talkcontribs)

It's unclear to me what reverted means. You went back to using MW 1.30, using the matching 1.30 version of the skin, and you reverted back to the 1.30 version of the database? (In my understanding, you can't use mismatched versions of things or errors are likely to occur as a result of that).

Gennievre (talkcontribs)

Excuse me but I am using the google translator.

A migration from v 1.30 to v 1.35 went wrong (blank page on the home page and numerous warnings). However, I had used an official 1.35 by following the procedure as best as possible.

So I wanted to go back to version 1.30 with my backups. But it didn't work well since the sidebar is no longer on the left, it is at the bottom of the page.

I would therefore like to find a normal wiki with version 1.30 and then successfully switch to 1.35 afterwards.

But I don't know how to fix this sidebar problem.

Wiki home page is here https://www.gennievre.net/wiki/index.php?title=Accueil

TiltedCerebellum (talkcontribs)

I'm just a MW user so I'll leave it up to the experts here because there may be several things going wrong with your setup.

One thing: MW 1.30 is not compatible with the version of PHP you are using (Your Spécial:Version page says you're using 7.3.27). See Compatibility, the highest version of php 1.30 can use is 7.1.x.

If you use MW 1.30 you need to use the compatible Monobook skin version, as I said above (for some reason your Spécial:Version reports no version number for any of your skins, which makes me wonder if you're using the wrong version of Monobook for MediaWiki 1.30).

Your extensions also need to match the MW version you are using (if you install MW1.30, your extensions must be 1.30 compatible too), and it may be helpful to disable extensions on setup and re-enable after setup is complete.

What lines in your LocalSettings.php are you using to (1) load Monobook, and (2) set Monobook as the default skin?

Did you copy one version of mediawiki over top of the other?

Sounds like the problem you ran into with MediaWiki 1.35 is the same as the problem you are now having with 1.30? -- If so there may be problems with in your configuration settings in the LocalSettings.php file.

Gennievre (talkcontribs)

Yesssss !

You may not be an expert, but you are very efficient and your diagnosis was correct.

I switched back to PHP version 7.1 and it's all good! Thank you so much.

If I can abuse it, what would be your advice so that I upgrade to version 1.35 of MW without having a problem?

TiltedCerebellum (talkcontribs)

Well, check that you were trying to use a compatible php version for that one too (7.4.3+ for 1.35)... I find it strange you had the same exact issue on 2 different versions of Mediawiki. Quite possible you also had the wrong php version there too? Disable extensions on upgrade then re-enable one or two at a time. You can't trust that all in our LocalSettings.php is current and working. Recheking the upgrade manual every time can help prevent skipping over important stuff. Usually I install 1.35 using the web installer as if starting from scratch and let it regenerate a default LocalSettings.php. Then I start adding things back a bit at a time. That helps me to find any outdated code. I also visit each extension page and make sure the configs haven't changed for those too (sometimes they do) and one wrong line of code in LocalSettings.php can also tank everything as well as mismatched versioning.

Gennievre (talkcontribs)

> Well, check that you were trying to use a compatible php version for that one too (7.4.3+ for 1.35).

My web host offers me PHP 7.4.15 so it should be okay?

> Disable extensions on upgrade then re-enable one or two at a time.

How do you deactivate extensions? This is by commenting out the lines wfLoadExtension ('xxxxxx'); in LocalSettings.php?

> Recheking the upgrade manual every time can help prevent skipping over important stuff.

There is one step in the update that I don't understand, it's:

Clear pending jobs

For performance reasons, some actions in the database are delayed, and are managed by the job queue. Those jobs are stored in database and contain parameters with information about     actions it should perform. It's strongly recommended to run those pending jobs before upgrading the wiki, to avoid them failing in case the parameter specification of those jobs change on the     new version. Use runJobs.php to run all pending jobs and clear the queue before performing the upgrade.

TiltedCerebellum (talkcontribs)

Yep, you're right I misread the numbers (I get a little bit number blindness now and then due to my beautiful broken brain ;)

Yes, I comment out any added (non-bundled) extensions on upgrade because I find often there may be issues with these that's easier to sort out one by one after I've confirmed MW is functioning as expected out of the box (prior to addons)--Helps me narrow down where potential issues might be. Get MW running first out of the box without addons tells me if the problem is with MW and not an extension. If an issue emerges after enabling an extension, that tells me something else.

For clearing pending jobs, people usually access the command line and do follow: Manual:RunJobs.php. Requires access to command line on your web host, since I have that, I'd log into SSH, navigate to the MediaWiki maintenance directory, then run: php runJobs.php

You need to consult your web host documentation to see if you have access to command line.

To check how many jobs are in the queue if you don't have access to command line, you can go to:

yoursite.com/api.php?action=query&meta=siteinfo&siprop=statistics&format=jsonfm

Gennievre (talkcontribs)

So if I see this, does that mean I don't have any jobs in the queue?


"query": {

       "statistics": {

           "pages": 11171,

           "articles": 4829,

           "edits": 39791,

           "images": 2607,

           "users": 1176,

           "activeusers": 2,

           "admins": 2,

           "jobs": 0

Peculiar Investor (talkcontribs)
TiltedCerebellum (talkcontribs)

Actually, I misread it myself whilst trying to help lol--Multiple sclerosis kills my brain's ability to see numbers properly sometimes. Consequences of having lesions in that part of my brain. Apologies for that... will edit to fix now that I can actually see it lol. ;)

At current it is reporting 0 jobs in the queue. Do you not have access to command line?

Honestly I just follow the MW manual as less can go wrong this way. Most hosts offer command line access, even shared hosts. In the latter case often it's just restricted to your own user directory which usually works fine for average stuff.

Reply to "Problem with the position of the sidebar"

/load.php?lang= query string causes three problems in Google Page Speed insights

2
2001:44C8:4559:7759:843F:4EAB:11BF:9DAD (talkcontribs)

I have an Hebrew 1.35.1 all-core MediaWiki website; generally I have no significant performance problems reported in Google Page Speed insights besides one problem which occurs in three different contexts there:

  • Enable text compression: /load.php?lang=
  • Remove unused JavaScript: /load.php?lang=
  • Eliminate render-blocking Resources: /load.php?lang=

I believe this has to do with my site being Hebrew-interfaced (from installation onwards).


MediaWiki developmentwise, can I remove this query string from URLs?

This might solve the problem of Google algorithm recognizing it as "problematic" or "redundant".

2001:44C8:4559:7759:455:BFA6:E9EC:814A (talkcontribs)

I should add that as far as I remember, this problem is lurking/roaming above my website since its first MediaWiki version:

1.32.x

1.33.x

1.34.2

1.35.1

Reply to "/load.php?lang= query string causes three problems in Google Page Speed insights"

What does this error message mean?

2
Summary by 216.114.33.46

coopmkedpBold

Farvardyn (talkcontribs)

What does this error message mean?

[10-Mar-2021 23:31:58 America/Chicago] PHP Warning:  API call had warnings trying to get remote JsonConfig: warnings={"main":{"*":"Subscribe to the mediawiki-api-announce mailing list at \u003Chttps://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce\u003E for notice of API deprecations and breaking changes. Use Special:ApiFeatureUsage to see usage of deprecated features by your application."},"revisions":{"*":"Because \"rvslots\" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used."}}, query={"action":"query","titles":"Data:I18n/Shared Template Warning.tab","prop":"revisions","rvprop":"content","continue":""} [Called from JsonConfig\JCUtils::warn in /extensions/JsonConfig/includes/JCUtils.php at line 54] in /includes/debug/MWDebug.php on line 333
Farvardyn (talkcontribs)

bump?

Reply to "What does this error message mean?"