Project:Support desk

Jump to: navigation, search

About this board

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

There are also other places where to askCommunication: IRCCommunication#Chat, mailing listsMailing lists, Q&A etc.

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".
Language: English  español

Asking questions in different languages

By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL

Error: 1 cannot start a transaction within a transaction

Dbeidle (talkcontribs)

Since I updated to mediawiki-1.28.0 from mediawiki-1.26.2 yesterday, I've been getting the following error, usually when I save or preview an edited page, and occasionally when I access a page:

Original exception: [a53679567296387f8f2003e6] /~dabeidle/mediawiki-1.28.0/index.php?title=Main_Page&action=submit DBQueryError from line 1054 of /Users/dabeidle/Sites/mediawiki-1.28.0/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? Query: BEGIN Function: Database::query (MessageCache::loadFromDB(en)-big) Error: 1 cannot start a transaction within a transaction

If I resubmit the edit page, the changes are saved (usually after the 3rd attempt). On a query, reloading the page works.

One change I made from the previous version was to change the database ownership from _www:_www to my account, with corresponding changes in http.conf. This is a local, private wiki running on macOS Sierra 10.12.1, PHP 5.6.25, SQLite as a personal knowledge base so access from the Internet is not possible.

The questions I have are: "Did I encounter a regression that I need to log as a bug?" in which case I can provide more detail, or "Did I miss something (probably simple) in the upgrade or configuration?"

I followed the upgrade procedure on <>, including upgrading the SQLite3 database.

Dbeidle (talkcontribs)

I've added the following to my LocalSettings.php file in order to produce more info:

$wgShowExceptionDetails = true;
$wgDebugLogFile = "/tmp/wiki.log";
$wgDebugToolbar = true;
$wgShowDebug = true;
$wgShowSQLErrors = true;
$wgDebugDumpSql = true;
$wgShowDBErrorBacktrace = true;
error_reporting( -1 );
ini_set( 'display_errors', 1 );

A couple of quick tests didn't reproduce the error. More testing to come tomorrow.

Ciencia Al Poder (talkcontribs)

If you reproduce that consistently, try disabling extensions, and see which one is causing the problem. Probably not a missing step in upgrade or configuration.

Dbeidle (talkcontribs)

I started off by disabling all extensions (WikiEditor, SyntaxHiglight_GeSHi, Cite), restarted the Safari browser, and browsed to the main page of the wiki. I got the following error:

'''Fatal error''': Uncaught exception 'Cdb\Exception' with message 'Unable to move the new CDB file into place.' in /Users/dabeidle/Sites/mediawiki-1.28.0/vendor/wikimedia/cdb/src/Writer/DBA.php:60 Stack trace: #0 /Users/dabeidle/Sites/mediawiki-1.28.0/vendor/wikimedia/cdb/src/Writer.php(88): Cdb\Writer\DBA->close() #1 [internal function]: Cdb\Writer->__destruct() #2 {main} thrown in '''/Users/dabeidle/Sites/mediawiki-1.28.0/vendor/wikimedia/cdb/src/Writer/DBA.php''' on line '''60'''

This was an end result of:

'''Warning''': rename(/var/tmp//l10n_cache-en.cdb.tmp.508300813,/var/tmp//l10n_cache-en.cdb): Permission denied in '''/Users/dabeidle/Sites/mediawiki-1.28.0/vendor/wikimedia/cdb/src/Writer/DBA.php''' on line '''59'''

[ec3c25e62192ab4a58132440] /~dabeidle/mediawiki-1.28.0/index.php/Main_Page MWException from line 118 of /Users/dabeidle/Sites/mediawiki-1.28.0/includes/cache/localisation/LCStoreCDB.php: Unable to move the new CDB file into place.

I noticed that the tmp file in question had an ownership of dabeidle:wheel instead of dabeidle:staff. I'll try removing the tmp file, and then retry the test.

Dbeidle (talkcontribs)

Removing the one /var/tmp file did not help. Failure repeatable. However, when I terminated the browser, deleted everything in /var/tmp, restarted the browser, and browsed to my main page it loaded this time. Testing continues. Will repeat the simple main page load test a couple more times and then start enabling extensions one by one.

Dbeidle (talkcontribs)

Clearing out /var/tmp/* and disabling extensions helped a lot in reducing the occurrence of "cannot start a transaction within a transaction" errors (only saw one while navigating the wiki so far).

I use three of the bundled extensions: WikiEditor, SyntaxHighlight_GeSHi, and Cite. When I enable any one of these three extensions, the occurrence of "cannot start a transaction within a transaction" increases. Reloading the page after such an error usually works in displaying the page. Note: I use the versions distributed with media wiki, I do not use the versions from prior releases.

We can set up a screen sharing session if it'd help.

Dbeidle (talkcontribs)

Not sure if this matters... After I enabled both the Cite and SyntaxHighlight_GeSHi extensions, both Chrome and Safari browsers get a "cannot start a transaction within a transaction" fairly quickly. However, I haven't been able to reproduce the error (yet) on Firefox. Makes one go "Hmmm!"

After enabling the WikiEditor extension and editing s page several times I manage to reproduce the "cannot start a transaction within a transactions" failure consistently on Firefox now.

Ciencia Al Poder (talkcontribs)

I though our MediaWiki continuous integration tests were run on sqlite, but no, devs confirmed they're run on mysql, so a regression may be introduced recently for sqlite, which went unnoticed.

On task T88312 Aaron suggest using CDB files for localization cache on sqlite, which may be the problem in this case.

For that, according to $wgLocalisationCacheConf, be sure you've set $wgCacheDirectory to a writable directory.

Dbeidle (talkcontribs)

Uncommented $wgCacheDirectory = "$IP/cache"; in LocalSettings.php. Firefox seems a bit better (will do more testing and with other browsers). At least it's not leaving a whole bunch of "lessphp_*.lesscache" files in the /var/tmp or cache directories.

Now if I can only get back the sort arrows in my sortable table - they show up occasionally; but mostly not. Showed up under Chrome 55.0.2883.87, but not Firefox 50.0.2 or Safari 10.0.1.

Nope, still getting the "cannot start a transaction with a transaction" failure on Firefox when I edit a page. Reloading (resubmitting) the page shows that the changes were saved.

Reply to "Error: 1 cannot start a transaction within a transaction"
Manorainjan (talkcontribs)

In help page Interlanguage links I'm missing information on how to create Interlanguage links on user pages. I somehow found out, that it is possible to link to ones other accounts on other laguage projects like this: From my main account on de.wikipedia to en.wikipedia: [[en:User:Manorainjan]], but [[wikitech:User:Manorainjan]] does not work. So my request is, to describe this on the help page for use within the wikipedia/wikimedia family of wikis or link to such description if available.

Ciencia Al Poder (talkcontribs)

Interlanguage links on the sidebar only works for language prefix, not others (otherwise they'll be "interproject" links, not "interlanguage")

Manorainjan (talkcontribs)

Is there any other way to create "interproject" links for user pages?

Reply to "Interlanguage Links on User: pages"
Azot944 (talkcontribs)


How can i change original registration link in navigation bar?

Ciencia Al Poder (talkcontribs)

You can implement the PersonalUrls hook to change the createaccount link

Reply to "Custom registration link"
Bachounda (talkcontribs)

Hi, I had this error on different pages of my wiki project

like  :

Lua error in package.lua at line 80: module `Module:Pagetype/config' not found. Backtrace: (tail call): ? [C]: in function "error" package.lua:80: in function "load" package.lua:99: ? (tail call): ? (tail call): ? mw.lua:803: in function "loadData" وحدة:Pagetype:13: in function "init" package.lua:103: in function "require" وحدة:Portal:13: in main chunk (tail call): ? (tail call): ? [C]: in function "xpcall" MWServer.lua:87: in function "handleCall" MWServer.lua:301: in function "dispatch" MWServer.lua:40: in function "execute" mw_main.lua:7: in main chunk [C]: ?

need solution

AhmadF.Cheema (talkcontribs)

What is your Extension:Scribunto version and MediaWiki version?

Also, have you imported any templates/modules from other wikis like Wikipedia etc.

Bachounda (talkcontribs)

the version of my scribunto is 1.23 and mediawiki is 1.23 yes i have imported navbox template

Bachounda (talkcontribs)

hello @AhmadF.Cheema anny idea ?

AhmadF.Cheema (talkcontribs)

Sorry for the late reply, did not have any ideas before.

Can you confirm the page Module:Pagetype/config exists on your Wiki?

Also, how exactly did you import the navbox template? Did you import just the single navbox template page or did you also import the other templates/modules used on that page? In other words, did you check the "Include templates" option at

Bachounda (talkcontribs)

Hi @AhmadF.Cheema, Problem resolved because vesion of wiki installed is old the solution is to use the same script copied from wikipedia during 2014 in accordance with the last date of 1.23 update

Thanks you very much

Reply to "Script Error" (talkcontribs)

When I run php maintenance/rebuildFileCache.php, I'm getting Database is read-only: Building cache error even though I haven't put the database to read only with $wgReadOnly and editing is working without any issue. But I'm not able to rebuild file cache with this script.

What would be the cause to get Database is read-only: Building cache error?

Zppix (talkcontribs)

Does mysql have access to php and vise versa

Reply to "rebuildFileCache.php not working" (talkcontribs)

I've been having trouble adding the Math extension that seems to have to do with not being able to run update.php. I get the error:

DB connection error: Connection refused (

Any clue on how to fix this? I'm running on MediaWiki 1.27.1-1 PHP 5.6.25 Thanks

Zppix (talkcontribs)

Does php and mysql have access to each other? Also could navigate to YOURURL.tld(/wiki)/Special:Version

Reply to "Error using update.php"

Moved server: now can't upload files

Chris huh (talkcontribs)

I've moved my Mediawiki installation to another server and I'm now unable to upload files. Looking in the error_log I see a single line for each upload attempt:

[07-Dec-2016 13:25:23 UTC] PHP Fatal error: Call to undefined function iconv() in /home/username/public_html/wiki/includes/media/IPTC.php on line 449

Perhaps iconv isn't enabled on this server. How can I turn this on? Would it be through a php.ini file? Is there a way to confirm that iconv isn't enabled?


Ciencia Al Poder (talkcontribs)

You may need to install the php-iconv package

Chris huh (talkcontribs)

Thanks Ciencia, it turned out the image I was trying to upload was corrupt. I resaved the image and it worked fine.

Retrieving JSON with thumbnails for Category members

4 (talkcontribs)

How to retrieve json response of category member with thumbnail url in it. I have more than 100 items in category members .

What query shall i use in the url for retrieving thumbnails for each and every category members in the list(more than 100 items) for JSON response of the category member.

I tried using "prop=pageimages" query parameter but I'm able to retrieve only 50 max objects in JSON containing thumbnails url in it. What is the alternative to receive thumbnail for every members as they all have images in the page too added in the correct format.

Example url i used:

Its a url to show example above, not a real live url to check

Please help me sort it ASAP.

Thank You,


Ciencia Al Poder (talkcontribs)

If there are more results than your limit, what you should do is using the continue parameter to do another request that will give you the remaining results (talkcontribs)

how shall I do that? Could you help me in the url

Ciencia Al Poder (talkcontribs)

See API:Query#Continuing_queries. Your url is not a live wiki so I can't really help with that example

Reply to "Retrieving JSON with thumbnails for Category members"

Search results and other links are downloaded instead of being rendered

Stefanomenci (talkcontribs)

Our company wiki has been working for years and has been updated to 1.26.3 a few months ago without problems. A few weeks ago it started downloading some pages instead of rendering them.

If the search term does not match the title of a page, the search result page is shown and clicking on one of the search result items works well.

If the search term matches the title of a page, pressing enter or clicking on the page title shown at the top of the list, downloads the page instead of showing it. Clicking on the Containing... link below the page name, then the search result page is shown and everything works well.

Clicking the Save page button after editing a page, the page will be downloaded. Canceling the download and clicking the Read link shows the page with the last editing properly saved.

The downloaded file is called index.php, it starts with the following text and has some binary data after that (I assume that's the compressed page content). I don't understand why there are the first two lines:

 HTTP/1.1 200 OK
 Server: nginx/1.10.2
 Date: Mon, 05 Dec 2016 17:16:45 GMT
 Content-Type: text/html; charset=UTF-8
 Transfer-Encoding: chunked
 Connection: keep-alive
 X-Content-Type-Options: nosniff
 Content-language: en
 X-UA-Compatible: IE=Edge
 Vary: Accept-Encoding,Cookie
 Expires: Thu, 01 Jan 1970 00:00:00 GMT
 Cache-Control: private, must-revalidate, max-age=0
 Content-Encoding: gzip
 Last-Modified: Mon, 05 Dec 2016 17:16:44 GMT

Here is the versions:

Product Version
MediaWiki 1.26.3
PHP 5.5.38 (cgi-fcgi)
MySQL 5.5.51-38.2
ICU 4.2.1
AKlapper (WMF) (talkcontribs)

Unrelated to your problem, but 1.26 is an old unsupported version without any security updates. Please strongly consider upgrading: Download.

Stefanomenci (talkcontribs)

Some more details:

  • The problem reproduces when a link causes a redirect. For example clicking on the Random page link it does reproduce because it redirects to another page
  • The problem reproduces 90-95% of the times, not 100%
Ciencia Al Poder (talkcontribs)

This looks like a misconfiguration on the server, but try $wgDisableOutputCompression

Stefanomenci (talkcontribs)

Yesterday we just found out that the problem disappears after uninstalling BitDefender (disabling is not enough).

And now, thanks to you, I found out that disabling the compression the problem disappears, even if BitDefender is installed.

So we have a workaround while we try to understand why BitDefender causes the problem.

Thanks, Stefano

Ali Alçı (talkcontribs)

Merhaba. Function model sayfasını İngilizceden Türkçeye çevrirken format bozuldu ve paragraflar olması gereken yerde çıkmamaya başladı. Bazı paragraflar kayboldu. Bir resim olmaması gerekirken iki defa çeviri bölümüne yapıştı kaldı. Silemedim ve düzeltemedim. Lütfen birisi ya formatı düzeltebilir yahut çeviriyi komple silebilir mi? Ben bu sayfanın çevirisini tamamlayarak yayınlamak istiyorum.

AKlapper (WMF) (talkcontribs)

Where to find the "Function model" and "this page"?

Reply to "Çeviri yaparken formatın bozulması"