Project:Support desk

About this board

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

(Read this message in a different language)

See also

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".

Contributors Extension Upgrade Script Error

4
Vscheideck (talkcontribs)

Upgrade Script Error (Mediawiki 1.37)

When launching the upgrade script (php extensions/Contributors/maintenance/PopulateContributorsTable.php, I getĀ :

Error: Class 'Revision' not found

In the script, this is the line causing the errorĀ :

$dbr->bitAnd( 'rev_deleted', Revision::DELETED_USER ) . ' = 0'

āž” How to correct this script please?? šŸ˜€šŸ˜…

Bawolff (talkcontribs)

You should ask the author of the script to update their extension for newer versions of MediaWiki.

80.215.32.77 (talkcontribs)

good idea, will doĀ :)

Reply to "Contributors Extension Upgrade Script Error"
Plostvaler (talkcontribs)

I installed a new wiki (1.37.2) on nginx and wanted to install the Library style, but the server gives me a 500 error

Log:

2022/04/23 11:08:04 [error] 623#623: *48 FastCGI sent in stderr: "PHP message: PHP Fatal error:Ā  Uncaught Exception: Unable to open file /var/www/mediawiki/skins/Library/skin.json: filemtime(): stat failed for /var/www/mediawiki/skins/Library/skin.json in /var/www/mediawiki/includes/registration/ExtensionRegistry.php:182

Stack trace:

#0 /var/www/mediawiki/includes/GlobalFunctions.php(89): ExtensionRegistry->queue()

#1 /var/www/mediawiki/LocalSettings.php(136): wfLoadSkin()

#2 /var/www/mediawiki/includes/Setup.php(145): require_once('/var/www/mediaw...')

#3 /var/www/mediawiki/includes/WebStart.php(90): require_once('/var/www/mediaw...')

#4 /var/www/mediawiki/index.php(44): require('/var/www/mediaw...')

#5 {main}

Ā  thrown in /var/www/mediawiki/includes/registration/ExtensionRegistry.php on line 182" while reading response header from upstream, client: 94.25.238.101, server: badega.ru, request: "GET /index.php?title=%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "badega.ru"

2022/04/23 11:08:06 [error] 623#623: *48 FastCGI sent in stderr: "PHP message: PHP Fatal error:Ā  Uncaught Exception: Unable to open file /var/www/mediawiki/skins/Library/skin.json: filemtime(): stat failed for /var/www/mediawiki/skins/Library/skin.json in /var/www/mediawiki/includes/registration/ExtensionRegistry.php:182

Stack trace:

#0 /var/www/mediawiki/includes/GlobalFunctions.php(89): ExtensionRegistry->queue()

#1 /var/www/mediawiki/LocalSettings.php(136): wfLoadSkin()

#2 /var/www/mediawiki/includes/Setup.php(145): require_once('/var/www/mediaw...')

#3 /var/www/mediawiki/includes/WebStart.php(90): require_once('/var/www/mediaw...')

#4 /var/www/mediawiki/index.php(44): require('/var/www/mediaw...')

#5 {main}

Ā  thrown in /var/www/mediawiki/includes/registration/ExtensionRegistry.php on line 182" while reading response header from upstream, client: 94.25.238.101, server: badega.ru, request: "GET /index.php?title=%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "badega.ru"

2022/04/23 11:08:07 [error] 623#623: *48 FastCGI sent in stderr: "PHP message: PHP Fatal error:Ā  Uncaught Exception: Unable to open file /var/www/mediawiki/skins/Library/skin.json: filemtime(): stat failed for /var/www/mediawiki/skins/Library/skin.json in /var/www/mediawiki/includes/registration/ExtensionRegistry.php:182

Stack trace:

#0 /var/www/mediawiki/includes/GlobalFunctions.php(89): ExtensionRegistry->queue()

#1 /var/www/mediawiki/LocalSettings.php(136): wfLoadSkin()

#2 /var/www/mediawiki/includes/Setup.php(145): require_once('/var/www/mediaw...')

#3 /var/www/mediawiki/includes/WebStart.php(90): require_once('/var/www/mediaw...')

#4 /var/www/mediawiki/index.php(44): require('/var/www/mediaw...')

#5 {main}

Ā  thrown in /var/www/mediawiki/includes/registration/ExtensionRegistry.php on line 182" while reading response header from upstream, client: 94.25.238.101, server: badega.ru, request: "GET /index.php?title=%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "badega.ru"

