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

Visual Editor is not working (Parsoid/RESTBase)

7
Apatha11 (talkcontribs)

Hello Team,

Here is my local setup.


MediaWiki 1.35.5
PHP 7.4.27 (apache2handler)
MariaDB 10.4.22-MariaDB-1:10.4.22+maria~focal
ICU 67.1
Lua 5.1.5



Error:

Error contacting the Parsoid/RESTBase server: (curl error: 7) Couldn't connect to server

Since I have segregated my extension under dir /var/www/html/settings/ExtensionSettings.php

Thanks

Malyacko (talkcontribs)
Apatha11 (talkcontribs)

"name": "VisualEditor",

"version": "0.1.2",

"author": "Alex Monk",


What do you mean by branch , sorry I did not get.

MarkAHershberger (talkcontribs)

When you installed VisualEditor, how did you download it and install it?

Apatha11 (talkcontribs)

git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor.git

cd VisualEditor

git submodule update --init


Or can possible this issue due to localhost?

since I am trying this on . http://localhost:8081

Malyacko (talkcontribs)

Which documentation do you follow and where?

MarkAHershberger (talkcontribs)

It looks like you checked out the development branch of VE instead of the REL1_35 one. I'm not sure that will make a difference, but it might.


Could you try the REL1_35 branch?

Reply to "Visual Editor is not working (Parsoid/RESTBase)"

Visual Editor not displaying category correctly in the Options Menu

5
ThomHarriman (talkcontribs)

When using the visual editor and when I add a category to a page if there was a previous category on that page it is displayed in red with the below text

Index.php?title=Category:Knowledge Management

Options Menu Category Problem Sample
Options Menu Category Problem Sample

Any suggestions on why this might be occuring? The same thing is happening with inserting media to a page too.

Thanks, for your help.

MarkAHershberger (talkcontribs)

That is weird. I haven't seen this before. Some questions:

  • Does the category already exist?
  • Does it do this for all categories or just this one?
  • If you try to save it, is the category added correctly?
ThomHarriman (talkcontribs)

Hi Mark.

  • Does the category already exist? Yes the category already exists.
  • Does it do this for all categories or just this one? All categories.
  • If you try to save it, is the category added correctly? Yes. If I delete it and add it again, then save it and then reopen the article again in the visual editor it shows up the same way again. It adds the correct wiki text to the bottom of the article as you would expect.

The really odd thing it does it with images too that are added to an article with the visual editor.

A real mystery.

MarkAHershberger (talkcontribs)

Could you post the MediaWiki version you're using? Are you using the NodeJS parsoid or the php parsoid?

ThomHarriman (talkcontribs)

We are at MediaWiki 1.35.1. Help me on the other question how do I know? The version of parsoid 0.12.1

Reply to "Visual Editor not displaying category correctly in the Options Menu"

Wikibase Intallation Port Problem

3
130.191.26.99 (talkcontribs)

I used XAMPP to install mediawiki (localhost:80). Before docker configuration, I could visit my mediawiki page with no issues. I then followed the instruction:Wikibase/Docker using Docker to install Wikibase. The wikibase hostname is localhost and port is 80(in the yml:     ports: - "80:80"). However, after installation, while the two processes and containers run withno issues, I got the error when I tried to reopen localhost: "Port 80 in use by "Unable to open process" with PID 18036!"

I tried to change the config fire for Apache to make it listen to 8080. I can then open localhost but cannot open mediawiki.


How to solve this issue?


Thanks!

Bawolff (talkcontribs)

Only one thing is allowed to listen to port 80 at a time. You can't have both XAMPP and docker both listening on 80.

> I tried to change the config fire for Apache to make it listen to 8080. I can then open localhost but cannot open mediawiki.

Its unclear if you mean your docker or your xampp install, if you restarted apache, and if you were opening localhost or localhost:8080, or if "mediawiki" means your xampp mediawiki or your docker mediawiki.

ChineseWikiClubBot (talkcontribs)

Thanks. Let me make myself clear. I installed mediawiki on XAMPP and can be accessed using "localhost/mywiki". The port for APACHE is 80. Then I installed the wikibase using Docker. In the yaml file for wikibase, currently I used

host: localhost

port:80:80

following the instruction.


But when I run the docker, the wikibase was not shown in the mediawiki/special pages. Should I change the port in yaml to 81:81? I didn't install mediawiki on docker. Do you mean I need to install mediawiki on docker as well?

Reply to "Wikibase Intallation Port Problem"

Shared actor table breaks revision store

3
MarvinRoesch (talkcontribs)

Hi,

