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, Wikimedia Developer Support, Q&A, mwusers (unofficial forum) 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".
Markdhenning (talkcontribs)

We came across an interesting issue. When running importImages.php as root, any subdirectories created in the images directory by this process (php running as root) are owned by root and use its umask. This is as it should be... however, if someone tries to upload an image through the wiki, and the hashing algorithm collides with a subdirectory created by root, it, of course, cannot import the image.

I have tried using

runuser -l apache -c "php importImages.php /tmp/toload" but this fails with the message

This account is currently not available (as it should. no one can log in as the apache user for security reasons).

I have considered making an extension "Upload Image Folder" that would essentially do the same thing, but under the apache thread, but before I go to that effort, is there something I am missing about running the existing maintenance script and having the subdirectories created as apache:apache instead of root:root?

Thank you in advance for your advice

Cordially,

Mark D Henning.

Ciencia Al Poder (talkcontribs)

you should use the sudo command with the user that should own those files

sudo -u apache php importImages.php /tmp/toload
Reply to "linux importImages.php catch-22 issue"
62.156.251.130 (talkcontribs)

Hello,

can someone help me to find out how I can reset my password and user name? My company´s profile needs to be updated and no one here knows the user name or the email which which the content was created. Can someone please help?

Thanks a lot!

Julia

Ciencia Al Poder (talkcontribs)

Help:Logging in#What if I forget the password or username?

Reply to "Forgot password and user name"
Bttfvgo (talkcontribs)

