Project:Support desk

Jump to navigation Jump to search

About this board

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

There are also other places where to ask :

Before you post

Post a new question

  1. To help us answer your questions, please always indicate which versions you are using (reported by your wiki's Special:Version page):
    • MediaWiki
    • PHP
    • Database
  2. Please include the URL of your wiki unless you absolutely can't. It's often a lot easier for us to identify the source of the problem if we can look for ourselves.
  3. To start a new thread, click "Start a new topic".
Previous page history was archived for backup purposes at Project:Support_desk/old on 2015-07-30.
Other languages: English  العربية čeština Esperanto français 日本語 中文

access data in graph extension using aws api

SumanGadhawal (talkcontribs)

Hi All,

Could you please help me out to access data for graph(using graph extension) from aws api.

here is example(below) where I am using Data :values hard coded({"category":"HR", "members":100},) is there is any way to access data through aws api

department verses employee bar chart

<graph  mode=interactive >


  "width": 400,

  "height": 200,

  "padding": {"top": 10, "left": 30, "bottom": 20, "right": 10},

  "data": [


      "name": "table",

      "values": [

        {"category":"HR", "members":100},

        {"category":"Technology", "members":500},

        {"category":"BDE", "members":200},

        {"category":"Retail", "members":91},

        {"category":"Customer", "members":81},

        {"category":"MD", "members":53},

        {"category":"Finance", "members":19},

        {"category":"R&D", "members":87},

        {"category":"Animation", "members":52}




  "signals": [


      "name": "tooltip",

      "init": {},

      "streams": [

        {"type": "rect:mouseover", "expr": "datum"},

        {"type": "rect:mouseout", "expr": "{}"}




  "predicates": [


      "name": "tooltip", "type": "==",

      "operands": [{"signal": "tooltip._id"}, {"arg": "id"}]



  "scales": [

    { "name": "xscale", "type": "ordinal", "range": "width",

      "domain": {"data": "table", "field": "category"} },

    { "name": "yscale", "range": "height", "nice": true,

      "domain": {"data": "table", "field": "members"} }


  "axes": [

    { "type": "x", "scale": "xscale" },

    { "type": "y", "scale": "yscale" }


  "marks": [


      "type": "rect",

      "from": {"data":"table"},

      "properties": {

        "enter": {

          "x": {"scale": "xscale", "field": "category"},

          "width": {"scale": "xscale", "band": true, "offset": -1},

          "y": {"scale": "yscale", "field": "members"},

          "y2": {"scale": "yscale", "value":0}


        "update": { "fill": {"value": "steelblue"} },

        "hover": { "fill": {"value": "red"} }




      "type": "text",

      "properties": {

        "enter": {

          "align": {"value": "center"},

          "fill": {"value": "#333"}


        "update": {

          "x": {"scale": "xscale", "signal": "tooltip.category"},

          "dx": {"scale": "xscale", "band": true, "mult": 0.5},

          "y": {"scale": "yscale", "signal": "tooltip.members", "offset": -5},

          "text": {"signal": "tooltip.amount"},

          "fillOpacity": {

            "rule": [


                "predicate": {"name": "tooltip", "id": {"value": null}},

                "value": 0


              {"value": 1}









Malyacko (talkcontribs)

What is "aws api"?

SumanGadhawal (talkcontribs)

Amazon web service API I mean if we created a get api on aws to access database and response of that api should be data in graph

Bawolff (talkcontribs)
Reply to "access data in graph extension using aws api"

Help Please Error Backtrace after Wikibase enable

CrossFire10100 (talkcontribs)

Hi there can you guys please help me out with this error.

Sorry! This site is experiencing technical difficulties.

Try waiting a few minutes and reloading.

(Cannot access the database)


#0 /home/admin/web/ Wikimedia\Rdbms\LoadBalancer->reportConnectionError()

#1 /home/admin/web/ Wikimedia\Rdbms\LoadBalancer->getConnection(0, Array, 'repo')

#2 /home/admin/web/ DBAccessBase->getConnection(-1)

#3 /home/admin/web/ Wikibase\Lib\Store\Sql\SiteLinkTable->getItemIdForLink('admin_wiki', 'Main Page')

#4 /home/admin/web/ Wikibase\Lib\Store\CachingSiteLinkLookup->getAndCacheItemIdForLink('admin_wiki', 'Main Page')

#5 /home/admin/web/ Wikibase\Lib\Store\CachingSiteLinkLookup->getItemIdForLink('admin_wiki', 'Main Page')

#6 /home/admin/web/ Wikibase\Client\LangLinkHandler->getEntityLinks(Object(Title))

#7 /home/admin/web/ Wikibase\Client\LangLinkHandler->getEffectiveRepoLinks(Object(Title), Object(ParserOutput))

#8 /home/admin/web/ Wikibase\Client\LangLinkHandler->addLinksFromRepository(Object(Title), Object(ParserOutput))

#9 /home/admin/web/ Wikibase\Client\Hooks\ParserOutputUpdateHookHandlers->doContentAlterParserOutput(Object(Title), Object(ParserOutput))

#10 /home/admin/web/ Wikibase\Client\Hooks\ParserOutputUpdateHookHandlers::onContentAlterParserOutput(Object(WikitextContent), Object(Title), Object(ParserOutput))

#11 /home/admin/web/ Hooks::callHook('ContentAlterPar...', Array, Array, NULL)

#12 /home/admin/web/ Hooks::run('ContentAlterPar...', Array)

#13 /home/admin/web/ AbstractContent->getParserOutput(Object(Title), 159, Object(ParserOptions), true)

#14 /home/admin/web/ MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(Object(WikitextContent), true)

#15 /home/admin/web/ MediaWiki\Revision\RenderedRevision->getSlotParserOutput('main')

#16 /home/admin/web/ MediaWiki\Revision\RevisionRenderer->combineSlotOutput(Object(MediaWiki\Revision\RenderedRevision), Array)

#17 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(Object(MediaWiki\Revision\RenderedRevision), Array)

#18 /home/admin/web/ call_user_func(Object(Closure), Object(MediaWiki\Revision\RenderedRevision), Array)

#19 /home/admin/web/ MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()

#20 /home/admin/web/ PoolWorkArticleView->doWork()

#21 /home/admin/web/ PoolCounterWork->execute()

#22 /home/admin/web/ Article->view()

#23 /home/admin/web/ ViewAction->show()

#24 /home/admin/web/ MediaWiki->performAction(Object(Article), Object(Title))

#25 /home/admin/web/ MediaWiki->performRequest()

#26 /home/admin/web/ MediaWiki->main()

#27 /home/admin/web/ MediaWiki->run()

#28 {main}

Happens when I enable

#$wgEnableWikibaseRepo = false;

#$wgEnableWikibaseClient = true;

#require_once "$IP/extensions/Wikibase/client/WikibaseClient.php";

#require_once "$IP/extensions/Wikibase/client/ExampleSettings.php";

I followed the documentation page to install Wikibase, still wont let me. I had to comment those out on LocalSettings.php to allow access.

Malyacko (talkcontribs)

@CrossFire10100 If also non-"guys" may ask: Which exact MediaWiki version? Which exact Wikibase version/branch? Which steps did you follow (link)?

Bawolff (talkcontribs)

my guess is that it thinks the wikibase repository is in some database other than your main one, that doesnt exist. I think a db name of repo is the default. Maybe try looking into the config options related to db access to tell it to use the db you want.

Reply to "Help Please Error Backtrace after Wikibase enable"

MW 1.31 down because of no obvious reason?

Stefahn (talkcontribs)

Since some months our wiki (MW 1.31.5) experiences a strange error, that happens maybe twice a week (on average).

The php error log is as follows:

[06-Dec-2019 10:02:16 CET] PHP Fatal error:  Uncaught Error: Call to a member function getCode() on null in /html/site/mediawiki/includes/user/User.php:1737
Stack trace:
#0 /html/site/mediawiki/includes/user/User.php(5417): User::getDefaultOptions()
#1 /html/site/mediawiki/includes/user/User.php(3101): User->loadOptions()
#2 /html/site/mediawiki/includes/context/RequestContext.php(336): User->getOption('language')
#3 /html/site/mediawiki/includes/Message.php(380): RequestContext->getLanguage()
#4 /html/site/mediawiki/includes/Message.php(1290): Message->getLanguage()
#5 /html/site/mediawiki/includes/Message.php(842): Message->fetchMessage()
#6 /html/site/mediawiki/includes/Message.php(934): Message->toString('text')
#7 /html/site/mediawiki/includes/exception/MWExceptionRenderer.php(201): Message->text()
#8 /html/site/mediawiki/includes/exception/MWExceptionRenderer.php(301): MWExceptionRenderer::msg('dberr-problems', 'Sorry! This sit...')
#9 /ht in /html/site/mediawiki/includes/user/User.php on line 1737

Sometimes this error happens once a day, sometimes several times within one minute.

As a consequence the site is down for some seconds and editors get kicked out (logged out) of the wiki.

I googled the error messages several times, but didn't find anything helpful.

Who can point me in the right direction to fix this annoying error please?

The site in question is and has ~ 60.000 visitors monthly, but this error also happens occasionally on another public MW 1.31 install that I run.

Malyacko (talkcontribs)
Bawolff (talkcontribs)

so it looks like the error (about getCode) happens when trying to show an error message about not being able to connect to database. Perhaps your dayabase server is unstable or overloaded (maybe it hit max concurrent users or something). Unfortunately the error you posted doesnt have details, but maybe there is more fmdetails in debug log or something

Reply to "MW 1.31 down because of no obvious reason?"
Travis.koehring (talkcontribs)

I wanted to modify the text within the "Source File" box on the upload page. It currently lists extensions and maximum file size that do not match what is in my LocalSettings file. I am not sure which file to edit. MediaWiki:Uploadtext is not the correct one, and here lists Upload-ownwork, but following the example it does not modify anything.


Malyacko (talkcontribs)
Reply to "Edit Upload Form: Source File"

editor menu toolbar missing after update

Queennicci (talkcontribs)

It was present in my copy of 1.30 but after i updated last night. Now the toolbar with formatting options like bold, italics, etc is missing.

Is it something I'm missing in the localsettings?

Malyacko (talkcontribs)
Queennicci (talkcontribs)

I updated to the most recent version of 1.33 and I was using the default editor before.

Queennicci (talkcontribs)

Oh wow I feel stupid. Thank you. I guess I wasn't using the default editor.

Reply to "editor menu toolbar missing after update"

I installed the homebrew browser and I get the error 104 trying to read repositories list, and then error 81. How do I fix this repositories list connection?

Dwwolfy (talkcontribs)
Malyacko (talkcontribs)

@Dwwolfy No idea. Why do you think that people on the support desk for the MediaWiki software know something called "homebrew browser"? :)

Reply to "I installed the homebrew browser and I get the error 104 trying to read repositories list, and then error 81. How do I fix this repositories list connection?"

LDAP Login: There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Please resubmit the form.

Bongo0458 (talkcontribs)

Hi there,

currently I am trying to add LDAP authentication to my media wiki instance. I was able to log in once but on logging back in i revive the above error.

Mediawiki : 1.31

PHP: 7.2

Mysql: 5.5.62

Here is my LocalSetting.php


# This file was automatically generated by the MediaWiki 1.23.6

# installer. If you make manual changes, please keep track in case you

# need to recreate them later.


# See includes/DefaultSettings.php for all configurable settings

# and their default values, but don't forget to make changes in _this_

# file, not there.


# Further documentation for configuration settings may be found at:


# Protect against web entry

if ( !defined( 'MEDIAWIKI' ) ) {



wfLoadSkin( 'Vector' );

## Uncomment this to disable output compression

# $wgDisableOutputCompression = true;

## The protocol and server name to use in fully-qualified URLs

$wgServer = "";

## The relative URL path to the skins directory

$wgStylePath = "$wgScriptPath/skins";

## The relative URL path to the logo.  Make sure you change this from the default,

## or else you'll overwrite your logo when you upgrade!

$wgLogo = "$wgScriptPath/images/cis_logo.png";

## UPO means: this is also a user preference option

$wgEnableEmail = false;

$wgEnableUserEmail = true; # UPO

$wgEmergencyContact = "";

$wgPasswordSender = "";

$wgEnotifUserTalk = false; # UPO

$wgEnotifWatchlist = false; # UPO

$wgEmailAuthentication = true;

## Database settings

$wgDBtype = "mysql";

$wgDBserver = "";

$wgDBname = "dbuser";

$wgDBuser = "dbuser";

$wgDBpassword = "dbpassword";

# MySQL table options to use during installation or update

$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=utf8";

# Experimental charset support for MySQL 5.0.

$wgDBmysql5 = false;

## Shared memory settings

$wgMainCacheType = CACHE_NONE;

$wgParserConf = array('class' => 'Parser',);

#$wgMainCacheType = CACHE_MEMCACHED;

#$wgMemCachedServers = [''];

#$wgSessionsInMemcached = true;

## To enable image uploads, make sure the 'images' directory

## is writable, then set this to true:

$wgEnableUploads = true;

$wgUseImageMagick = true;

$wgImageMagickConvertCommand = "/usr/bin/convert";

# InstantCommons allows wiki to use images from

$wgUseInstantCommons = false;

## If you use ImageMagick (or any other shell command) on a

## Linux server, this will need to be set to the name of an

## available UTF-8 locale

$wgShellLocale = "en_US.utf8";

## If you want to use image uploads under safe mode,

## create the directories images/archive, images/thumb and

## images/temp, and make them all writable. Then uncomment

## this, if it's not already uncommented:

#$wgHashedUploadDirectory = false;

## Set $wgCacheDirectory to a writable directory on the web server

## to make your wiki go slightly faster. The directory should not

## be publically accessible from the web.

#$wgCacheDirectory = "$IP/cache";

# Site language code, should be one of the list in ./languages/Names.php

$wgLanguageCode = "en";

## Default skin: you can change the default skin. Use the internal symbolic

## names, ie 'cologneblue', 'monobook', 'vector':

$wgDefaultSkin = "vector";

## For attaching licensing metadata to pages, and displaying an

## appropriate copyright notice / icon. GNU Free Documentation

## License and Creative Commons licenses are supported so far.

$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright

$wgRightsUrl = "";

$wgRightsText = "";

$wgRightsIcon = "";

# Path to the GNU diff3 utility. Used for conflict resolution.

$wgDiff3 = "/usr/bin/diff3";

# The following permissions were set based on your choice in the installer

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

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

$wgDebugLogFile = "/path/to/error.log";

$wgDebugLogGroups['LDAPProvider'] = '/path/to/LDAP.log';


# End of automatically generated settings.

# Add more configuration options below.

# Misc settings

#$wgFileExtensions = array_merge( $wgFileExtensions, array( 'zip' ) );


error_reporting( -1 );

ini_set( 'display_errors', 1 );

#$wgLDAPDebug = 0;

#$wgShowSQLErrors = true;

#$wgDebugDumpSql  = true;

#$wgShowDBErrorBacktrace = true;

$wgShowExceptionDetails = true;

wfLoadExtensions( [








] );

$wgAuthRemoteuserAllowUserSwitch = true;

$wgPluggableAuth_EnableLocalLogin = false;

$wgShowExceptionDetails = true;

#$wgAuthRemoteuserUserNameReplaceFilter = [

#    '$' => ''


$wgAuthRemoteuserUserName = function() {

   $user = '';

   if( isset( $_SERVER[ 'REMOTE_USER' ] ) ) {

       $user = strtolower( $_SERVER[ 'REMOTE_USER' ] );


   return $user;


$LDAPProviderDomainConfigProvider = function() {

       $config = [

               'AD' => [

                       'connection' => [

                               "server" => "",

                               "user" => "CN=searchuser,CN=Users,DC=site,DC=com",

                               "pass" => 'searchuser_pass',

                               "options" => [

                                       "LDAP_OPT_DEREF" => 1


                               "grouprequest" => "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\UserMemberOf::factory",

                               "emailattribute" => "saaccountname",

                               "basedn" => "dc=site,dc=com",

                               "groupbasedn" => "dc=site,dc=com",

                               "userbasedn" => "dc=site,dc=com",

                               "searchattribute" => "samaccountname",

                               "searchstring" => "",

                               "usernameattribute" => "samaccountname",

                               "realnameattribute" => "cn"


                       'authorization' => [

               'rules' => [

                   'groups' => [

                       'required' => [






                       'userinfo' => [

                               "attributes-map" => [

                                       "realname" => "cn"



                       'groupsync' => [

                               "mechanism" => "mappedgroups",

                               "mapping" => [

                                       "sysop" => "cn=admins,dc=site,dc=com",

                                       "customgroup" => "CN=Users,DC=site,DC=com"





       return new \MediaWiki\Extension\LDAPProvider\DomainConfigProvider\InlinePHPArray( $config );


# timezone

$wgLocaltimezone = "US/Central";

date_default_timezone_set( $wgLocaltimezone );

# turn on the nice editor by default.


# WikiEditor Options

#wfLoadExtension( ['VisualEditor'] );

$wgDefaultUserOptions['usebetatoolbar'] = 1;

$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;

# Displays the Preview and Changes tabs

$wgDefaultUserOptions['wikieditor-preview'] = 1;

# Displays the Publish and Cancel buttons on the top right side

$wgDefaultUserOptions['wikieditor-publish'] = 1;

# allow linking/embedding of images from external sites

$wgAllowExternalImages = true;

# Enable Seealso extension

# H.D.G. 1/15/2015

#require_once "$IP/extensions/Seealso/Seealso.php";

# Enable MsUpload extension

# H.D.G. 1/15/2015

#equire_once "$IP/extensions/MsUpload/MsUpload.php";

#wfLoadExtension( ['MsUpload']);

# Enable Labeled Section Transclusion

# H.D.G 1/23/15

#require_once "$IP/extensions/LabeledSectionTransclusion/lst.php";

#require_once "$IP/extensions/LabeledSectionTransclusion/lsth.php";

# Enable syntax highlighting

# SDG 2/25/2016

#require_once "$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php";

Here are the logs the issues causes.


Start request POST /Docs/index.php?title=Special:UserLogin&returnto=Main+Page



USER-AGENT: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0

ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8


ACCEPT-ENCODING: gzip, deflate, br

CONTENT-TYPE: application/x-www-form-urlencoded



CONNECTION: keep-alive


COOKIE: support_dev_wm_UserName=myuser; support_dev_wm_51a2e67c_session=hq9p1mjl1at2ihtt4dgppnealuc589uh


[caches] cluster: EmptyBagOStuff, WAN: mediawiki-main-default, stash: db-replicated, message: SqlBagOStuff, session: SqlBagOStuff

[caches] LocalisationCache: using store LCStoreDB

[CryptRand] 0 bytes of randomness leftover in the buffer.

[DBConnection] Wikimedia\Rdbms\LoadBalancer::openConnection: calling initLB() before first connection.

[DBReplication] Cannot use ChronologyProtector with EmptyBagOStuff.

[DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: using request info {

   "IPAddress": "",

   "UserAgent": "Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko\/20100101 Firefox\/70.0",

   "ChronologyProtection": false,

   "ChronologyPositionIndex": 0


[DBConnection] Wikimedia\Rdbms\LoadBalancer::openConnection: connected to database 0 at ''.

[SQLBagOStuff] Connection 6325684 will be used for SqlBagOStuff

[CryptRand] 0 bytes of randomness leftover in the buffer.

[session] SessionBackend "2ca7ii61auemaic26d3fnefgrusmamrh" is unsaved, marking dirty in constructor

[session] SessionBackend "2ca7ii61auemaic26d3fnefgrusmamrh" save: dataDirty=1 metaDirty=1 forcePersist=0

[cookie] setcookie: "support_dev_wm_51a2e67c_session", "", "1544038447", "/", "", "1", "1"

[cookie] already deleted setcookie: "support_dev_wm_51a2e67cUserID", "", "1544038447", "/", "", "1", "1"

[cookie] already deleted setcookie: "support_dev_wm_51a2e67cToken", "", "1544038447", "/", "", "1", "1"

[cookie] already deleted setcookie: "forceHTTPS", "", "1544038447", "/", "", "", "1"

[DBConnection] Wikimedia\Rdbms\LoadBalancer::openConnection: connected to database 0 at ''.

[session] SessionBackend "2ca7ii61auemaic26d3fnefgrusmamrh" force-persist due to persist()

[session] SessionBackend "2ca7ii61auemaic26d3fnefgrusmamrh" save: dataDirty=0 metaDirty=1 forcePersist=1

[cookie] setcookie: "support_dev_wm_51a2e67c_session", "2ca7ii61auemaic26d3fnefgrusmamrh", "0", "/", "", "1", "1"

[cookie] already deleted setcookie: "support_dev_wm_51a2e67cRemoteToken", "", "1578166447", "/", "", "1", "1"

[cookie] already deleted setcookie: "support_dev_wm_51a2e67cUserID", "", "1544038447", "/", "", "1", "1"

[cookie] already deleted setcookie: "support_dev_wm_51a2e67cToken", "", "1544038447", "/", "", "1", "1"

[cookie] already deleted setcookie: "forceHTTPS", "", "1544038447", "/", "", "", "1"

[session] SessionBackend "2ca7ii61auemaic26d3fnefgrusmamrh" Taking over PHP session

[session] SessionBackend "2ca7ii61auemaic26d3fnefgrusmamrh" save: dataDirty=0 metaDirty=1 forcePersist=1

[cookie] already set setcookie: "support_dev_wm_51a2e67c_session", "2ca7ii61auemaic26d3fnefgrusmamrh", "0", "/", "", "1", "1"

[cookie] already deleted setcookie: "support_dev_wm_51a2e67cRemoteToken", "", "1578166447", "/", "", "1", "1"

[cookie] already deleted setcookie: "support_dev_wm_51a2e67cUserID", "", "1544038447", "/", "", "1", "1"

[cookie] already deleted setcookie: "support_dev_wm_51a2e67cToken", "", "1544038447", "/", "", "1", "1"

[cookie] already deleted setcookie: "forceHTTPS", "", "1544038447", "/", "", "", "1"

[MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is expired/volatile, loading from database

Unstubbing $wgParser on call of $wgParser::firstCallInit from MessageCache->transform

Parser: using preprocessor: Preprocessor_DOM

Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions->__construct

QuickTemplate::__construct was called with no Config instance passed to it

[CryptRand] 0 bytes of randomness leftover in the buffer.

[session] SessionBackend "2ca7ii61auemaic26d3fnefgrusmamrh" data dirty due to dirty(): LoginSignupSpecialPage->getFakeTemplate/SpecialUserLogin->getToken/MediaWiki\Session\Session->getToken/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty

[session] SessionBackend "2ca7ii61auemaic26d3fnefgrusmamrh" save: dataDirty=1 metaDirty=0 forcePersist=0

MediaWiki::preOutputCommit: primary transaction round committed

MediaWiki::preOutputCommit: pre-send deferred updates completed

MediaWiki::preOutputCommit: LBFactory shutdown completed

[cookie] setcookie: "UseDC", "master", "1575574457", "/", "", "1", "1"

[cookie] setcookie: "UseCDNCache", "false", "1575574457", "/", "", "1", "1"

OutputPage::sendCacheControl: private caching;  **

Request ended normally

[session] Saving all sessions on shutdown

[DBConnection] Wikimedia\Rdbms\{closure}: closing connection to database ''.

[DBConnection] Wikimedia\Rdbms\{closure}: closing connection to database ''.

Thanks in advance!

Reply to "LDAP Login: There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Please resubmit the form."

NavBox error on new wiki

Summary by Queennicci

the Css page fixed it all

Queennicci (talkcontribs)
Queennicci (talkcontribs)

I am using the most recent release of wikimedia and have enabled parser.

Ciencia Al Poder (talkcontribs)
Queennicci (talkcontribs)

I wish I'd had this answer a day ago lmao. I figured this out in the middle of the night around 3 AM. Now it all works and I came here to close this out. thanks

HTML Tags - Issues after upgrading to 1.33.1

Krayfishkarl (talkcontribs)

I recently upgraded my site from version 1.28.2 to 1.33.1. It was successful albeit with some minor issues. The main one being that the custom backgrounds I was using no longer appear to function. Basically, my site is divided into different groups of articles. These articles are marked by special templates that assign it a category and also use HTML tags to change the background and link colors. Below are some examples:

After upgrading, even though the link recolorings still work, the body tag does not, and thus, no background appears. But prior to the upgrade, these templates worked just fine.

Here's what I have in my LocalSettings.php in regards to the HTML Tags.

#HTML Tags

include_once "$IP/extensions/HTMLTags/HTMLTags.php";

$wgHTMLTagsAttributes['a'] = array( 'href', 'class', 'id' );

$wgHTMLTagsAttributes['body'] = array( 'style', 'background', 'bgcolor', 'class', 'id' );

$wgHTMLTagsAttributes['meta'] = array( 'itemprop', 'content' );

$wgHTMLTagsAttributes['span'] = array( 'itemprop', 'itemscope', 'itemtype' );

$wgHTMLTagsAttributes['img'] = array( 'style', 'src', 'height', 'width', 'alt', 'class', 'id' );

$wgHTMLTagsAttributes['style'] = array();

What do I need to change in order to get the backgrounds to reappear again? The only other change I had to make during the upgrade was to disable the HeaderTabs extension as otherwise, the site would throw a 500 error. Here is the version information on my wiki if it proves necessary:

EDIT: In the process of upgrading, I also changed to PHP Version 7.3 from 5.6.

TheDJ (talkcontribs)

You created a public facing non secure website that can compromise the security of any visitor with an XSS vulnerability...

I'm not visiting it if you don't mind ;)

Also, i'm deducing that you are placing a body tag inside a body tag, so I don't know why and how that worked before, but the parser in the newer version likely isn't having such invalid HTML and it removes the body tag from the output regardless of what you specified.

Please use CSS and the skinning system to change the look of your website and pages, that is what they are FOR. HTML Tag is NOT what you should ever be using unless your really really really know what you are doing.

Krayfishkarl (talkcontribs)

Thank you for bringing this to my attention. I'll look into an alternative solution. In the meantime, I've disabled HTML Tags as a hotfix.

Reply to "HTML Tags - Issues after upgrading to 1.33.1"

Meta tags in skin from MediaWiki template

Headshaker1 (talkcontribs)

Hi! I'm a little bit confused with interacting between template and skin.

Let's say i have a template in my MediaWiki like

 <div id="custom-person">
 * <span>Birthday:</span> {{#if: {{{birth date|}}} | <b>{{#ol-time:|{{{birth date}}}}}</b> | — }}
{{#if: {{{full name|}}} | * <span>full name:</span> <b>{{{full name}}}</b>}}
{{#if: {{{birth place|}}} | * <span>birth place:</span> <b>{{{birth place}}}</b>}}
{{#if: {{{age|}}} | * <span> age:</span> <b>{{{age}}}</b>}}
{{#if: {{{nationality|}}} | * <span> nationality:</span> <b>{{{nationality}}}</b>}}

<div class="clear"></div>





All these pages are in one Namespace (0).

I need to generate head meta tags with data from this template.

I figured out how to filter such a pages and add title tags in my SkinPerson.php

if ( $out->getTitle()->getNamespace() == 0 ) {
    $out->addMeta( "description", $out->getPageTitle());
    $out->addHeadItem( 'og:description', '<meta property="og:description" content="' . $out->getPageTitle() . '">');

But I'm really stuck on how can I insert in, say, 'og:description' tag something like {{{full name}}} + {{{age}}} ?

Thanks in advance!

TheDJ (talkcontribs)

wikitext templates are not simple key values, they are multilevel nested templating with logic that generates HTML. As such it is hard to retrieve the result of a parameter and reuse it elsewhere. Traditionally, we use parser functions like for instance #coordinates provided by Extension:GeoData. This parser function then is executing during the parsing of all the wikitext code of a page, extracts values and puts them into a storage location where it is reachable with database functions.

Then you reuse that information every time the page is rendered.

Maybe you should use something like Extension:Page Forms to store and retrieve your values. I suspect it will have some hooks that will allow you to retrieve the data in a hook so that you can add head items etc.

Ciencia Al Poder (talkcontribs)
Headshaker1 (talkcontribs)

Thank you! I'll try to solve it one of these ways

Reply to "Meta tags in skin from MediaWiki template"