we have set up second wiki for a foreign language for which we'd like to share users and sessions. Everything works fine so far, but we're having some trouble that appears to be related to the revision store. As per the recommendation on the manual page, we have added the actor table to $wgSharedTables. This however has broken extensions such as Extension:Replace Text, the root cause being in the revision store though, where the getRevisionByTitle function fails as it attempts a join on the actor table, which we have deleted on the foreign language wiki so it can't possibly get out of sync with the main wiki.

It is my understanding that having the table in $wgSharedTables should be all that's necessary here to make things work, but that does not appear to be the case.

We're currently running version 1.35.1. The main wiki is at https://coppermind.net and the foreign language one at https://es.coppermind.net.

Any help is appreciated!

Bawolff (talkcontribs)
MarvinRoesch (talkcontribs)

Thanks, but I have since found out that other jobs are also affected, e.g. Elastica writes and others. It also looks like it's not just the actor table, but user and user_properties as well. I have temporarily copied them over from the shared database to the language-specific one again and all jobs ran properly - as was to be expected.

Are these tables not intended to be deleted despite being "shareable"?

Reply to "Shared actor table breaks revision store"

Get error in Wikibase Client extension

4
Summary by Beginneruser

Ops Problem solved I debug error and try for resolve this content_models table in database of Wikibase repo site requirement backup

Beginneruser (talkcontribs)

Hi

For Change siteGlobalID from es to eswiki, me empty wbc_entity_usage table

and change $wgWBClientSettings['siteGlobalID'] = 'es'; to $wgWBClientSettings['siteGlobalID'] = 'eswiki'; in LocalSettings.php file

But get following error in MW 1.35.5

[bb68aeddeebdcdff167b271c] /wiki/Main_Page Wikibase\DataModel\Services\Lookup\EntityLookupException from line 51 of /path/w/extensions/Wikibase/lib/includes/Store/RevisionBasedEntityLookup.php: Failed to access name from content_models using id = 2

Backtrace:

#0 /path/w/vendor/wikibase/data-model-services/src/Lookup/RedirectResolvingEntityLookup.php(51): Wikibase\Lib\Store\RevisionBasedEntityLookup->getEntity()
#1 /path/w/extensions/Wikibase/client/includes/Hooks/SiteLinksForDisplayLookup.php(96): Wikibase\DataModel\Services\Lookup\RedirectResolvingEntityLookup->getEntity()
#2 /path/w/extensions/Wikibase/client/includes/Hooks/SiteLinksForDisplayLookup.php(82): Wikibase\Client\Hooks\SiteLinksForDisplayLookup->getSiteLinksForItemId()
#3 /path/w/extensions/Wikibase/client/includes/Hooks/LangLinkHandler.php(269): Wikibase\Client\Hooks\SiteLinksForDisplayLookup->getSiteLinksForPageTitle()
#4 /path/w/extensions/Wikibase/client/includes/Hooks/LangLinkHandler.php(290): Wikibase\Client\Hooks\LangLinkHandler->getEffectiveRepoLinks()
#5 /path/w/extensions/Wikibase/client/includes/Hooks/ParserOutputUpdateHookHandler.php(98): Wikibase\Client\Hooks\LangLinkHandler->addLinksFromRepository()
#6 /path/w/extensions/Wikibase/client/includes/Hooks/ParserOutputUpdateHookHandler.php(80): Wikibase\Client\Hooks\ParserOutputUpdateHookHandler->doContentAlterParserOutput()
#7 /path/w/includes/HookContainer/HookContainer.php(155): Wikibase\Client\Hooks\ParserOutputUpdateHookHandler->onContentAlterParserOutput()
#8 /path/w/includes/HookContainer/HookRunner.php(1242): MediaWiki\HookContainer\HookContainer->run()
#9 /path/w/includes/content/AbstractContent.php(594): MediaWiki\HookContainer\HookRunner->onContentAlterParserOutput()
#10 /path/w/includes/Revision/RenderedRevision.php(263): AbstractContent->getParserOutput()
#11 /path/w/includes/Revision/RenderedRevision.php(235): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached()
#12 /path/w/includes/Revision/RevisionRenderer.php(215): MediaWiki\Revision\RenderedRevision->getSlotParserOutput()
#13 /path/w/includes/Revision/RevisionRenderer.php(152): MediaWiki\Revision\RevisionRenderer->combineSlotOutput()
#14 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}()
#15 /path/w/includes/Revision/RenderedRevision.php(197): call_user_func()
#16 /path/w/includes/poolcounter/PoolWorkArticleView.php(216): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#17 /path/w/includes/poolcounter/PoolCounterWork.php(162): PoolWorkArticleView->doWork()
#18 /path/w/includes/page/Article.php(810): PoolCounterWork->execute()
#19 /path/w/includes/actions/ViewAction.php(80): Article->view()
#20 /path/w/includes/MediaWiki.php(532): ViewAction->show()
#21 /path/w/includes/MediaWiki.php(313): MediaWiki->performAction()
#22 /path/w/includes/MediaWiki.php(945): MediaWiki->performRequest()
#23 /path/w/includes/MediaWiki.php(548): MediaWiki->main()
#24 /path/w/index.php(54): MediaWiki->run()
#25 /path/w/index.php(47): wfIndexMain()
#26 {main}

