Project:Support desk

Jump to: navigation, search

About this board

vde   Welcome to MediaWiki.org'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".
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
Zaksquatch (talkcontribs)

Hello there, I'm having a little difficulty in figuring this out. Say I have the example template:

{{Summary 
|image            = enter the link to an image here (just the url) 
|factioncolor     = enter the color for the faction (e.g. #598CBF) 
|status           = enter status
}}

The actual code looking something like this:

<table class="table" id="plane_summary_table" style="margin-bottom: auto;">

<tr style="text-align: left; vertical-align: middle;">

<td style="vertical-align: middle">Status</td>

<td style="color: {{{factioncolor}}}; font-size: 75%;"><pic src="{{{image}}}" width=64 align=left caption="{{{status}}}" /></td/>

</tr>

</table>

When I do it this way, it just displays a broken image with the text {{{status}}} in the correct color and text size. I did some research and saw that some people had luck with $wgRawHtml and the #tag:html parser function, but I can't get the image and status text to display for the life of me.

Any ideas?

Ciencia Al Poder (talkcontribs)

<pic> is nothing... maybe you mean to use <img>?

Please read all the warnings described in Manual:$wgRawHtml before enabling that feature, and ask yourself if it's not better to tell your users to upload images directly to your wiki, so they can be embedded without being exposed to such a risk.

Zaksquatch (talkcontribs)

I apologize, <pic> is part of the AdaptiveThumb extension. (Extension:AdaptiveThumb) I've tried it with <img> and had no luck.

As I'm the only person (only user as well) on the wiki, I've reviewed the risks. Thank you for the warning however. :)

Ciencia Al Poder (talkcontribs)

You say it just displays a broken image. So apparently the wiki is rendering an img tag. Can you right-click on the broken image and see if the URL points to the right URL?

Also, some servers disable hotlinking of images from external websites, so maybe the server where the image is hosted detects this and blocks the image when used from your wiki.

Zaksquatch (talkcontribs)

The image is hosted on my domain, just in a location outside of the wiki. (http://www.test.com/images/image.jpg)

When I look at the "location" of the image (such as open image in new tab) it displays http://wiki.test.com/%7B%7B%7Bimage%7D%7D%7D, with {{{image}}} being the name of the variable. This loads up in a wiki page saying that the resource doesn't exist. I'll try a few more things when I get home, but this is where I am at the given time.

Reply to "Template variables in HTML"
TaxDetective (talkcontribs)

I am retiring, and I want to delete my account from your system. How do I do that?

This comment was hidden by 87.123.33.203 (history)
This comment was hidden by 87.123.33.203 (history)
87.123.33.203 (talkcontribs)

On Wikimedia Foundation Wikis, youcan have your account renamed.

On other wikis, there might be a way to actually remove it (e.g. using the UserMerge extension). An administrator of the according wiki then has to do that.

Reply to "How do I delete my account?"
92.75.147.2 (talkcontribs)

Hey everyone,

I have a wiki for a project which runs already for 2 years (www.olliw.eu/storm32bgc-wiki/), but the project has progressed now to a point where I want to split into an "old" and "new" wiki. That is, I want to keep the current wiki available, but want the new wiki to be at the same place where the current one currently is. I'm not sure how to do that best, or what my options actually are.

What I did so far is to copy the wiki to the url www.olliw.eu/storm32bgc-v1-wiki, which should become the "old" wiki. However, the entries of both wikis are "linked" since they access the same data base. I could now

(a) copy the database into another one and make the "old" wiki and "new" wikis using these different databases.

(b) stick with one database, but copy each page and rename it e.g. into "page name - old".

I'm afraid I don't fully understand the side effects of each approach.

What would you do?

Are there other/better approaches?

Thx in advance, Olli

Ciencia Al Poder (talkcontribs)

Are you really sure you want to split content so when you update one page, the same page on the other wiki is not changed? I can't imagine any circumstance under which this approach would be desirable.

Can you better explain what are your needs?

87.123.11.103 (talkcontribs)

If I got you right, then what you re doing is moving a wiki. Just follow the manual to complete this task, e.g. you will have to copy the database and adjust the database credentials in the LocalSettings.php file of one of the wikis to point to this other database. After that, both wikis will start showing different content, if one of them got edited while the other did not.

Your idea (b), copying each page inside the same database is possible as well. I think I would do that in the database directly, by copying all records of the pages table and - in that process - for the new entries to add " - old" behind the page name. That should work, but the result will be that you have the according, ugly page names.

What do you want to achieve?

132.230.81.22 (talkcontribs)

THX for the quick replies, much appreciated

@Cienca Al Poder: yes, I want the old wiki to stay intact as it is, without further changing it. I simply want the users of the "old" project to still find the info relevant to them.

@8712311103: that's a good suggestion, from a quick read this looks like what I should do. My concern with (b) is that I not only would have to copy manually all pages but probably would also have to correct all internal links/references to the new names, sounds like painful work. Moving the wiki sounds much easier. I guess I still could rename the pages if I wanted to, but leave redirects behind.

THX

87.123.33.203 (talkcontribs)

Hmm, you would have to test it, but in my head it's working like so:

From the page table, take all those entries that you want (maybe only those from certain namespaces like only those from the article and article talk namespace?) and add new rows for them. You have to take care that inside the page_title column you have to use underscores instead of spaces in the page names. So it would be "Page_1_-_old".

Afterwards, you should run the maintenance script rebuildall.php to rebuild link tables and the searchindex.

92.75.147.2 (talkcontribs)

thx so much for all your ideas

I did now the "move wiki" type of thing. I.e. I duplicated the database into another database, copied the wiki folder to a new folder, and changed the db entries in the LocalSettings.php. Works nicely.

Duplicating the db wasn't as easy as in the description, since even zipped it was too big for phpMyAdmin, BigDump looked suspicious, and I have no cmdline. However, mysqlDumper worked fantastically! I guess this program could be worth to be added to the "moving-wiki" manual, and probably also to the "backup database" entry. (I'm not related to mysqlDumper, I just really find it very useful).

