Project:Support desk/Flow

About this board

This page is an archive. Do not add new topics here.

Please ask new questions at Project:Support desk instead.

Download an svg file from Commons.

5
Piero Caracciolo (talkcontribs)

Could you tell me to whom I can ask the following question?

I found a file that would turn out to be very useful for a thing that I am writing. This file has the format svg, but when I try to download it, I get a file wit the suffix .svg.png. Would it be possible to download the svg file?

Thank you.

82.197.207.202 (talkcontribs)

Visit the file’s page and the find the “doenload original” link on the page and download that.

This post was hidden by ToadetteEdit (history)
Peculiar Investor (talkcontribs)

If your are writing for a wiki, enable InstantCommons, see Manual:$wgUseInstantCommons and InstantCommons. InstantCommons allows the usage of any uploaded media file from the Wikimedia Commons in any MediaWiki installation world-wide. InstantCommons-enabled wikis cache Commons content so that it is only downloaded once, and subsequent pageviews load the locally existing copy.

This post was hidden by ToadetteEdit (history)
Reply to "Download an svg file from Commons."

[RESOLVED] Problem with categorization

5
Ivano.buffa (talkcontribs)

Hi All, I read a lot about using categories in mediawikis, so I have decided to go for it.

ISSUE

I have added an internal article to an existing category called "Linux commands" (only first character in capital... al the rest in lower case) using the following:

[[Category:Linux commands]]

As a result I have got correctly the link to this new category at the end of my page (so the article itself get categorized correctly) but the link to it is <span style="color:red>red despite the fact, as specified above, this category already exists!!!

If I click on this category (Linux commands) it brings me to the page containing this category. In there I can see the title of my article just linked under the correct letter but the page itself appears in Edit view and the following message appears:

Remember that this is only a preview. Your changes have not yet been saved! → Go to editing area

MY SYSTEM

  • MediaWiki: 1.22.3
  • PHP: 5.3.3 (apache2handler)
  • MySQL: 5.1.73

Can anybody help me?

Thanks in advance!

FlightTime (talkcontribs)

You need to actually create the page, Click on the red link, when the edit window opens for that page, add something like "This is the Linux commands category" then click "Save page" this will create the page and turn the red link to blue.

Cheers,

FlightTime (talkcontribs)
)
Buffa (talkcontribs)

Shame on me!

It worked. Thank you very much Mlpearc.

Regards,

 Ivano
Flow talk page manager (talkcontribs)

You're welcome, glad to help :)

This revision was imported from LiquidThreads with a suppressed user. It has been reassigned to the current user.

Reply to "[RESOLVED] Problem with categorization"

Linux Account User as Wiki Log in

7
Syplante (talkcontribs)

Hello,

We're new with Mediawiki. We're trying to create a private wiki site and we want to avoid having to create additional account.

Which extension is using the local linux account user ( /etc/passwd ) to log in as a wiki user ?


Here's our Mediawiki version :

Product Version
MediaWiki 1.34.2
PHP 7.2.24-0ubuntu0.18.04.6 (apache2handler)
MariaDB 10.1.44-MariaDB-0ubuntu0.18.04.1
ICU 60.2

Thank you !

Fokebox (talkcontribs)

$wgGroupPermissions['*']['creareaccount'] = false;

Florianschmidtwelzow (talkcontribs)

I'm not aware that such a n extension exists. I would also rather not use it and I think that there's even no (easy/standard) way of getting the information required to login simply from the passwd file, even given that your system is not using a sahdow file for passwords (which it probably does). I'm not even sure, if you can read all the required files from php without root access, and if not, running php as a root user is probably a big security issue as well.

So, instead of looking for such a way, it's probably more beneficial to look in a better way to manage your users. Probable solutions would be to have an LDAP service, which MediaWiki can integrate with, using extensions (LDAPAuthentication2). Or you could find another user management system of your choice and integrate MediaWiki using OAuth or SAML.

Bawolff (talkcontribs)

you probably want to setup openLDAP using the passwd backend, and then use a ldap extension for MW.

Syplante (talkcontribs)

Where can I fin iformation and example of configuration of LDAPAuthentification2 ?