2022/04/23 11:08:07 [error] 623#623: *48 FastCGI sent in stderr: "PHP message: PHP Fatal error:Ā  Uncaught Exception: Unable to open file /var/www/mediawiki/skins/Library/skin.json: filemtime(): stat failed for /var/www/mediawiki/skins/Library/skin.json in /var/www/mediawiki/includes/registration/ExtensionRegistry.php:182

Stack trace:

#0 /var/www/mediawiki/includes/GlobalFunctions.php(89): ExtensionRegistry->queue()

#1 /var/www/mediawiki/LocalSettings.php(136): wfLoadSkin()

#2 /var/www/mediawiki/includes/Setup.php(145): require_once('/var/www/mediaw...')

#3 /var/www/mediawiki/includes/WebStart.php(90): require_once('/var/www/mediaw...')

#4 /var/www/mediawiki/index.php(44): require('/var/www/mediaw...')

#5 {main}

Ā  thrown in /var/www/mediawiki/includes/registration/ExtensionRegistry.php on line 182" while reading response header from upstream, client: 94.25.238.101, server: badega.ru, request: "GET /index.php?title=%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "badega.ru"

2022/04/23 11:08:08 [error] 623#623: *48 FastCGI sent in stderr: "PHP message: PHP Fatal error:Ā  Uncaught Exception: Unable to open file /var/www/mediawiki/skins/Library/skin.json: filemtime(): stat failed for /var/www/mediawiki/skins/Library/skin.json in /var/www/mediawiki/includes/registration/ExtensionRegistry.php:182

Stack trace:

#0 /var/www/mediawiki/includes/GlobalFunctions.php(89): ExtensionRegistry->queue()

#1 /var/www/mediawiki/LocalSettings.php(136): wfLoadSkin()

#2 /var/www/mediawiki/includes/Setup.php(145): require_once('/var/www/mediaw...')

#3 /var/www/mediawiki/includes/WebStart.php(90): require_once('/var/www/mediaw...')

#4 /var/www/mediawiki/index.php(44): require('/var/www/mediaw...')

#5 {main}

Ā  thrown in /var/www/mediawiki/includes/registration/ExtensionRegistry.php on line 182" while reading response header from upstream, client: 94.25.238.101, server: badega.ru, request: "GET /index.php?title=%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "badega.ru"

2022/04/23 11:08:08 [error] 623#623: *48 FastCGI sent in stderr: "PHP message: PHP Fatal error:Ā  Uncaught Exception: Unable to open file /var/www/mediawiki/skins/Library/skin.json: filemtime(): stat failed for /var/www/mediawiki/skins/Library/skin.json in /var/www/mediawiki/includes/registration/ExtensionRegistry.php:182

Stack trace:

#0 /var/www/mediawiki/includes/GlobalFunctions.php(89): ExtensionRegistry->queue()

#1 /var/www/mediawiki/LocalSettings.php(136): wfLoadSkin()

#2 /var/www/mediawiki/includes/Setup.php(145): require_once('/var/www/mediaw...')

#3 /var/www/mediawiki/includes/WebStart.php(90): require_once('/var/www/mediaw...')

#4 /var/www/mediawiki/index.php(44): require('/var/www/mediaw...')

#5 {main}

Ā  thrown in /var/www/mediawiki/includes/registration/ExtensionRegistry.php on line 182" while reading response header from upstream, client: 94.25.238.101, server: badega.ru, request: "GET /index.php?title=%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "badega.ru"

2022/04/23 11:08:08 [error] 623#623: *48 FastCGI sent in stderr: "PHP message: PHP Fatal error:Ā  Uncaught Exception: Unable to open file /var/www/mediawiki/skins/Library/skin.json: filemtime(): stat failed for /var/www/mediawiki/skins/Library/skin.json in /var/www/mediawiki/includes/registration/ExtensionRegistry.php:182

Stack trace:

#0 /var/www/mediawiki/includes/GlobalFunctions.php(89): ExtensionRegistry->queue()

#1 /var/www/mediawiki/LocalSettings.php(136): wfLoadSkin()

#2 /var/www/mediawiki/includes/Setup.php(145): require_once('/var/www/mediaw...')

#3 /var/www/mediawiki/includes/WebStart.php(90): require_once('/var/www/mediaw...')