in other language wiki (frwiki and enwiki) not problem but only on this language wiki (eswiki) get error !!!

Please help me !!

Beginneruser (talkcontribs)

I have to reset all Wikibase repo entry

So run sudo php populateEntityUsage.php in extensions/Wikibase/client/maintenance

I want get new Entity for eswiki siteGlobalID in wbc_entity_usage table

but after run query get old Entity of es siteGlobalID in wbc_entity_usage table

Beginneruser (talkcontribs)

Please help me

Beginneruser (talkcontribs)

Ops Problem solved

I debug error and try for resolve this

content_models table in database of Wikibase repo site requirement backup

176.10.34.13 (talkcontribs)

Hi

I upgrade the FW and now on 192.168.1.1 I get following error :

PAGE NOT FOUND

The page you were looking for doesn't exist!

Teltonika solutions:


This is RUT950

And FW RUT9XX_R_00.06.08.6_WEBUI

HELP !!!

Ciencia Al Poder (talkcontribs)

Please read Before you post in the right side of this page.

Reply to "PAGE NOT FOUND"

Hello! Many issues faced and solved. A working favicon is my white whale.

16
GuacamoleRob (talkcontribs)

For starters, I put a 32x32 pixel favicon.ico in my root directory, adjacent to my LocalSettings.php. Stil, no favicon turns up.

Then, I used the .ico's source .png. I added $wgFavicon = "$wgResourceBasePath/resources/assets/w.iki.png"; to my LocalSettings.php and still nothing.

What am I missing? Any ideas?

Jonathan3 (talkcontribs)

The first thing should have worked. What do you see when you you type (your wiki URL)/favicon.ico into the address bar? Is it displayed?

GuacamoleRob (talkcontribs)

Great question - I had not checked yet.


https://usa.abandonedbusiness.club/favicon.ico looks like the file it should!


Your response is why I posted here. No matter what I google, I see the same two methods for setting the favicon and nothing about troubleshooting this issue. It JUST isn't showing up and obviously, there is a reason but I am out of ideas. I am clueless.

Bawolff (talkcontribs)
GuacamoleRob (talkcontribs)

Gosh, I love you Bawolff. Everything that comes up, you seem to solve with less than 3 lines of narrative and the number of posts you handle in a day is remarkable. Can I send you a milkshake? 😀

GuacamoleRob (talkcontribs)

I use Notepad++, so ultimately what I resorted to was coming back to copy Bawolff's code and pasting it in the line under mine. I realized my mistake is that I'm so noob at PHP. Instead of encapsulating my string with -'- quote marks, I was of course using -"- quote marks.

I feel like a moron. Wasted so much time. Apologies to all!

Bawolff (talkcontribs)

just fyi, the difference between ' and " in php is how $ sign and \ is handled. If you are using a variable defined earlier in your value, like $wgResourceBasePath, you need to use ", where if you use a $ sign that is not a variable to be replaced, like the $1 in the value of $wgArticlePath, you need to use '. If your value does not contain $ or \, then it makes no difference if you use ' or ".

GuacamoleRob (talkcontribs)
Jonathan3 (talkcontribs)

In Manual:$wgFavicon the examples have it as a file path rather than a URL. How about uploading it as an image on your wiki itself and using the $wgFavicon = "/images/6/64/Favicon.ico"; example there? (Or whatever the /6/64 turns out to be with a lower-case f.)

Bawolff (talkcontribs)

just to be clear, it can be a relative url, but it can't be an actual file system path (e.g. /var/www/html/... wont work)

GuacamoleRob (talkcontribs)

Thanks for the response, Jonathan3! .ico isn't supported by default, so I just FTP'd favicon.ico to /images/2/26/. If you go to https://usa.abandonedbusiness.club/images/2/26/favicon.ico the image is there.