Thx to all for these quick and helpful responses. :)

Where to find the real name of the user groups? Also, where are the mediawiki pages?

17
Innosflew (talkcontribs)

Where can I find the real name of the user groups? (Meaning, like how the true name of "Administrators" is "sysop") Especially the ones that came with extensions? I made a new user group and I want it to be able to promote/demote specific user groups, but I can't find the true name of the user groups, and I can't use the fake name that is displayed on my wiki.

Also, I want to know where can I find all of the Mediawiki pages that are hidden by default? (Meaning, like for example "MediaWiki:Mainpage") I want to be able to rename every element on my wiki.

Please help.

87.123.23.242 (talkcontribs)

Run one of these SQL queries on your database:

SELECT DISTINCT CONVERT(`ug_group` USING utf8) FROM `user_groups`;
SELECT DISTINCT `ug_group` FROM `user_groups`;

They will return a list of all user groups, which are assigned to at least one user currently.

You can get a list of all wiki pges on the wiki page Special:AllPages in your wiki.

Innosflew (talkcontribs)

I can't get the "mediawiki:" pages display on the "Special:AllPages" unless I've modified each of them at least once.

TheDJ (talkcontribs)

MediaWiki pages are special. You can view all of them (changed or unchanged) by going to Special:AllMessages

Innosflew (talkcontribs)

Thank you! That's perfect!

Innosflew (talkcontribs)

Also, I've run these SQL queries in my database and it doesn't seem to display every user group that I have. It only displays 7 from about 16 user groups.

Innosflew (talkcontribs)

I was able to find the real names all of the user groups using SQL queries after I promoted myself on the wiki to all the user groups.

Ciencia Al Poder (talkcontribs)

Special:ListUsers has a drop down that lists all groups

Innosflew (talkcontribs)

Btw how can I remove non-default user groups that were added by extensions? I tried the following code but it didn't worked:

unset( $wgGroupPermissions['user group'] );
unset( $wgRevokePermissions['user group'] );
unset( $wgAddGroups['user group'] );
unset( $wgRemoveGroups['user group'] );
unset( $wgGroupsAddToSelf['user group'] );
unset( $wgGroupsRemoveFromSelf['user group'] );
87.123.11.103 (talkcontribs)

It depends:

If you want to remove them from pages, e.g. from the set user rights page, then the lines of PHP code, which you quoted above, should help. Note that spaces inside user group names might be a problem. I think user group names have, if at all, underscores in them.

If you in fact want to remove the groups from user accounts, then you can basically do that on the user rights page. If the group is no longer shown there, you can modify the user_groups table accordingly:

DELETE FROM `user_groups` WHERE `ug_group` = "staff";

This remove the group "staff" from all members. Note that this kind of action will not be logged inside the MediaWiki log. Also note that it will remove the group not from one single user, but from all users, who were member of it. That way, this removal will not be displayed in the MediaWiki interface. So there also is no easy way to undo it in case of mistakes!

Innosflew (talkcontribs)

So if I understand it correctly if I add your code to LocalSettings.php it will completely delete that user group from everywhere and it cannot be undone even if I delete the line from LocalSettings.php, right?

87.123.11.103 (talkcontribs)

The line

DELETE FROM `user_groups` WHERE `ug_group` = "staff";

is an SQL query. You have to run it inside the database, just like you did with the SELECT query a few posts above.

Once running this query will remove the according group from all users. Right, this cannot be undone (exept by doing some MySQL magic like rolling back the query, which depending on MySQL configuration, might be impossible).

Thi query however will not influence the selectable groups in the interface of MediaWiki. If a group still is defined in an extension, then it will show up in the according wiki pages, e.g. in the set user rights page. That is what you can influence with the PHP code (unset(...);), which you posted above.

Innosflew (talkcontribs)

Ah I see. Then deleting using SQL query is not the one I need, as I only just don't want them to display anywhere on the mediawiki interface. As you said the PHP code (unset(...);) would be a better solution in my case, but my problem is that it doesn't seem to be working when I tried to use it on the non-default extension user groups that I don't want to be displayed on my wiki anymore.

87.123.11.103 (talkcontribs)

Two things come to my mind:

  • First, make sure that you are using the unset(); stuff after the extension has been loaded and after you have configured it in LocalSettings.php. If you use these lines before, the creation of the groups in the extension will just overwrite them.
  • Second, make sure that you use the group name correctly. Spaces most likely are not part of the name and the names might be case-sensitive.
AiedailEclipsed (talkcontribs)

I'm having similar issues in trying to remove/replace some of the default groups. I've used the same PHP code (unset(...);) successfully before, but this time it is retaining any permissions set by extensions (renameuser, nuke, etc). The only thing that I can notice that is different between the two is how the extensions are called. This newer version of Mediawiki uses wfLoadExtension (...); and not require_once (...); but I'm not sure how much difference that would make.

Edit: Silly me! I'm running Mediawiki 1.26.2 on PHP 5.5.29 (cgi-fcgi) with MySQL 5.5.48-cll.

Ciencia Al Poder (talkcontribs)

Maybe the use of wfLoadExtension makes that the user groups registration comes after LocalSettings.php has been processed.

Maybe you need to run that code inside one hook that runs after wfLoadExtension and before those groups are actually used in the code

AiedailEclipsed (talkcontribs)

Unfortunately, I don't have that level of technical knowledge for Mediawiki.  :c

Reply to "Where to find the real name of the user groups? Also, where are the mediawiki pages?"
Jclementwiki (talkcontribs)

I have a question, and I'm not even sure I have the right dialogue to ask this question properly. Really, I'm looking for any ideas or suggestions.

I recognize that my question may require a paradigm shift in what we're doing or how we do it.

We are using Mediawiki as an internal knowledgebase. We have maybe 1200 pages.

So...the issue is that management is responsible for reviewing each page on a yearly basis, and either updating it, or deleting the page if it is no longer relevant.