#4 /var/www/mediawiki/index.php(44): require('/var/www/mediaw...')

#5 {main}

Ā  thrown in /var/www/mediawiki/includes/registration/ExtensionRegistry.php on line 182" while reading response header from upstream, client: 94.25.238.101, server: badega.ru, request: "GET /index.php?title=%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "badega.ru"

Bawolff (talkcontribs)

Did you install the skin in the right directory? Does the file /var/www/mediawiki/skins/Library/skin.json exist and readable by webserver?

Plostvaler (talkcontribs)

I want to note that the standard styles work

Now the engine gives this error (library style):

MediaWiki internal error.

Original exception: [582f3e9af218e8d55d95aafb] /index.php?title=%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0 RuntimeException: Could not compile template `skin`: Could not find partial `Searchbox` at /var/www/mediawiki/skins/Library/includes/templates/Searchbox.mustache

Backtrace:

from /var/www/mediawiki/includes/TemplateParser.php(230)

#0 /var/www/mediawiki/vendor/zordius/lightncandy/src/Partial.php(119): TemplateParser->{closure}()

#1 /var/www/mediawiki/vendor/zordius/lightncandy/src/Partial.php(105): LightnCandy\Partial::resolver()

#2 /var/www/mediawiki/vendor/zordius/lightncandy/src/Partial.php(59): LightnCandy\Partial::resolve()

#3 /var/www/mediawiki/vendor/zordius/lightncandy/src/Validator.php(873): LightnCandy\Partial::read()

#4 /var/www/mediawiki/vendor/zordius/lightncandy/src/Validator.php(211): LightnCandy\Validator::partial()

#5 /var/www/mediawiki/vendor/zordius/lightncandy/src/Validator.php(644): LightnCandy\Validator::operator()

#6 /var/www/mediawiki/vendor/zordius/lightncandy/src/Validator.php(52): LightnCandy\Validator::token()

#7 /var/www/mediawiki/vendor/zordius/lightncandy/src/Compiler.php(40): LightnCandy\Validator::verify()

#8 /var/www/mediawiki/vendor/zordius/lightncandy/src/Partial.php(143): LightnCandy\Compiler::compileTemplate()

#9 /var/www/mediawiki/vendor/zordius/lightncandy/src/Compiler.php(400): LightnCandy\Partial::compileStatic()

#10 /var/www/mediawiki/vendor/zordius/lightncandy/src/Validator.php(211): LightnCandy\Compiler::partial()

#11 /var/www/mediawiki/vendor/zordius/lightncandy/src/Compiler.php(351): LightnCandy\Validator::operator()

#12 /var/www/mediawiki/vendor/zordius/lightncandy/src/Compiler.php(59): LightnCandy\Compiler::compileToken()

#13 /var/www/mediawiki/vendor/zordius/lightncandy/src/LightnCandy.php(46): LightnCandy\Compiler::compileTemplate()

#14 /var/www/mediawiki/includes/TemplateParser.php(252): LightnCandy\LightnCandy::compile()

#15 /var/www/mediawiki/includes/TemplateParser.php(157): TemplateParser->compile()

#16 /var/www/mediawiki/includes/TemplateParser.php(290): TemplateParser->getTemplate()

#17 /var/www/mediawiki/skins/Library/includes/SkinLibrary.php(449): TemplateParser->processTemplate()

#18 /var/www/mediawiki/includes/skins/SkinTemplate.php(144): SkinLibrary->generateHTML()

#19 /var/www/mediawiki/includes/OutputPage.php(2644): SkinTemplate->outputPage()

#20 /var/www/mediawiki/includes/MediaWiki.php(944): OutputPage->output()

#21 /var/www/mediawiki/includes/MediaWiki.php(957): MediaWiki::{closure}()

#22 /var/www/mediawiki/includes/MediaWiki.php(564): MediaWiki->main()

#23 /var/www/mediawiki/index.php(53): MediaWiki->run()

#24 /var/www/mediawiki/index.php(46): wfIndexMain()

#25 {main}

Exception caught inside exception handler: [582f3e9af218e8d55d95aafb] /index.php?title=%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0 RuntimeException: Could not compile template `skin`: Could not find partial `Searchbox` at /var/www/mediawiki/skins/Library/includes/templates/Searchbox.mustache

Backtrace:

from /var/www/mediawiki/includes/TemplateParser.php(230)

#0 /var/www/mediawiki/vendor/zordius/lightncandy/src/Partial.php(119): TemplateParser->{closure}()

#1 /var/www/mediawiki/vendor/zordius/lightncandy/src/Partial.php(105): LightnCandy\Partial::resolver()

#2 /var/www/mediawiki/vendor/zordius/lightncandy/src/Partial.php(59): LightnCandy\Partial::resolve()

#3 /var/www/mediawiki/vendor/zordius/lightncandy/src/Validator.php(873): LightnCandy\Partial::read()

#4 /var/www/mediawiki/vendor/zordius/lightncandy/src/Validator.php(211): LightnCandy\Validator::partial()

#5 /var/www/mediawiki/vendor/zordius/lightncandy/src/Validator.php(644): LightnCandy\Validator::operator()

#6 /var/www/mediawiki/vendor/zordius/lightncandy/src/Validator.php(52): LightnCandy\Validator::token()

#7 /var/www/mediawiki/vendor/zordius/lightncandy/src/Compiler.php(40): LightnCandy\Validator::verify()

#8 /var/www/mediawiki/vendor/zordius/lightncandy/src/Partial.php(143): LightnCandy\Compiler::compileTemplate()

#9 /var/www/mediawiki/vendor/zordius/lightncandy/src/Compiler.php(400): LightnCandy\Partial::compileStatic()

#10 /var/www/mediawiki/vendor/zordius/lightncandy/src/Validator.php(211): LightnCandy\Compiler::partial()

#11 /var/www/mediawiki/vendor/zordius/lightncandy/src/Compiler.php(351): LightnCandy\Validator::operator()

#12 /var/www/mediawiki/vendor/zordius/lightncandy/src/Compiler.php(59): LightnCandy\Compiler::compileToken()

#13 /var/www/mediawiki/vendor/zordius/lightncandy/src/LightnCandy.php(46): LightnCandy\Compiler::compileTemplate()

#14 /var/www/mediawiki/includes/TemplateParser.php(252): LightnCandy\LightnCandy::compile()

#15 /var/www/mediawiki/includes/TemplateParser.php(157): TemplateParser->compile()

#16 /var/www/mediawiki/includes/TemplateParser.php(290): TemplateParser->getTemplate()

#17 /var/www/mediawiki/skins/Library/includes/SkinLibrary.php(449): TemplateParser->processTemplate()

#18 /var/www/mediawiki/includes/skins/SkinTemplate.php(144): SkinLibrary->generateHTML()

#19 /var/www/mediawiki/includes/OutputPage.php(2644): SkinTemplate->outputPage()

#20 /var/www/mediawiki/includes/exception/MWExceptionRenderer.php(158): OutputPage->output()

#21 /var/www/mediawiki/includes/exception/MWExceptionRenderer.php(77): MWExceptionRenderer::reportHTML()

#22 /var/www/mediawiki/includes/exception/MWExceptionHandler.php(107): MWExceptionRenderer::output()

#23 /var/www/mediawiki/includes/exception/MWExceptionHandler.php(202): MWExceptionHandler::report()

#24 /var/www/mediawiki/includes/MediaWiki.php(583): MWExceptionHandler::handleException()

#25 /var/www/mediawiki/index.php(53): MediaWiki->run()

#26 /var/www/mediawiki/index.php(46): wfIndexMain()

#27 {main}

Bawolff (talkcontribs)

Make sure all skin files are present. Failing that maybe the library skin just isnt compatible with your version of mediawiki.

Plostvaler (talkcontribs)

The file that the engine is looking for is in the style folder. Permissions for all files are the same - 774. In the json file, the requirements indicate >=1.35.0. I don't understand what's wrong

Reply to "500 error PHP style"

Mediawiki 1.37 - VisualEditor - "Error contacting the Parsoid/RESTBase server: (curl error: 28) Timeout was reached"(sometimes, not always)

1
Vscheideck (talkcontribs)

Hello,

Please help, I am stuck.Ā :)

I've search related threads which could not help me.

My version of Mediawiki is 1.37.2