Malyacko (talkcontribs)
199.198.134.134 (talkcontribs)

LDAPAuthentication2 supports only php7.x ... is there a newer one that would work with the new mediawiki?

Reply to "Linux Account User as Wiki Log in"
ArchATempAcct (talkcontribs)

We havent altered localsettings.php (to my knowledge) and now everyone is getting this error, seemingly out of nowhere, when people try to use their preferences area:

Internal error Jump to navigation Jump to search

[5ae6fcab633b45b38c47906d] /Special:Preferences MWException: Default '2' is invalid for preference imagesize of user 𝗔𝗿𝗰𝗵𝗮𝗻𝗴𝗲𝗹

Backtrace:

from /home/rabidpan/public_html/fascipedia/includes/preferences/DefaultPreferencesFactory.php(351)

  1. 0 /home/rabidpan/public_html/fascipedia/includes/preferences/DefaultPreferencesFactory.php(260): MediaWiki\Preferences\DefaultPreferencesFactory->loadPreferenceValues(User, RequestContext, array)
  2. 1 /home/rabidpan/public_html/fascipedia/includes/preferences/DefaultPreferencesFactory.php(1800): MediaWiki\Preferences\DefaultPreferencesFactory->getFormDescriptor(User, RequestContext)
  3. 2 /home/rabidpan/public_html/fascipedia/includes/specials/SpecialPreferences.php(131): MediaWiki\Preferences\DefaultPreferencesFactory->getForm(User, RequestContext, string)
  4. 3 /home/rabidpan/public_html/fascipedia/includes/specials/SpecialPreferences.php(109): SpecialPreferences->getFormObject(User, RequestContext)
  5. 4 /home/rabidpan/public_html/fascipedia/includes/specialpage/SpecialPage.php(701): SpecialPreferences->execute(NULL)
  6. 5 /home/rabidpan/public_html/fascipedia/includes/specialpage/SpecialPageFactory.php(1428): SpecialPage->run(NULL)
  7. 6 /home/rabidpan/public_html/fascipedia/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
  8. 7 /home/rabidpan/public_html/fascipedia/includes/MediaWiki.php(904): MediaWiki->performRequest()
  9. 8 /home/rabidpan/public_html/fascipedia/includes/MediaWiki.php(562): MediaWiki->main()
  10. 9 /home/rabidpan/public_html/fascipedia/index.php(50): MediaWiki->run()
  11. 10 /home/rabidpan/public_html/fascipedia/index.php(46): wfIndexMain()
  12. 11 {main}
Paul.lenhart (talkcontribs)

I just found this issue on one of my wikis. I don't suppose you ever found a fix?

For comparison, here's my backtrace...


[Z1oY54QmUfBG8HNxxUzIBQAAANI] /index.php?title=Special:Preferences MWException: Default '"0"' is invalid for preference math of user Pltee

Backtrace:

from /datalocal/www/html/mediawiki/includes/preferences/DefaultPreferencesFactory.php(298)

#0 /datalocal/www/html/mediawiki/includes/preferences/DefaultPreferencesFactory.php(250): MediaWiki\Preferences\DefaultPreferencesFactory->loadPreferenceValues()

#1 /datalocal/www/html/mediawiki/includes/preferences/DefaultPreferencesFactory.php(1681): MediaWiki\Preferences\DefaultPreferencesFactory->getFormDescriptor()

#2 /datalocal/www/html/mediawiki/includes/specials/SpecialPreferences.php(132): MediaWiki\Preferences\DefaultPreferencesFactory->getForm()

#3 /datalocal/www/html/mediawiki/includes/specials/SpecialPreferences.php(110): SpecialPreferences->getFormObject()

#4 /datalocal/www/html/mediawiki/includes/specialpage/SpecialPage.php(647): SpecialPreferences->execute()

#5 /datalocal/www/html/mediawiki/includes/specialpage/SpecialPageFactory.php(1366): SpecialPage->run()

#6 /datalocal/www/html/mediawiki/includes/MediaWiki.php(314): MediaWiki\SpecialPage\SpecialPageFactory->executePath()