The problem comes from not knowing which pages have been reviewed vs. which pages still need to be reviewed. We are looking for a way to do that. Clearly we would prefer to do this through the Mediawiki - if there is a special page, extension or api which will accomplish this - perfect. But if none of those options are available, can it be done directly from the MySQL DB?

Obviously 'recentchanges' doesn't work, because it goes back only 91 days. I've been searching for days, but have not found anything even remotely near what I'm trying to do - but it is possible I have overlooked it.

87.123.11.103 (talkcontribs)

MediaWiki has a special page called Special:AllPages, which lists all pages. That list however is in alphabetical order.

There is a configuration variable, I think it was called $wgRCMaxAge, which would allow you to change the number of days, which are displayed on Special:RecentChanges.

Finally there are some extensions, which allow you to review the content of pages, e.g. Extension:Approved_Revs or Extension:FlaggedRevs. That way you will have a list of pages to review and once a page has been reviewed it will no longer be listed. Note that these extensions are based on single revisions: When a page has been marked as reviewed, it is fine. But once a new page revision gets created, the page will by default be listed as "has to be reviewed" again. This might be avoided by configuring user groups rights in a way that every single user can automatically review a page, if that page already _is_ reviewed.

Jclementwiki (talkcontribs)

interesting...thank you for your reply.

So.. assuming we can set $wgRCMaxAge to 365, and use the Revs extensions, the trick here is that i would need to be able to flag all pages for review on January 1st of each year, and then let management go through it - throughout the year. Then the following Jan 1st. flag them all again.

I'm guessing that would be easier to flag all pages by direct SQL table update. (unless there is a extension for that, too.)

87.123.11.103 (talkcontribs)

A vallue of 365 for $wgRCMaxAge will make MediaWiki clear data after 6 minutes and 5 seconds - as this value is in seconds. What you want is 60*60*24*365 - whatever number that is; PHP can calculate that for you. :-)

What I thought of is this: First every page is marked for review. Then you have some users, who have the according user group rights to review pages. That way they can review a page. This review in fact only marks the current revision of that page as reviewed. If then a new revision gets created, it would by default be un-reviewed again. To fix that, I propose to give every user the right to automatically review a page, if it had been reviewed before. That way the reviewed status will be preserved also for newer revisions.

At the start of a new year, you would then have to reset that status. I don't know if the extension provides a way of doing that, but that might be doable with one single SQL query, which just switches the according fields inside the database.

Jclementwiki (talkcontribs)

lol - I was speaking days.. so the correct number is 31536000.

Actually, I have no problem if a new version is created and results in an 'un-reviewed' page, because management will then need to review the changes. I'll instruct management how - if they make a change - they can manually approve the new revision.

And then...once a year... do the SQL thing update the table...i'll look into that. Thank you so much.

87.123.11.103 (talkcontribs)

It then depends on which of the two extensions - Approved_Revs or FlaggedRevs - you choose. Actually I do not use either of them myself. I guess you also have to configure it to have the wiki always show the latest revision, no matter if it is reviewed or if it's not. As basically these extensions have been written to prevent exactly that, so that MediaWiki always by default only shows the reviewed revision. However, as far as I understood you, this is not what you want.

Jclementwiki (talkcontribs)

hrmm... I'll review the extensions tomorrow, see if I can make it work or not. Appreciate the help.

Reply to "Wiki Page Management Control?"
Sakshale (talkcontribs)

No matter what options I put on the request, recent changes only go back to March 1st. For example. this request only shows items after March 1st -- days=20.

title=Special:RecentChanges&days=60&limit=500

In the file includes/DefaultSettings.php, the settings for wgRCMaxAge appear to be correct for three months and a global egrep of all the files does not show any place where the value is changed.

$wgRCMaxAge = 13 * 7 * 24 * 3600;

Any clue where the problem might reside?

The last entry reported is a page creation.

(diff | hist) . . N Social Network Profile Notes‎; 01:45 . . (+198)‎ . . ‎Sakshale (Talk | contribs | block)‎ (Created page with "Category:User Applications == Facebook == * Background Image: 852px Wide by 315px High == Twitter == * Background Image: 1,500px Wide by 500px High * Profile Image: 4...")