While editing a page with VisualEditor, I sometimes get the following error (Sometimes it works, sometimes I get the errorĀ ; it can work 10 times in a row and then don't work):


"Error contacting the Parsoid/RESTBase server: (curl error: 28) Timeout was reached"**


The error seems to occur whatever the page size.

Note: I do not have this error on another test server with the same configuation.


In the log file I getĀ :

[http] HTTP start: GET https://mysite.com/wiki/rest.php/mysite.com/v3/page/html/Language%2FMultiple-languages/129917?redirect=false&stash=true
 
[http] Error fetching URL "https://mysite.com/wiki/rest.php/mysite.com/v3/page/html/Language%2FMultiple-languages/129917?redirect=false&stash=true": 
 
(curl error: 28) Timeout was reached


  • I also sometimes get a timeout error when using this url directely in a browser:

https://mysite.com/wiki/api.php?action=visualeditor&paction=parse&page=Language/Multiple-languages


  • I never get an error if I do (using SSH):

curl https://mysite.com/wiki/rest.php/mysite.com/v3/page/html/Language%2FMultiple-languages/129917?redirect=false&stash=true


or

curl https://mysite.com/wiki/api.php?action=visualeditor&paction=parse&page=Language/Multiple-languages



  • My config in LocalSettings.php
wfLoadExtension( 'VisualEditor' );
$wgDefaultUserOptions['visualeditor-enable'] = 1;
$wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";
$wgGroupPermissions['*']['read'] = true;
$wgGroupPermissions['*']['edit'] = true;
$wgGroupPermissions['*']['writeapi'] = true;
Reply to "Mediawiki 1.37 - VisualEditor - "Error contacting the Parsoid/RESTBase server: (curl error: 28) Timeout was reached"(sometimes, not always)"

Turning off the async attribute in MediaWiki resource loader script tag

2
Willjonesuk (talkcontribs)

Hi. I have a dependency, and I think the asynchronous loading of MediaWiki resources (jQuery specifically) is causing a problem. Is there a way to switch off this attribute in a MediaWiki setting? Image in this post:

Bawolff (talkcontribs)

No. You should change your dependency to wait until everything is loaded before doing stuff that needs the dependency.

Reply to "Turning off the async attribute in MediaWiki resource loader script tag"
PetaloAzul (talkcontribs)

hello, at the moment the extension simple math jax is the extension with setting for personalizate the formuls of math and chemistry, the extension have the config $wgSmjScale for change the size of the formuls, the extension math have that config similar?

PetaloAzul (talkcontribs)
Reply to "size math"

How to present a list of a few most read articles ever?

6
109.64.104.73 (talkcontribs)

MediaWiki 1.36.1.

I want to present a small box in the homepages with a list of the, say, 5-10 most read articles (or most visited pages, for that matter).

Is there a core way to do that?

Bawolff (talkcontribs)

No. All methods require extensions. Core does not keep track of page views.

109.64.104.73 (talkcontribs)

If I install Google Analytics, I could draw the data from there, by some HTML with a script accessing the API of the local Google Analytics.

Is that correct?

109.64.104.73 (talkcontribs)

I think it'd be better if I open another thread dedicated to Google Analytics.

109.64.104.73 (talkcontribs)

Please consider to mark this thread as solved.

109.64.104.73 (talkcontribs)
Reply to "How to present a list of a few most read articles ever?"

Use Google analytics to get the most visited pages and show them in a template

4
109.64.104.73 (talkcontribs)

I seek a way to display up to five most visited pages in a template.

I know that at least in version 1.36.1 it's not possible by MediaWiki itself so I was thinking about getting these data from the Google Analytics JavaScript program and put them in the template.


Can MediaWiki communicate with Google Analytics to get these data and if so how is it normally done?

Malyacko (talkcontribs)
109.64.104.73 (talkcontribs)

In this context I didn't search anything or tried anything.

I prefer not to install an extension for such data and would remain without it (it's not critical to my website).

I do aim to ask the PHP programmers here, specializing in MediaWiki, if someone has developed something personal which focuses on pulling these very specific data, without an extension. I'd like to try to study the source code of such recommendation from experience.

109.64.104.73 (talkcontribs)

of such program recommended from experience*

Reply to "Use Google analytics to get the most visited pages and show them in a template"

Special:ChangePassword doesn't work but throws no errors

8
Summary by P858snake

This support ticket continues on from phab:T305311

AlPaD (talkcontribs)

Hello. The password change page does not work. When I go to save the password the password does not change. Thanks!

P858snake (talkcontribs)

Can you confirm what browser you are currently using?

AlPaD (talkcontribs)

Google Chrome

AlPaD (talkcontribs)

Hello, can you help me please? Thanks!

Reedy (talkcontribs)

When did you actually last change your password? I need a fairly specific time and date. There's not enough information to even begin to help you.

I can see log attempts of password resets, and logins using temp passwords...

AlPaD (talkcontribs)

@Reedy: 13 April 2022, 12:00 - 12:30 pm, but if I log in with a temporary password I can change it.

Reedy (talkcontribs)

What happens when you don't login with a temporary password and try and change your password? Does it say it succeeded? Does it say it failed? Does it say anything?

What sort of password are you using?

AlPaD (talkcontribs)

@Reedy: It says me to fill in the page again as if nothing happened. I have 2fa, but my first password has problem, not 2fa.

Reply to "Special:ChangePassword doesn't work but throws no errors"

How to open the visual editor with JavaScript?

6
109.64.104.73 (talkcontribs)

MediaWiki 1.36.1 with Skin:Timeless

The following JavaScript doesn't work.

I get in the browser console:

Your skin is incompatible with VisualEditor. See https://www.mediawiki.org/wiki/Extension:VisualEditor/Skin_requirements for the requirements.

That's strange because right after installing Visual Editor, when I first came to edit, I was asked if I want to use the source code editor OR the visual editor and when I chose the Visual Editor, it worked fine.

let domain = window.location.host;
let protocol = window.location.protocol;
let h1 = document.querySelector("h1");

window.addEventListener('keydown', function(event) {
    if (event.altKey && event.shiftKey && event.key === 'E') {
        window.location.href = `${protocol}//${domain}/index.php?title=${h1.innerText}&veaction=edit`;
    }
});

Why do I get the above error in console and how to solve it?

109.64.104.73 (talkcontribs)

Perhaps there is a need in dispatchEvent(new Event('change')); somewhere?

109.64.104.73 (talkcontribs)

Nope, no need in dispatchEvent.

109.64.104.73 (talkcontribs)

Please try to explain the problem.

109.64.104.73 (talkcontribs)

@Clump

Man, so sorry to bother you, my last comment here should have been written in another thread so please delete it.

I promise that this should never happen again.

Stress, tiredness and too many bookmarks of threads took me down.

I am sorryĀ !

109.64.104.73 (talkcontribs)

A nice workaround I've found:

Enabling both Extension:WikiEditor and Extension:VisualEditor from LocalSettings.php and then accessing the Visual Editor from WikiEditor.

In the WikiEditor toolbar, in the left edge there should be a pencil icon which clicking on gives the option to switch for Visual Editor.

Reply to "How to open the visual editor with JavaScript?"

How to display all new pages only with date and name?

3
109.64.104.73 (talkcontribs)

I used this:

Special:Newpages|limit=5

I expected to get only dates and names but got much more information (edit || history buttons), content summary, etc. Trying to cut only dates and names, I did:

.rootpage-example .mw-userlink,
.rootpage-example .mw-usertoollinks, 
.rootpage-example .comment,
.rootpage-example .mw-newpages-history,
.rootpage-example .mw-newpages-edit,
.rootpage-example .mw-newpages-length {
    display: none;
}

But,

I still have some strange content:

21:42, 21 באפ×Øיל 2022 א ( | ) ā€ ā€
09:36, 10 באפ×Øיל 2022 ב ( | ) ā€ ā€
18:10, 7 באפ×Øיל 2022 ג ( | ) ā€ ā€
07:23, 7 באפ×Øיל 2022 ā€×“ ( | ) ā€ ā€
06:36, 7 באפ×Øיל 2022 ה ( | ) ā€ ā€

I don't know what is this ( | ).

I assume it to be some pseudo-element because it doesn't have a CSS selector.

How to remove the ( | ) or at least how to display all new pages only with date and name?

109.64.104.73 (talkcontribs)

I run Special:Newpages|limit=5 as {{Special:Newpages|limit=5}}

109.64.104.73 (talkcontribs)

I was able to cut out the irrelevant remnant part ( | ) with JavaScript and regex.

document.querySelector('.new_pages').innerHTML = document.querySelector('.new_pages').innerHTML.replace(/[\|\(\)]/g, '');

Where [\|\(\)] is actually a backslash escaped |, escaped ( and an escaped ),

Reply to "How to display all new pages only with date and name?"