#7 /datalocal/www/html/mediawiki/includes/MediaWiki.php(930): MediaWiki->performRequest()

#8 /datalocal/www/html/mediawiki/includes/MediaWiki.php(564): MediaWiki->main()

#9 /datalocal/www/html/mediawiki/index.php(53): MediaWiki->run()

#10 /datalocal/www/html/mediawiki/index.php(46): wfIndexMain()

#11 {main}

Reply to "preferences error"

Revision 0 does not exist

22
Rebastion2 (talkcontribs)

So my wiki has gone through a few decades of upgrades and I would consider its database surely rife for optimization. I noticed this as I am unable to upgrade to the latest LTS, so now I am trying to isolate and fix as many problems with the database as I can.


One is shoddy files and other corruptions. Most maintenance scripts don't seem to really fix this.


One problem I have is similar to this one https://stackoverflow.com/questions/34143056/main-page-error-of-mediawiki

I have a file that displays properly but has no 0 revision registered for some reason and I cannot edit it, either. None of the "fixes" I can find on here and elsewhere on the web really help. I appreciate any pointers to maintenance scripts, hacks and other tips to really (really) fix flawed database structures etc...

Bawolff (talkcontribs)

Can you post the entry in the page table for that page, along with anything in the revision table where rev_page is equal to the page_id for that page?

What version of mediawiki are you using?

Common causes of this are referential integrity errors, either with the page_latest field in page, the rev_comment_id field in revision or rev_actor field in revision (the last being most common as the actor migration upgrade script is fragile)

Rebastion2 (talkcontribs)

First of all thanks for your interest in helping me. Ok let's see (would love a maintenance script that just goes through my entire database and either fixes everything or gives me a very detailed report what needs fixing).


"Entry in the page table for that page":

page_namespace 6 pagetitle 4A61636B70616C616E63652E6A7067 is_redirect 0 is_new 1 page_touched 20230118090223 page_latest 5734 page_len page_links_updated 3230313530343032313635383433


"anything in the revision table where rev_page is equal to page_id"

rev_id 5734 rev_page 2524 rev_commend_id 0 rev_actor 0 rev_timestamp 20060208174920 rev_minor_edit 0 rev_deleted 0 rev_len 0 rev_parent_id 0 rev_sha1 70686F6961633968346D383432787134357370377336753231657465657131 (this is not unique, I see a few adjacent revisions that have the same hash, but I could tink of reasons why that may be so, but not sure if it's supposed to be non-unique)

Mediawiki 1.38.2

I may have used delete old revisions many many years ago. And one of the things I have tried very recently is the migrateactors php script which helps in assiging content that has no actor assigned

Bawolff (talkcontribs)

So the rev_actor being 0 and rev_comment_id being 0 indicate that update.php didnt do the migration properly.

The actor migration script generally doesnt work anymore. Its best to run it around 1.33. If you dont have backups to that point you would probably have to manually fix it by updating rev_actor to point to some actor.

Rebastion2 (talkcontribs)

what do I point it to? this all means very little to me not being familiar with the product's sql architecture. Going back to 1.33 is not an option of course....

Rebastion2 (talkcontribs)
Rebastion2 (talkcontribs)

Bawolff, I have a very concrete question, maybe you can point me in the right direction: from all I can gather, once restoring to a pre 1.35 backup state is off the table, there is no real way to "fix" this. However, if it only affects a manageable number of pages/files, I wonder if the following could be achieved: is there a way to manually remove all traces of these pages/files from the database, so that these become "nonexistent" again and can be re-created or re-uploaded (in the case of the files) thereby creating new/fresh and correct database entries for these content items? That would be a manual way of fixing this in order to have the next upgrade to 1.39.2 not throw any errors :)

Bawolff (talkcontribs)

You could delete the entry in the page table i suppose, ymmv.

Rebastion2 (talkcontribs)

hm, can't even find it. Nothing in the database seems to be in plain text, as far as I understand it it is all hashed, but can't find one of the files in question even by looking for their hashed value... so weird

Bawolff (talkcontribs)

They aren't hashed. Some db tools will display page titles in hexadecimal form

Rebastion2 (talkcontribs)