$wgFavicon = "/images/2/26/favicon.ico"; is all the way at the end of my LocalSettings.php. That's the only mention of "favicon," in the file.

It's still not working!

Jonathan3 (talkcontribs)
GuacamoleRob (talkcontribs)

Good note! Thank you.

So, with that in mind, my first effort was to create an exception rule on Cloudflare for

/images/2/26/favicon.ico

allowing that file to be served without security. I flushed the cache while I was there, too. Then, opened an incognito window in my test browser (Which clears cache every time it's closed) and it didn't work. Went through my now typical routine and checked 3 browsers, it didn't work.

So I changed my $wgServer = to https because I hadn't been introduced to that setting yet. Went to Cloudflare, deleted the exception rule, cleared cache, and repeated verification routine. It still didn't work!

This issue is simply one of 3 websmithing white whales I'm dealing with right now. White. Whale. This issue just refuses to be solved!

Also, I can't get the font Trinigan FG to work on any sort of any kind of Wordpress, and I can't get phpBB to install on my IONOS webspace. These 3 problems are all I've done with my waking hours since i woke on Monday. 😩

Bawolff (talkcontribs)

So going to your site on firefox, it seems like the favicon is working.

However, i do notice that there seems to be some sort of issue with closing the http/2 stream, which makes firefox think the page is still loading and delays showing the favicon. I think there's been some reports of that happening in the past with cloudflare. You could try setting $wgDisableOutputCompression = true; and see if that helps.

GuacamoleRob (talkcontribs)

Wow, hey! That's some great feedback! My wiki is seeing a little traffic today (I'm sure most of it from various tech support people I've been in touch with about one thing or the other), so it's refreshing to hear they've been greeted by a site without a bouncing, blank favicon screaming "This website is administered poorly."

I just checked on Firefox, and boom - there it is! At long friggin' last, Bawolff! One of the white whales is finally on the ship! I can't thank you enough, man. Whoo! That's such a huge relief.

Any idea why it's still not showing up in Edge OR Opera, though? My main and my test browser both still fail to load the favicon. What's Firefox that those other guys do not?

I've been using Opera as my primary for years, but a number of smaller things like this keep coming up. I guess it's time to think about moving back to Firefox.

Anyway, thanks again!

SyncmasterN (talkcontribs)

Had the same problem in Chrome.

Deleting the Chrome Favicon file solved this.

  1. Close Chrome
  2. Open your User Data folder
  3. Delete the Favicons file
  4. Run Chrome
  5. Visit sites to force the icons to be re-downloaded
Reply to "Hello! Many issues faced and solved. A working favicon is my white whale."
Mustafa MVC (talkcontribs)

MediaWiki version: 1.37.1

PHP version: 7.4.27


Hi, I want to install "MediaWiki" on my computer for testing purposes. However, I ran into some errors.


Deprecated: Premature access to service container [Called from TemplateParser::getTemplate in C:\xampp7.4\htdocs\MVC\includes\TemplateParser.php at line 120] in C:\xampp7.4\htdocs\MVC\includes\debug\MWDebug.php on line 375

Deprecated: Premature access to service 'HookContainer' [Called from MediaWiki\MediaWikiServices::getInstance in C:\xampp7.4\htdocs\MVC\includes\MediaWikiServices.php at line 267] in C:\xampp7.4\htdocs\MVC\includes\debug\MWDebug.php on line 375

Deprecated: Premature access to service 'ObjectFactory' [Called from Wikimedia\Services\ServiceContainer::{closure} in C:\xampp7.4\htdocs\MVC\includes\ServiceWiring.php at line 618] in C:\xampp7.4\htdocs\MVC\includes\debug\MWDebug.php on line 375

Deprecated: Premature access to service 'MainConfig' [Called from TemplateParser::getTemplate in C:\xampp7.4\htdocs\MVC\includes\TemplateParser.php at line 120] in C:\xampp7.4\htdocs\MVC\includes\debug\MWDebug.php on line 375

Deprecated: Premature access to service 'ConfigFactory' [Called from Wikimedia\Services\ServiceContainer::{closure} in C:\xampp7.4\htdocs\MVC\includes\ServiceWiring.php at line 827] in C:\xampp7.4\htdocs\MVC\includes\debug\MWDebug.php on line 375

Deprecated: Premature access to service 'BootstrapConfig' [Called from Wikimedia\Services\ServiceContainer::{closure} in C:\xampp7.4\htdocs\MVC\includes\ServiceWiring.php at line 346] in C:\xampp7.4\htdocs\MVC\includes\debug\MWDebug.php on line 375

Deprecated: Premature access to service 'LocalServerObjectCache' [Called from ObjectCache::getLocalServerInstance in C:\xampp7.4\htdocs\MVC\includes\objectcache\ObjectCache.php at line 256] in C:\xampp7.4\htdocs\MVC\includes\debug\MWDebug.php on line 375

Deprecated: Premature access to service 'StatsdDataFactory' [Called from ObjectCache::newFromParams in C:\xampp7.4\htdocs\MVC\includes\objectcache\ObjectCache.php at line 149] in C:\xampp7.4\htdocs\MVC\includes\debug\MWDebug.php on line 375


The directory where I installed "MediaWiki" is MVC.

MarkAHershberger (talkcontribs)

You haven't told us very much. Does this happen after your wiki is installed or during installation? If it is after installation, what extensions do you have?

You might look at this task in phabricator: Premature access to service container.

Bawolff (talkcontribs)

None of these are errors just warnings so canprobably be ignored.

Most likely the fault of an extension.

Reply to "MediaWiki Installation Error"

Integrate Zotero Citation Manager into MediaWiki

3
Brad udall (talkcontribs)

I'm trying to integrate some existing JS code that queries a Zotero database into a wiki I am building. Zotero is an open source citation manager.

Info on Zotero here:

https://www.zotero.org

Zotero has a WebAPI that would serve our purposes for getting access to the data stored there. I’ve found some existing javascript code that uses the API (I think via a CORS request) to query an online Zotero citation database and display information about items that match the request in a browser.

Here’s that JS code:

https://github.com/BLE-LTER/Zotero-JavaScript-Search-Client

There are 2 demos on that page labeled ‘Basic’ and ‘Complete Example’ that demonstrate what I want to do with JS but I need to have the results appear on a MW page.  The code has 3 JS modules and CSS sheet.

Can someone give me some hints on how to easily (!) incorporate this code into my wiki?

It seems like I could use create a gadget, a widget, or just put the code in common.js and maybe access it via a template?? I'd want to use the code on a few pages of the wiki.

Any hints, pitfalls, suggestions would be most appreciated.

Thanks,

MarkAHershberger (talkcontribs)
Bawolff (talkcontribs)

On wikipedia they use Citoid for this i think.

Reply to "Integrate Zotero Citation Manager into MediaWiki"

How to create a "role" for a user where that role is the only one that can edit articles

5
Guillaume Taillefer (talkcontribs)

Hello all, I am trying to create a website that is more unique than just any kind of wiki site (meaning that it doesn't directly involve just anyone with or without an account to edit), and involves history, using evidence, using the historical method/process, that sort of thing. Therefore just giving everyone the power to edit (even if they just signed up with an account) is extremely unfavorable. So, as the title says, I wanted to ask if anyone knew a way if you could create a process where if you want to edit articles, other than just contributing to the discussion, you have to read a short set of rules explaining the guidelines of how to edit on the site and the historical method/process that is used. To which then after they would read it they would get an "Editor role" which grants them the ability to create and edit articles. I know someone might say that I should just put in along with the process of Signing Up, but this is unfavorable as well because, as everyone might know, people tend to not read things when signing up to make an account for something, and so telling them that if they want to start editing, then they would have to go through a different process and read a short set of rules before starting.

So if someone could point me in the right direction of potentially what extension/plugin(s) I should use or how I could create such, or other, I would be greatful

Thanks

Guillaume Taillefer (talkcontribs)

trying to bump my question since no one has seemed to notice it

Malyacko (talkcontribs)
Flounder ceo (talkcontribs)

This is one thing that MediaWiki really got right. You can easily revoke editing rights from the user group and then create an "Editor" group to give them back to those who you select. Don't forget that if you trust your editors you can also give them "skipcaptcha". You set it up by adding a few lines to LocalSettings.php, then user Special:UserRights to grant the editor permissions to a user.

Guillaume Taillefer (talkcontribs)

First off I would like to apologise for not replying for a while, but I would also like to thank your guys' response and help. This has greatly helped me and brought me into the right direction of where I need to be. To clear it up, do you mean the captcha part as in you could add some sort of captcha where it leads you to having to read a set of rules to become editor if you aren't one already, and if you are already one you will be able to skip it? Otherwise, and even so, how would I be able to implement this system where if someone wants to become an editor, they must go through the process which brings them to the rules page for an editor, to which they will have to read and accept it (maybe setting a timer will make them do it), where the wiki will put their user under the Editor group, which allows for them to edit? Thanks

Reply to "How to create a "role" for a user where that role is the only one that can edit articles"