I was testing a Gadget I used to use (jCarousel) and I noticed it only works half the time. (I'm on Vector). Chrome debug console gives me the following errors:

This page is using the deprecated ResourceLoader module "jquery.ui.core". Please use "mediawiki.ui.button" or "oojs-ui" instead. This page is using the deprecated ResourceLoader module "jquery.ui.widget". This page is using the deprecated ResourceLoader module "jquery.ui.position".

In that vein, I've noticed that all of my Javascript is acting funny. My drop down menus don't work, search suggestions don't work, basically anything involving Javascript only works half the time now. Is there something I can change to get them to start working? These errors are being shown on every page. Thank you!

Malyacko (talkcontribs)

Yes: What the message says: Please use "mediawiki.ui.button" or "oojs-ui" instead.

ResourceLoader/Migration guide (users)

Bawolff (talkcontribs)

While you should upgrade your dependencies, its likely the js "half-working" is caused by something else.

Bttfvgo (talkcontribs)

How can I go about that? I've ran update.php and composer update. Is there another place I can run composer update and do I have to do it on each extension? Thanks!

Bttfvgo (talkcontribs)

I've been looking though various files and haven't found anything useful. I do see that those modules aren't in my Resources director (like other jquery modules) so I know that's the problem. But I'm unsure of how to remove those references to them. I checked Wikivoyage (where they also use jCarousel) and they have the same problem - yet their carousel still works. So I'm sure the problem is somewhere else, I just don't know where. I do really really love this software and I'm willing to learn!

UPDATE: Found them all in /public_html/resources/lib/jquery.ui/ but don't know what to do with them.

Bttfvgo (talkcontribs)

Could it be a java problem? When I type "java -version" I get the following: Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object

Malyacko (talkcontribs)

Please explain why you think of random languages not used in MediaWiki (like Java) when asking if this could be a Java problem. There must have been a thought process that you have not shared.

Bttfvgo (talkcontribs)

I figured Java - Javascript. You know.

Bttfvgo (talkcontribs)

I also receive the following (additional) error on the Main Page: Uncaught TypeError: $.debounce is not a function

Bawolff (talkcontribs)

I don't mean those types of dependencies, I mean the dependencies written into the script.

Uncaught TypeError: $.debounce is not a function

is highly likely related to the issues you are seeing (Likely caused by dependency jquery.throttle-debounce not being declared correctly, with it sometimes being loaded in wrong order).

Bttfvgo (talkcontribs)

I finally just moved my hosting from shared hosting to VPS. It has been a chore to get right but everything seems to be running great again. I was able to install JDK so I don't have to worry about that anymore. I did need to update Java on my device. It had been reminding me for awhile. It hasn't given me a problem since. It still displays the errors but only if you go into Chrome's Developer Tools. Everything works good now, though, so I'm not going to complain! @Bawolff, you mention dependencies being declared in the wrong order. Do they load in the order in which the extension calling for them is listed in LocalSettings.php? I only ask because I decided to organize my settings file by alphabetizing all of the extensions. I did make notes throughout as certain extensions (like Scribunto, Syntax Highlighter, and Visual Editor) do say that items needed to be listed in a certain order. In that case I changed the order of the extension attribute declarations (like $wgScribuntoUseGeSHi = true; and $wgScribuntoUseCodeEditor = true;). For some reason I feel I'm doing it wrong but I'm not complaining! It works again! Yea!

Reply to "Javascript is sketchy"
Summary by Bttfvgo

Pay attention to charsets when dumping and restoring a database! And just because mysql status states that everything is in "latin1", it might not be. Don't change it if you don't have to! Also, make sure if you import the dump in utf8 you don't have default charset set to binary in LocalSettings.php.

Bttfvgo (talkcontribs)

Hi! I have MySQL 5.7.20 and I think I messed up terribly. I noticed my database was in latin1 and so I followed the instructions on this page (http://tlug.dnho.net/?q=node/276) to change it into utf8. Well that didn't work. And now half of my information is gone! I've tried restoring multiple times and even reversing the steps. Is the info gone for good or can I get it back!?

Ciencia Al Poder (talkcontribs)

If you have the original SQL script, that's your backup and restoring it should work, but the --default-character-set=latin1 --skip-set-charset options may skip some importan information from the original database. If the original data was really latin1, importin it with --default-character-set=latin1 should work. However, I doubt MediaWiki would use latin1 for database even in the more older versions. Maybe it wasn't in latin1 at all, or even if the database default was latin1, tables were created as utf8 (the charset can be specified for each table).

If you made any modification to MediaWiki configuration like Manual:$wgDBTableOptions you'll need to restore them as well.

Bttfvgo (talkcontribs)

Hi sir! Here's what happened... everything was listed as latin1 using $mysql status. So I did what the page said, $mysqldump -u root -p --opt --default-character-set=latin1 --skip-set-charset  DBNAME > DBNAME" Then I did $sed  -e 's/latin1/utf8/g' -i ./DBNAME.sql. I could not create the database like it said because it said it already existed. So I followed the last step. $mysql -p --default-character-set=utf8  DBNAME < DBNAME.sql. I was editing the wiki like normal but noticed it seemed like I was creating pages I already had. I figured I better check the site stats. Half of my pages, users, and multimedia files were missing!

So I tried to reverse the second step, using $sed -e 's/utf8/latin1/g' -i ./DBNAME.sql, and the third, $mysql -p --default-character-set=latin1 DBNAME < DBNAME.sql. That didn't work. That's when I wrote here.

I kept trying things and nothing would work. I dumped the databases, couldn't log back on, finally would up having to purge mysql and reinstall it... twice. Then I remembered I used automysqlbackup earlier in the day based on the steps found on Manual:Backing up a wiki#Automysqlbackup. It was extremely rough but I was finally able to get the file sourced. But it yielded the same results - half of my pages are still missing! And now, even though I finally got the site working again, I'm getting backtrace errors saying that tables that exist do not.

I don't know what I can do. I'm somewhat heartbroken and distraught. I checked one of the tables (user_id) and there are a lot less rows than there were users. Does this really mean all of my information is gone... for good? Please, sir, tell me I can recover everything!

I just checked - I have 4 backups and 1 of them is several hundred megabytes larger that the other 3. I assume the larger one is the one I need to focus on? I had made a "dump.xml" file but I tried to import it and now it's empty (went from 370 MB to 0). Sigh.

Ciencia Al Poder (talkcontribs)

The mysqldump from the page you linked, should export the entire database, and the number of rows of the user table should be the same. You should check if, when importing the dump, there's any error when inserting rows to the tables (which may happen if the character set is wrong.

As I said, every table can have a different character set than the default character set of the database (which applies only when creating new tables if you don't specify a character set for them). Hopefully the data may be OK, but the table definition/default charset not, and fixing it may give you to the previous state, if the shell hasn't done weird things with it (look at this). I suggest you posting this problem on a mysql related forum, since that's probably just mysql related and it doesn't necessarily need MediaWiki knowledge, mysql experts can give you better advice.

Bttfvgo (talkcontribs)

Thank you sir. After a plethora of problems and obstacles I was finally able to integrate the backup that automysqlbackup created. It was a blessing seeing everything come back!!

PHP deprecated error after adding Lockdown extension

7
141.211.32.5 (talkcontribs)

I'm trying to force users to login to view special pages and recent changes. I added the Lockdown extension directory to /w/extensions/Lockdown. I then added these lines to my LocalSettings.php file.

require_once "$IP/extensions/Lockdown/Lockdown.php";
$wgSpecialPageLockdown['Export'] = array('user');
$wgSpecialPageLockdown['Recentchanges'] = array('user');
$wgSpecialPageLockdown['Specialpages'] = array('user');
$wgSpecialPageLockdown['Recentchangeslinked'] = array('user');

When I go to my wiki and click special pages I get a "500 - Internal server error". When I log in I'm able to go to special pages. I checked my error log and it says

[error] [dddf1fc1ccccd7df34f2ec09] /index.php?title=Special:SpecialPages   ErrorException from line 309 of C:\inetpub\wwwroot\TestWiki\w\includes\debug\MWDebug.php: PHP Deprecated: Use of User::makeGroupLinkWiki was deprecated in MediaWiki 1.29. [Called from array_map in (internal function)]

This did work in MediaWiki 1.26.

I'm now using 1.30 that was a fresh install not an upgrade. I'm also using PHP 7 and MySQL 5.7.

MarkAHershberger (talkcontribs)

Thanks for reporting this. I've created a phabricator task: T185105

141.211.32.5 (talkcontribs)

Thank you for the reply.

If I go back to 1.29 will this issue still occur? I have to demo it to some people in the next day or so. I doubt a fix will be made by then.

2001:16B8:1063:2D00:9C54:46CF:CEB7:838B (talkcontribs)

MediaWiki downgrades are not supported. You can disable output of PHP deprecated messages by adjusting the error_reporting setting of PHP.

MarkAHershberger (talkcontribs)

I've uploaded a fix. I think, though, that there must be another problem. A deprecation should not be fatal. Are there any other errors in your log?

141.211.32.5 (talkcontribs)

I cleared my log and clicked on the "Special Pages" link without being logged in. I checked the log for "[error]" and it found only one row with the same error message I posted before except the key is different.

There is this line which says it's an http error. Would this cause this issue?

[http] Error fetching URL: SSL certificate problem: unable to get local issuer certificate

How do I apply the fix you uploaded? Is there a file to replace? Thank you

MarkAHershberger (talkcontribs)

It is possible that the error you see is causing the problem, but I don't know enough to tell you.

If you click the link for my fix, you'll see a download link near the upper right. Click it and you'll see an option to get a tgz archive in the lower left archive of the box that appears.

This will provide you with a replacement for the lockdown extension for you to use.

Reply to "PHP deprecated error after adding Lockdown extension"
Jiajim (talkcontribs)

Hi,

Using the LDAP extension. Do you have to allow local account creation? In other words can everthing just be based on Active Directory or doe the user have to have an account in the Wiki database?

MarkAHershberger (talkcontribs)

Accounts can be created automatically. Options for creating accounts automatically.

Reply to "LDAP Authetication question"
PSIDWiki (talkcontribs)

Hello,

I had a huge requirement change so I had to start my site all over with the following software versions:

-Python 3.4 64-bit

-MySql 5.7.21 64-bit

-PHP 7.0.21

-MediaWiki 1.30

I create 2 accounts with the option to send the user the temporary password, but neither email account has received anything. In LocalSettings.php I have the following:

$wgEnableEmail = True;

$wgEnableUserEmail = True; # UPO

$wgEmailAuthentication = True;

$wgSMTP = array(

'host'     => "smtp.com", // could also be an IP address. Where the SMTP server is located

'IDHost'   => "tempsite.com",      // Generally this will be the domain name of your website (aka mywiki.org)

'port'     => 25,                 // Port to use when connecting to the SMTP server

'auth'     => True,               // Should we use SMTP authentication (true or false)

'username' => "SMTPUser",     // Username to use for SMTP authentication (if being used)

'password' => "SMTPPassword"       // Password to use for SMTP authentication (if being used)

);

I'm not sure how to test it other then to create more accounts.

Ciencia Al Poder (talkcontribs)

Once an account is created, if it has a configured mail, you can request a new password by email

141.211.32.5 (talkcontribs)

How is it possible to request a new password?

MarkAHershberger (talkcontribs)

What if I forget the password or username?

Reply to "How to test email function"
Krayfishkarl (talkcontribs)

I've been getting some complaints from the users of my site about error messages regarding account creation. Specifically, when trying to create an account, they get "Forbidden. Please submit form again. " or a variant that says "You submitted too quickly." I tested this out myself and it's been fairly inconsistent. Sometimes, I'm able to create an account after one try, but other times I can't at all after five or more tries.

After doing some digging, I found that temporarily disabling CleanTalk (from the Antispam plugin) allows one to register their account with no further hindrances. I don't quite understand why CleanTalk has to do it with it though because to my knowledge, a different error message regarding blacklisting appears if a spambot tries to register. However, I am hesitant to turn CleanTalk off in the long term because it actually does its job really well at blocking spam. It blocks about 300 - 400 attacks per week with only one or two misses every now and then.

I haven't been able to find any other topics regarding similar issues, so I was wondering what I could do to be able to fix this.

MarkAHershberger (talkcontribs)

It sounds like CleanTalk is taking too long to update or erroring out. What do the logs of your site say when there is a problem?

Reply to "Forbidden. Please submit form again."

Is it possible to set some pages to update later?

4
Banaticus (talkcontribs)

We have some changes to some pages on our wiki that we'd like to push out later, but they can't go live yet. Is there some sort of delayed update extension?

Fokebox (talkcontribs)

May be you can make some template for such reasons

Banaticus (talkcontribs)

Well, we could create template X, Y, Z, and then edit pages a, b, c to add those templates, but we want to actually edit the pages so that it's shown in the page edit history.

MarkAHershberger (talkcontribs)

Currently, you would have to write a bot to do this. If you're interested pywikibot will be a good place to start.

Reply to "Is it possible to set some pages to update later?"

Is licensing notice required for third-party websites using MediaWiki?

4
George Ho (talkcontribs)

I went to https://en.pornopedia.com/wiki and could not find the terms "GNU", "General Public", "GPL" or anything related. Is licensing notice of the GNU General Public License required for certain third-party sites using MediaWiki? If so, whom can I contact about this?

Malyacko (talkcontribs)

The content of the GPL itself should tell you whether a licensing notice is required. Whether that's for MediaWiki or any other software under GPL. How does "certain sites" make sense here?

George Ho (talkcontribs)

Well... The legal codes of ver 2 and of ver 3 are very long, so I don't know whether a notice is required. As for "certain sites", well... I should have said "third-party" sites earlier for clarity.

MarkAHershberger (talkcontribs)

I have never heard of a requirement to notify users of a website what software licenses you are using. As far as I know, there is no requirement that says you have to say "we use MediaWiki" if you use it on your site.

The classic 4-clause BSD license (not used much any more) does require some notification, but that was deemed to be too onerous.

Reply to "Is licensing notice required for third-party websites using MediaWiki?"