How weird, but indeed the sql query the db tool shows on top of the screen when opening the pages table says "

SELECT *, HEX(`page_title`) AS `page_title`, HEX(`page_content_model`) AS `page_content_model`, HEX(`page_links_updated`) AS `page_links_updated`, HEX(`page_lang`) AS `page_lang`   FROM `swdb_page`LIMIT 50
Rebastion2 (talkcontribs)

talking to my hoster now why that is the database wide default, so weird

Rebastion2 (talkcontribs)

it seems to be default behavior for "Adminer" to show as Hex if the column type is binary. Now of course it sucks the hoster uses Adminer, but before I go into further trouble I just want to make sure and ask this: binary is the correct format for the table column(s), right?

Bawolff (talkcontribs)

Yes. We basically use it to tell the DB to be hands off about the value.

Simpsonspedia.net (talkcontribs)
Rebastion2 (talkcontribs)

Hi Bawolf. Appreciate your input. If my problem is limited to just a handful pages/files, you mentioned they could be pointed to to "some actor". Any advice as to which?

The alternative would be to delete all mention of this content and create it anew (thereby correctly establishing that content and its relationships in the database like any new content created)

Bawolff (talkcontribs)

it doesn't really matter which actor. You could create a new user for that purpose.

Rebastion2 (talkcontribs)

I could just assign all these to me, but what values doe rev_actor and rev_comment_id etc. get? forgive me but it's all a bit overwhelming without prior in depth knowledge of the database structure. My goal would be for none of these to be 0, right? ev_minor_edit 0 rev_deleted 0 rev_len 0 rev_parent_id 0 isn't a problem?

Rebastion2 (talkcontribs)

sorry to be a bother, still looking for a step by step sort of instruction how to possibly "fix" this manually (at least as a "hack" - I don't care who these revisions are assigned to as long as the database is no longer practically corrupted and these files uneditable)

Rebastion2 (talkcontribs)

Still wondering how to solve this. There's something in phabricator that's not developed yet about re-calculating the content blobs and thus restoring the lost connections between the tables. If I know the handful of content items affected, could I do it manually? I wonder if I attempt another upgrade now will it work or is https://phabricator.wikimedia.org/T328169 the thing that needs to be done first.

Ciencia Al Poder (talkcontribs)

At your current state, most you can get is assigning all those xx_actor and xx_commend_id an existing id from the actor and comment table respectively. For example, choose a system user like "maintenance script" or create a new user just for this purpose, and a comment that's empty or has a meaningful text like "imported revision" or "restored revision" (you can create a new page and use this edit summary to create it. That should make your revisions accessible again if they're broken due to inconsitencies in those fields.

Rebastion2 (talkcontribs)

My SQL skills are rather basic, I may need a more detailed instruction on how to do it. 1) is there a systematic way to catch all the cases that are corrupted, I keep finding wiki content by accident that is affected 2) which fields in the database do I change to which variables/numbers/ids etc without causing further breakage? And I don't think I understand what you mean by creating an empty comment etc. To be clear: affect content is entirely non-editable from the front end... Thanks for you help!

Reply to "Revision 0 does not exist"

Notifications to Android

11
Gryllida (talkcontribs)

Can I get notifications from Extension:Echo (and other extensions using same mechanism, seeing as "Other MediaWiki extensions can make use of Notifications to send their own notifications; Thanks and DiscussionTools are two such extensions") pushed to Android? If this is not implemented, please guide me how to do it regarding the available API and examples of similar open-source apps, then I can try to develop this feature. I would like to do this as part of an app which is not focused on Wikipedia only, it should allow the users to specify the address of the wiki (or multiple wikis) where to get the notifications from in their Android device.

TheDJ (talkcontribs)

The notifications can be pushed to the (Wikipedia) mobile app, by going Preferences -> Notifications and checking the notifications for the 'Mobile' channel.

As there is only a Wikipedia Android app, those are the only sites of which you can push the notifications to Android. As Application notifications need to be configured by the website owner and registered etc etc, I don't think you can push them to your own app.

TheDJ (talkcontribs)