87.123.48.229 (talkcontribs)

That can happen, if the RecentChanges table has been truncated. You can use the rebuildrecentchanges.php maintenance script to rebuild it.

Sakshale (talkcontribs)

It appeared to run correctly;

Loading from page and revision tables...

$wgRCMaxAge=7862400 (91 days)

Updating links and size differences...

Loading from user, page, and logging tables...

Flagging bot account edits...

Flagging auto-patrolled edits...

Deleting feed timestamps.

But, it only added patrol log entries, such as one additional line to the end;

However, the patrol log seems to imply that I have neglected this wiki a lot longer than imaginable.

Six months without an update would explain the lack of log entries.

87.123.48.229 (talkcontribs)

Yes, I think this explains it: If there was no activity, then there also won't be recent changes. :-)

Time to get this wiki to pace again! :-)

Reply to "RecentChanges limited to March 1st"

Pages with syntax highlighting errors

3
MadenssContinued (talkcontribs)

I just updated from 1.24.4. to 1.26.2 and I am having issues with Syntaxhighlight tag. The first issue is that the tag doesn't work any more. The second issue is that everywhere the tag doesn't work, there is a new category automatically added to each article Pages with syntax highlighting errors, and the third issue is that the only way to get this category to work properly and include the affected article is to open the article for editing and save it without making any changes.

I'm mostly concerned with the first issue of the tag not working. I am using the correct syntax as instructed in the

I would like to type more but the developers have gotten so clever with the text box input field I don't seem to be able to work it.

87.123.44.213 (talkcontribs)

I have not seen this issue myself. For me, syntax highlighting is working correctly. Since saving a page without making any edits to it solves the issue, it might help to clear all caches, so that MediaWiki once has to render each page newly again. This will have negative impact on performance while the cache has to be rebuilt, but purging it globally should help.

1.172.86.240 (talkcontribs)

same applies here. Tag is not working in mediawiki 1.26.2. No errors or warnings seen. I reloaded by the distributor ( no git ) but no result. Even when I force an error by supplying an non existing language, no error is generated. The tag is apparently accepted as when you add an space in the tag name, the tag text appears in your window text.

Reply to "Pages with syntax highlighting errors"

"A database query error has occurred. This may indicate a bug in the software."

5
Kanecow (talkcontribs)

I've enabled $wgShowSQLErrors = 1; in local settings to see the error and this is the message I am getting at the moment:

  • Query: SELECT rev_id,rev_page,rev_text_id,rev_timestamp,rev_comment,rev_user_text,rev_user,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,rev_content_format,rev_content_model,page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name FROM `mw_revision` INNER JOIN `mw_page` ON ((page_id = rev_page)) LEFT JOIN `mw_user` ON ((rev_user != 0) AND (user_id = rev_user)) WHERE page_namespace = '10' AND page_title = '6s_team_roster_collapsible' AND (rev_id=page_latest) LIMIT 1
  • Function: Revision::fetchFromConds
  • Error: 2006 MySQL server has gone away (localhost)

Most pages are working fine and this is only happening in some pages

87.123.63.39 (talkcontribs)

The problem is that the connection to the server has been lost. A workaround might be to check, if the connection is still there and if not then reconnect.

Anyway, really fixing this most likely needs a change in the MySQL configuration; often a very low default setting of max_allowed_packet causes the error. Raising it to e.g. 8M or 16M helps in these cases.

Kanecow (talkcontribs)

On my current mysql config I already had

max_allowed_packet = 32M

I think the connection is still there but I've noticed in my VPS control panel that the mysql server was using a somewhat abnormaly high amount of resources

http://i.imgur.com/HwXGejG.png

http://i.imgur.com/wIj21ce.png

I've recently installed some other applications on the same server (specifically a wordpress and vanilla forums installation) could this be the cause?

But I got 4 shared CPUs and 6gb ram on the VPS so it should be able to easily handle all 3 applications I assume.

Any tips on how I can solve this?

Also if this a memory or load issue with mysql why wouldnt all pages be giving this error but only some?

Kanecow (talkcontribs)