Of course you can build your own push server to push them. But then you'd have to fetch them using the api from this server, which would be less than ideal, as you'd have to pull them in that case, before you can push, which is pretty inefficient.

Bawolff (talkcontribs)

I guess someone could implement push notifications on the real site instead of the app.

Gryllida (talkcontribs)

Hi TheDJ, Bawolff, thank you for your replies. How does it work in the English Wikipedia app? Where is the push server?

TheDJ (talkcontribs)
Bawolff (talkcontribs)
Gryllida (talkcontribs)

Thanks. I've found the latter link useful as there is an api query that allows to subscribe to receive new notification. Example of how to leverage this in a tiny sample Android app would be very helpful.

(The infrastructure team is now known as Content Transform Team. @MSantos (WMF) @SLopes-WMF)

Gryllida (talkcontribs)

TheDJ, Bawolff, I appreciate your advice however I've had zero progress because I don't know what I need to do to achieve what I want: write an app that allows me to receive on-wiki notifications as push notifications on Android, and allow me to write custom code to send additional notifications triggered by events which I want which are not included in Echo/Notifications system. Could you please provide me with step by step instructions?

I can administer a software on a toolforge server if it is needed.

TheDJ (talkcontribs)

I also don't know. I can only give the pointers that I have given.

MSantos (WMF) (talkcontribs)

@Gryllida thanks for the context and sorry for the late response on this thread. I am not entirely sure on how to help, we have been maintaining the service but the original authors are not around anymore.

I believe this could be either on Android or the push-notifications service side but if you want to push to the Android and/or iOS devices you need to file a phab task and tag Content Transform Team and Mobile Apps so we can understand your need.

As far as I can remember, we would support any Echo notifications of the box, I am not sure about how Echo interacts with other extensions.

Reply to "Notifications to Android"

What do do after repairing job table?

5
Jonathan3 (talkcontribs)

My server ran out of space. I only realised this yesterday, but it meant I needed to repair the job table. Is there any way of re-doing things that failed in the past, but weren't in the job table (any more), i.e. making sure the wiki database is all up to date now?

TheDJ (talkcontribs)

This is hard to say. Many of the tasks handled by jobs have maintenance scripts to refresh essentially all pages or specific pages for that type of change. But these are expensive operations, so doing them for an entire wiki without knowing where the discrepancy is, might not be wise. Additionally, some of the tasks handled by the job queue will also be handled eventually as people use the site again and cause triggers to refire.

Jonathan3 (talkcontribs)

Thanks. I'd be happy to run whatever scripts would be recommended. The wiki isn't that big (15k pages maybe). I've used refreshLinks.php before and it didn't take inordinately long. But maybe there are just too many - Manual:Maintenance_scripts/List_of_scripts...

Bawolff (talkcontribs)

Most jobs don't really matter too much if they get dropped. RefreshLinks.php will probably do most the stuff. In rare cases rebuildRecentChanges maybe.

Jonathan3 (talkcontribs)

Thank you. I'll look into those.

Reply to "What do do after repairing job table?"
TobyRush (talkcontribs)

I've been trying for days to track down a problem with my installation of MediaWiki 1.41.1, which I spent some time rescuing from a spam attack a while back. My NavBoxes aren't working, being replaced with "Lua error: Internal error: The interpreter exited with status 127." My understanding is that 127 is a "file not found" error, but I can't figure out what file it can't find. I'm not certain that it's related to NavBox specifically; I get the impression that it's a more general Lua issue, since I'm seeing the error in a nearly all my Templates and Modules.

Is there a way I can determine what file Lua is looking for? I've got $wgShowDebug set to true but I'm not seeing anything obvious in the logs... though I don't know for sure what exactly I'm looking for.

TobyRush (talkcontribs)

Okay, I can confirm that it's nothing to do with the Navbox: if I enter a simple command (like =p.Hello .. ', World!')into the Debug Console on any page, I get the status 127 error. My webserver does not allow executables outside of /usr/bin, so I have the following in my LocalSettings.php:

$wgScribuntoEngineConf['luastandalone']['luaPath'] = '/usr/bin/lua';

I'm sure this is something simple for someone familiar with Lua an Scribunto, but I'm at a loss...

TobyRush (talkcontribs)

Also, for each error it throws on the page (for example, a page where I have several NavBoxes), it includes this line in the log. Not sure if that's something normal or if it hints at anything:

[Scribunto] MediaWiki\Extension\Scribunto\Engines\LuaStandalone\LuaStandaloneInterpreter::__construct: creating interpreter: 'exec' '/bin/sh' '/home/sites/35b/2/226fa573e0/public_html/theorywiki/extensions/Scribunto/includes/Engines/LuaStandalone/lua_ulimit.sh' '7' '8' '51200' ''\''/usr/bin/lua'\'' '\''/home/sites/35b/2/226fa573e0/public_html/theorywiki/extensions/Scribunto/includes/Engines/LuaStandalone/mw_main.lua'\'' '\''/home/sites/35b/2/226fa573e0/public_html/theorywiki/extensions/Scribunto/includes'\'' '\''3'\'' '\''8'\'''

Bawolff (talkcontribs)

Error 127 generally means that $wgScribuntoEngineConf['luastandalone']['luaPath'] is set incorrectly,or you are otherwise missing some files in the scribunto extension.

Bawolff (talkcontribs)

> My webserver does not allow executables outside of /usr/bin, so I have the following in my LocalSettings.php:

Did you actually move the lua binary to that path?

Reply to "Lua Error: Status 127"
181.171.135.220 (talkcontribs)

Hello

I am trying to perform a installation of MediaWiki 1.42.3 on my server, and I am encountering the following error:

Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' DEFAULT CHARSET=binary' at line 8

Function: Wikimedia\Rdbms\Database::sourceFile( /home/mediawiki/htdocs/maintenance/tables-generated.sql )

Query: CREATE TABLE `site_identifiers` (

si_type VARBINARY(32) NOT NULL,

si_key VARBINARY(32) NOT NULL,

si_site INT UNSIGNED NOT NULL,

INDEX si_site (si_site),

INDEX si_key (si_key),

PRIMARY KEY(si_type, si_key)

) ENGINE=, DEFAULT CHARSET=binary


MariaDB Version: 10.6.20

Ammarpad (talkcontribs)

Check your $wgDBTableOptions in LocalSettings.php. Visit the link to see the allowed valid values.

181.171.135.220 (talkcontribs)

I am currently in the process of installing MediaWiki from scratch, and I do not yet have the LocalSettings.php file.

Ammarpad (talkcontribs)

How are you doing the installation? Please give exact steps leading to the error. Also state from where you downloaded MediaWiki.

Bawolff (talkcontribs)

Reminds me a bit of phab:T212236


What is the output of SHOW ENGINES; from your database server.

Reply to "Instalation Error"

PHP Deprecated:  (Extension name)'s extension.json or skin.json does not have manifest_version

5
Summary by Jonathan3

Added "manifest_version": 2

Jonathan3 (talkcontribs)

I've noticed this deprecation notice on some extensions of mine I've cobbled together over the years

Over half the extensions I have from mediawiki.org have <code>"manifest_version": 2</code> and the rest have <code>"manifest_version": 1</code>.

I can see from Manual:Extension.json/Schema#manifest version that these are the two choices, but can't work out much more than that.

Which should I use?

Jonathan3 (talkcontribs)

I've gone for "1" in the meantime!

Samwilson (talkcontribs)

@Jonathan3: I think you'd be best off moving to version 2, and fixing any issues that arise. It's the way of the future after all! :-P

Jonathan3 (talkcontribs)

Cool. Done. In one of the extensions that caused (with ExtensionName replacing the actual name):

  • PHP Warning: array_key_exists() expects parameter 2 to be array, bool given in /var/www/html/includes/registration/ExtensionProcessor.php on line 830
  • PHP Fatal error: Uncaught UnexpectedValueException: Missing value for config ExtensionNameEnableFoo in /var/www/html/includes/registration/ExtensionProcessor.php:831 for a "config" value. It was just a leftover from whatever example template I'd based it on, so getting rid of it solved things.

For my own future reference, this is what caused the problem:

	"config": {
		"ExtensionNameEnableFoo": true
	},
Jonathan3 (talkcontribs)