Anyway I could get some extra help with this please?

Ciencia Al Poder (talkcontribs)

If you don't want mysql to use a large amount of memory, you should configure it properly. mysql and any database server uses memory to cache data like recent queries and results to speed up common queries.

This is the official answer for the problem: http://dev.mysql.com/doc/refman/5.7/en/gone-away.html

Note that if it takes a while loading the page and then you get the error, it may be a timeout problem. Maybe the other software using mysql is using a lot of CPU and slows down the server...

Reply to ""A database query error has occurred. This may indicate a bug in the software.""

some pages can't be edited

7
Summary by Ciencia Al Poder

problem is mod_security

177.158.91.154 (talkcontribs)
MediaWiki 1.26.2
PHP 5.4.33 (cgi-fcgi)
MySQL 5.5.45-cll-lve

My wiki was just recently installed, and I imported a database to it, but a few pages are "immune" to edits. Whenever any of the 3 buttons is pressed, the page just reloads with the old, unedited article, regardless of the changes made. The following link is the only thing I have found with any similarities to my problem. Even then, I doubt the mod_security solution applies, as only a few pages of mine have the bug, not all. Regardless, if I find no better answers, I'll try it.

Manual:Errors and symptoms#Attempting to save an edit gives you a 403 Forbidden error.2C or you get redirected to the main page

Thanks for your time.

Ciencia Al Poder (talkcontribs)

well, without even a link to your wiki there's nothing more we can do...

177.158.91.154 (talkcontribs)

Sorry, I was hoping it wouldn't be needed, as my wiki deals with a parochial, insular topic that nonetheless tends to attract, shall we say, passionate detractors.

Anyway, here's one such uneditable page: thisisvideogames.com/gamergatewiki/index.php?title=Ben_Kuchera

Ciencia Al Poder (talkcontribs)

I was able to replicate the problem by editing with the web interface, when saving (even a null edit), page was just reloaded with a HTTP 301 redirect, losing the edit. That also happens when previewing or hitting "show changes". Editing using the api went fine though.

If I remove the contents of the page, preview goes through. So this is some text on the page that causes that behavior. Try removing parts of the text until you find the offending text, since that's what the errors and symptoms page describes

187.114.87.228 (talkcontribs)

Oh, I hadn't managed to get any edit to go through. On hindsight, I should have used that elimination method. Thanks.

I think I narrowed it down, the quotation mark in "having brought a lawsuit seems to be the problem. Removing it allows the edit to go through. I thought maybe that mark was some obscure symbol that looks like a quotation mark and that's why it was glitching the page. But it's a standard quotation mark; simply typing it back in that place renders the page bugged again.

In other pages I found similar conclusions. It seems that a specific sequence of characters triggers the bug, and that sequence can sometimes be modified to remove it, sometimes you have to remove more than one sequence, and so on.

So I'm confused by this glitch. For some reason, simple text is causing the bug.

Ciencia Al Poder (talkcontribs)

From my understanding, this is clearly caused by either mod_security or any other anti-spam module installed on the server, not part of MediaWiki. Ask your hosting for more information. They usually tweak or disable them on request.

187.114.87.228 (talkcontribs)

So it really came down to mod_security. Let's hope this can be solved by tweaking so I don't have to disable it.

Many thanks for your help.

83.111.219.33 (talkcontribs)

Hi,

I am using the Extension: Tabs to display some tabs and the Extension: MobileFrontend to autodetect and display mobile view.

The mobile view displays those tabs as a checklist or a radio button, where upon clicking a tickmark appears and nothing happens. Contents of all tabs gets displayed right away.

Is there someway I can get tabs in Mobile View? If not, is there any way I can just display simplified text view without checklists or radio buttons?

The link to my wiki: Medinfo. Just contains some test data for the moment.

Any help or suggestions are highly appreciated.

Thank You.

TheDJ (talkcontribs)

Tabs is not compatible with the mobile skin as far as I can tell. But it does seem to 'mostly' work. So you could just style it with CSS yourself.

Reply to "Displaying Tabs in Mobile View"