Jump to content

Project:Support desk/Flow/2018/03

Add topic
From mediawiki.org
Latest comment: 1 year ago by Ciencia Al Poder in topic New version of Image is not showing
This page is an archive.
Please ask questions on the current support desk.


Images upload but won't display

I'm running MediaWiki 1.30.0 on a remote server which uses a platform called Fusion Forge. The PHP version is 5.6.33-0+deb8ul.  The mysql version is 5.5.59-0+deb8ul (Debian).  URL of the wiki is https://comun.ourproject.org/en/w/

It is a new installation, about 3 weeks old.

Everything is working fine, as far as I know, except one thing:

Images.  They upload OK.  But the directory permissions get set so that the file is unreadable to anyone but the system administrator.  So the files are there but can't be displayed.

Example:  I just uploaded a file callled CBGB_club_facade.jpg.  A subdirectory of /images/ was created: /images/d/da/ .

The file is there: /images/d/da/CBGB_club_facade.jpg .  But the file permissions of /images/d/  are:

drwx--S---

In other words, system administrator can read, write and execute, but no one else can get into the directory.  So the image does not display.

The file permissions of the image itself are:

-rw-r--r--

So everybody, admin, group and others, have read permissions here and could presumably read the file if they could get into the directory but they can't.

If I change the directory permissions manually, by logging onto the server and using the shell program, the file would become viewable.  I have done this with several files already, e.g., File:Simple_surplus_value_model.png ( https://comun.ourproject.org/en/w/index.php?title=File:Simple_surplus_value_model.png ).  This solves the problem, sort of, but is obviously too labourious to be used as a general method.

I have set the permissions of the  /images/  directory itself to be maximally permissive:

drwsrwsrwx

So I don't think the new subdirectories are just inheriting restrictive permissions from the parent directory, /images/ .

The permissions of the root directory of the wiki ( htdocs/en/w/ ) are:

drwxrwsr-x

So I don't think they're inheriting restrictive permissions from there, either.

Where do the new subdirectories get their permissions from?

How can I get the permissions to be set properly when a file is uploaded? Communpedia Tribal (talk) 01:55, 1 March 2018 (UTC)

I do not really understand what is S permission, but I think you do not have the correct files and directories owner. Minimum require: Please make sure your webserver-user are owner of these files. Then assign rwx permissions to the directory and assign rw permissions to the file. Like there:
drwxrwx---. 24 apache      apache   4096 Feb 28 01:16 images
-rw-rw----. 1 apache apache 15233 Dec 14 14:27 images/1/15/Edit-copy_green.svg
星耀晨曦 (talk) 06:38, 1 March 2018 (UTC)
Hi, thanks for the responses so far. The S and s permissions are used to indicate the set-user-id and set-group-id bits. They are actually a combined message that indicates the set-id bit and the executable bit at the same time. Upper case S means the set-id bit is true, but executable bit (x) is not true. Lower case s means set-id true and executable true.
You wonder if I have the correct files and directories owner. I am quite sure that I do. It is the webserver-user (comproject_admin). This is the user name with which I got the account and in fact the only user which has written or changed anything in these directories.
I am including a screenshot of the shell program showing the permissions and user names of some directories and files.
<figure-inline></figure-inline>
I am starting to think that maybe the problem is as follows. Please tell me if this makes any sense:
  • When the mediawiki program is operating, it is not logged on to the host, it is just running PHP commands.
  • So when it tells the host operating system to make a new directory the operating system treats that not the same way as it would treat a mkdir command form a logged-in user. It makes the directory with more restrictive permissions.
  • So maybe the problem is in the way the host is configured?
I also have this question:
Where in the mediawiki-1.30.0 code is the command given which makes the new directory to put a newly uploaded image into? Which PHP file? Could I add a few lines of code to this to force the directory to be made with the correct permissions? Something analogous to "mkdir -m o=rx" ? Communpedia Tribal (talk) 03:54, 3 March 2018 (UTC)
You can chmod 777 -R your images directory, and if you solve your problem, this may a permission problem. If not solve, this may be caused by more complex reasons. Your should enable debug log in your LocalSettings.php to provide more detailed information. 星耀晨曦 (talk) 10:11, 3 March 2018 (UTC)
setuid and setgid special flags shouldn't be needed on a MediaWiki installations
MediaWiki runs from PHP, and depending on how it's set up, it may be run directly by the webserver (in apache with apache mod_php) or as a standalone application (when using php-fpm). You should find which users and groups are being used for running php. But be assured that every action is made by a user, in that case a process that's being run as such user.
MediaWiki installation files normally should not be owned by the same user running PHP. Ideally they should be owned by root (so PHP can't modify those files), and give read permissions to group, which should be the same user running PHP.
Upload directory should be owned by the user running PHP, and be readable by all. That allows PHP (= MediaWiki) to create/rename/delete files as it needs, and the webserver to read and serve them to users. Ciencia Al Poder (talk) 10:17, 3 March 2018 (UTC)
Hello again.
Running chmod 777 -R on the images directory made all of the existing files visible.  That is good.  However, new uploads -- that is, uploads done after I run the chmod -- are still invisible.
You said it is best if MediaWiki installation files are owned by root.  I'm not sure I can do this because I am not root.  I think root would be the administrators of the host, Ourproject.
I put echo get_current_user(); in LocalSettings.php and it tells me that the current user is comproject-admin.
I ran debug log and you can see the results at https://comun.ourproject.org/en/w/c_a_add-ons/debug_log_upload_2.txt
This is the debug log resulting from three operations:
  1. Viewing the Main Page
  2. Viewing  Special:Upload
  3. Using Special:Upload to upload a file.
Maybe you can see what is wrong by looking at that debug log.  It is somewhat mysterious to me.
But:
I have a potential work-around for the problem.  I have tested the following code in LocalSettings.php and it works:
shell_exec('chmod o+rw -R test_dir');
It changes the permissions of a test directory I made, called 'test_dir'.
All I need to do is put similar code into the MediaWiki PHP code, at the place immediately after it makes the new directories for images.  It will give them the necessary permissions.
But I don't know the place in the MediaWiki code that performs image uploads.  Can you tell me?   Communpedia Tribal (talk) 04:48, 4 March 2018 (UTC)
You should not modify the core file. But you can achieve your meets via extension or hook. In this case, you can use UploadComplete hook in your LocalSettings.php, it called when a file upload has completed. However, you should find out why the picture can't display. 星耀晨曦 (talk) 05:16, 5 March 2018 (UTC)
Thank you. I'll work on it some more. Communpedia Tribal (talk) 06:20, 5 March 2018 (UTC)
In addition, you have to remove your debug log from public web. 星耀晨曦 (talk) 07:24, 10 March 2018 (UTC)
Reason for the uppercase "S": https://unix.stackexchange.com/a/27254 Ciencia Al Poder (talk) 10:16, 1 March 2018 (UTC)
Communpedia Tribal, could you fixed this problem? How did you it? I have the same problem :/ Cyrax (talk) 06:47, 14 April 2019 (UTC)

Failed to connect to ssl://smtp.gmail.com:465 [SMTP: Failed to connect socket: fsockopen(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error) (code: -1, response: )]

Hello,
I need help :(
"I am using latest version of XAMPP on Windows Server 2008 R2 to deploy latest: mediawiki"
on localsettings.php
Using SSL:
$wgSMTP = array(
'host' => 'ssl://smtp.gmail.com',
'IDHost' => 'gmail.com',
'port' => 465,
'username' => 'my-email@gmail.com',
'password' => 'mypasswd',
'auth' => true
);
Got this error:
"Failed to connect to ssl://smtp.gmail.com:465 [SMTP: Failed to connect socket: fsockopen(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error) (code: -1, response: )]"
Using TLS:
$wgSMTP = array(
'host' => 'smtp.gmail.com',
'IDHost' => 'gmail.com',
'port' => 587,
'username' => 'my-email@gmail.com',
'password' => 'mypasswd',
'auth' => true
);
Got this error:
"Mailer returned: authentication failure [SMTP: STARTTLS failed (code: 220, response: 2.0.0 Ready to start TLS)]"
I also tried changing the [mail function] on C:\xampp\php\php.ini
and [sendmail function] on C:\xampp\sendmail\sendmail.ini.
but doesnt work. :(
//my antivirus and firewall is turn off// Nooobie (talk) 08:35, 1 March 2018 (UTC)
I have the same issue.
Failed to connect to ssl://smtp.gmail.com:465 [SMTP: Failed to connect socket: Permission denied (code: -1, response: )]
I am running Fedora 28, a clean install, and I have confirmed I can send an email from command line using
echo "Testing...1...2...3" | ssmtp XXXX@gmail.com
I am a bit confused Eckirchn (talk) 02:39, 22 June 2018 (UTC)
For using TLS: there have a reference. https://discourse-mediawiki.wmflabs.org/t/email-is-not-sending-through-postfix-smtp-server/299/2?u=razesoldier 星耀晨曦 (talk) 08:42, 1 March 2018 (UTC)
dont work, i even tried swiftmailer, still doesnt work :( Nooobie (talk) 10:19, 1 March 2018 (UTC)
got this error: Mailer returned: authentication failure [SMTP: SMTP server does not support authentication (code: 250, response: smtp.gmail.com at your service, [222.127.137.194] SIZE 35882577 8BITMIME STARTTLS ENHANCEDSTATUSCODES PIPELINING CHUNKING SMTPUTF8)] Nooobie (talk) 10:41, 1 March 2018 (UTC)
can anybody help to solve this.. pls :( Nooobie (talk) 11:43, 1 March 2018 (UTC)
Hum, I mean that if you using TLS to sent mail and you got SMTP: STARTTLS failed (code: 220 error message, you can try to edit net_smtp code to avoid this error. I also encountered this error before. 星耀晨曦 (talk) 12:04, 1 March 2018 (UTC)
To use G Suite for $wgSMTP, you need an App Password https://support.google.com/mail/answer/185833?hl=en
Then you need to enable "less secure apps" https://support.google.com/accounts/answer/6010255?hl=en
https://support.google.com/a/answer/6260879?hl=en FreshVegetarian (talk) 03:34, 19 November 2019 (UTC)

Looking for auntomation to data pull from csv/DB and update/create pages

We are looking for option to add new pages and alter the existing pages automatically through coding. my requirement is pull data from csv and DB and update the same in pages. explored the option of external data. through external data, i can pull the data from csv and DB and then i need to edit the page to add the query to display data. do we have  any function which also updated the pages Meghanalaxani (talk) 10:55, 1 March 2018 (UTC)

Maybe write a bot - See Manual:Pywikibot Malyacko (talk) 13:20, 1 March 2018 (UTC)

Foreign file repository

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I am trying to set up a file repo, where https://tiltawiki.coasterpedia.net is the local wiki and the files are at https://coasterpedia.net, I havn't been able to generate thumbnails over on Tilt-a-Wiki, and now I appear to have broken all images.

Firstly, can I set the file path as a URL? The wikis are on separate folders on the server without access to each other. Is the database credentials in ForeignDBRepo referring to the local or the host wiki? Finally is there anything obvious I am doing wrong? I have spent a long time trying to get this to work, unfortunately without success.

Thanks in advance Garuda3 (talk) 20:00, 1 March 2018 (UTC)

Here are some examples: https://github.com/wikimedia/operations-mediawiki-config/blob/master/wmf-config/filebackend.php manual:$wgForeignUploadTargets wargo (talk) 22:20, 1 March 2018 (UTC)
The description of the different options are in Manual:$wgForeignFileRepos. If you don't have visibility on folders, the only option is ForeignAPIRepo Ciencia Al Poder (talk) 10:14, 2 March 2018 (UTC)
Thanks very much to both of you for your help,
I have to admit after switching to the correct option (ForeignAPIRepo) the reason it wasn't working was an htaccess file I created ages ago so nothing wrong with MediaWiki. I think it's all fixed now Garuda3 (talk) 16:45, 3 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

old profile cant remember login of old email

Hi,I created a profile a long time ago (it was not approved as it had the same info as I had on my own website I created at that time. I would like to redo a new profile, but cannot remember the password of previous email address.

Can you advise what to do please?

KInd Regards

Laetitia 86.140.206.92 (talk) 22:12, 1 March 2018 (UTC)

See https://www.mediawiki.org/wiki/Help:Logging_in#What_if_I_forget_the_password_or_username? Malyacko (talk) 06:03, 2 March 2018 (UTC)

SocialProfile

hello. how to fix this situation and database Error

An error occurred in the database. This may indicate an error in the software.[3de1f5bdbe5df24939a30453] 2018-03-02 07:44: 18: Fatal exception of type " Wikimedia\Rdbms\DBQueryError» Kovalev.ser (talk) 07:45, 2 March 2018 (UTC)

# blog module
im require_once "$FROM/extensions/SocialProfile/SocialProfile.PHP";
wfLoadExtension ("comments" );
wfLoadExtension ('VoteNY') );
wfLoadExtension ('BlogPage' );
$wgCommentsInRecentChanges = true;
$wgGroupPermissions ['administrator'] ['commentadmin'] = true;
$wgGroupPermissions ['* ' ] ['commentlinks'] = true;
# end blog module Kovalev.ser (talk) 07:45, 2 March 2018 (UTC)
Did you run update.php? If you did, then add this to LocalSettings.php to see a more detailed error message:
$wgShowExceptionDetails = true;
$wgShowSQLErrors = true;
Ciencia Al Poder (talk) 10:08, 2 March 2018 (UTC)
the system update is proceeding normally. the errors are obtained. Errors occur when you start working in the system and add materials. avatar or blog, mistakes in adding friends and messages. Database checked, everything works and the table is all cash
I was most concerned about this error.
«Wikimedia\Rdbms\DBQueryError»
a php 7.2 Kovalev.ser (talk) 12:32, 2 March 2018 (UTC)
undefined Kovalev.ser (talk) 13:12, 2 March 2018 (UTC)
Wikimedia\Rdbms\DBQueryError is an error, but without a description of the error message there's nothing we can do, hence you should add the variables from my previous post to see a more descriptive error message. Ciencia Al Poder (talk) 16:00, 2 March 2018 (UTC)
Upgrading an existing installation
Turning off Content Handler DB fields for this part of upgrade.
...have ipb_id field in ipblocks table.
...have ipb_expiry field in ipblocks table.
...already have interwiki table
...indexes seem up to 20031107 standards.
...have rc_type field in recentchanges table.
...index new_name_timestamp already set on recentchanges table.
...have user_real_name field in user table.
...querycache table already exists.
...objectcache table already exists.
...categorylinks table already exists.
...have pagelinks; skipping old links table updates
...il_from OK
...have rc_ip field in recentchanges table.
...index PRIMARY already set on image table.
...have rc_id field in recentchanges table.
...have rc_patrolled field in recentchanges table.
...logging table already exists.
...have user_token field in user table.
...have wl_notificationtimestamp field in watchlist table.
...watchlist talk page rows already present.
...user table does not contain user_emailauthenticationtimestamp field.
...page table already exists.
...have log_params field in logging table.
...logging table has correct log_title encoding.
...have ar_rev_id field in archive table.
...have page_len field in page table.
...revision table does not contain inverse_timestamp field.
...have rev_text_id field in revision table.
...have rev_deleted field in revision table.
...have img_width field in image table.
...have img_metadata field in image table.
...have user_email_token field in user table.
...have ar_text_id field in archive table.
...page_namespace is already a full int (int(11)).
...ar_namespace is already a full int (int(11)).
...rc_namespace is already a full int (int(11)).
...wl_namespace is already a full int (int(11)).
...qc_namespace is already a full int (int(11)).
...log_namespace is already a full int (int(11)).
...have img_media_type field in image table.
...already have pagelinks table.
...image table does not contain img_type field.
...already have unique user_name index.
...user_groups table exists and is in current format.
...have ss_total_pages field in site_stats table.
...user_newtalk table already exists.
...transcache table already exists.
...have iw_trans field in interwiki table.
...wl_notificationtimestamp is already nullable.
...index times already set on logging table.
...have ipb_range_start field in ipblocks table.
...no page_random rows needed to be set
...have user_registration field in user table.
...templatelinks table already exists
...externallinks table already exists.
...job table already exists.
...have ss_images field in site_stats table.
...langlinks table already exists.
...querycache_info table already exists.
...filearchive table already exists.
...have ipb_anon_only field in ipblocks table.
...index rc_ns_usertext already set on recentchanges table.
...index rc_user_text already set on recentchanges table.
...have user_newpass_time field in user table.
...redirect table already exists.
...querycachetwo table already exists.
...have ipb_enable_autoblock field in ipblocks table.
...index pl_namespace on table pagelinks includes field pl_from.
...index tl_namespace on table templatelinks includes field tl_from.
...index il_to on table imagelinks includes field il_from.
...have rc_old_len field in recentchanges table.
...have user_editcount field in user table.
...page_restrictions table already exists.
...have log_id field in logging table.
...have rev_parent_id field in revision table.
...have pr_id field in page_restrictions table.
...have rev_len field in revision table.
...have rc_deleted field in recentchanges table.
...have log_deleted field in logging table.
...have ar_deleted field in archive table.
...have ipb_deleted field in ipblocks table.
...have fa_deleted field in filearchive table.
...have ar_len field in archive table.
...have ipb_block_email field in ipblocks table.
...index cl_sortkey on table categorylinks includes field cl_from.
...have oi_metadata field in oldimage table.
...index usertext_timestamp already set on archive table.
...index img_usertext_timestamp already set on image table.
...index oi_usertext_timestamp already set on oldimage table.
...have ar_page_id field in archive table.
...have img_sha1 field in image table.
...protected_titles table already exists.
...have ipb_by_text field in ipblocks table.
...page_props table already exists.
...updatelog table already exists.
...category table already exists.
...category table already populated.
...have ar_parent_id field in archive table.
...have user_last_timestamp field in user_newtalk table.
...protected_titles table has correct pt_title encoding.
...have ss_active_users field in site_stats table.
...ss_active_users user count set...
...have ipb_allow_usertalk field in ipblocks table.
...change_tag table already exists.
...tag_summary table already exists.
...valid_tag table already exists.
...user_properties table already exists.
...log_search table already exists.
...have log_user_text field in logging table.
...l10n_cache table already exists.
...index change_tag_rc_tag already set on change_tag table.
...have rd_interwiki field in redirect table.
...transcache tc_time already converted.
...*_mime_minor fields are already long enough.
...iwlinks table already exists.
...index iwl_prefix_title_from already set on iwlinks table.
...have ul_value field in updatelog table.
...have iw_api field in interwiki table.
...iwl_prefix key doesn't exist.
...have cl_collation field in categorylinks table.
...categorylinks up-to-date.
...module_deps table already exists.
...ar_page_revid key doesn't exist.
...index ar_revid already set on archive table.
...ll_lang is up-to-date.
...user_last_timestamp is already nullable.
...index user_email already set on user table.
...up_property in table user_properties already modified by patch patch-up_property.sql.
...uploadstash table already exists.
...user_former_groups table already exists.
...index type_action already set on logging table.
...have rev_sha1 field in revision table.
...batch conversion of user_options: nothing to migrate. done.
...user table does not contain user_options field.
...have ar_sha1 field in archive table.
...index page_redirect_namespace_len already set on page table.
...have us_chunk_inx field in uploadstash table.
...have job_timestamp field in job table.
...index page_user_timestamp already set on revision table.
...have ipb_parent_block_id field in ipblocks table.
...index ipb_parent_block_id already set on ipblocks table.
...category table does not contain cat_hidden field.
...have rev_content_format field in revision table.
...have rev_content_model field in revision table.
...have ar_content_format field in archive table.
...have ar_content_model field in archive table.
...have page_content_model field in page table.
Content Handler DB fields should be usable now.
...site_stats table does not contain ss_admins field.
...recentchanges table does not contain rc_moved_to_title field.
...sites table already exists.
...have fa_sha1 field in filearchive table.
...have job_token field in job table.
...have job_attempts field in job table.
...have us_props field in uploadstash table.
...ug_group in table user_groups already modified by patch patch-ug_group-length-increase-255.sql.
...ufg_group in table user_former_groups already modified by patch patch-ufg_group-length-increase-255.sql.
...index pp_propname_page already set on page_props table.
...index img_media_mime already set on image table.
...iwl_prefix_title_from index is already non-UNIQUE.
...index iwl_prefix_from_title already set on iwlinks table.
...have ar_id field in archive table.
...have el_id field in externallinks table.
...have rc_source field in recentchanges table.
...index log_user_text_type_time already set on logging table.
...index log_user_text_time already set on logging table.
...have page_links_updated field in page table.
...have user_password_expires field in user table.
...have pp_sortkey field in page_props table.
...recentchanges table does not contain rc_cur_time field.
...index wl_user_notificationtimestamp already set on watchlist table.
...have page_lang field in page table.
...have pl_from_namespace field in pagelinks table.
...have tl_from_namespace field in templatelinks table.
...have il_from_namespace field in imagelinks table.
...img_major_mime in table image already modified by patch patch-img_major_mime-chemical.sql.
...oi_major_mime in table oldimage already modified by patch patch-oi_major_mime-chemical.sql.
...fa_major_mime in table filearchive already modified by patch patch-fa_major_mime-chemical.sql.
...comment fields are up to date...hitcounter doesn't exist.
...site_stats table does not contain ss_total_views field.
...page table does not contain page_counter field.
...msg_resource_links doesn't exist.
...msg_resource doesn't exist.
...bot_passwords table already exists.
...have wl_id field in watchlist table.
...cl_collation key doesn't exist.
...index cl_collation_ext already set on categorylinks table.
...collations up-to-date.
...index rc_name_type_patrolled_timestamp already set on recentchanges table.
...rev_page_id index already non-unique.
...pl_namespace, tl_namespace, il_to indices are already non-UNIQUE.
...have ct_id field in change_tag table.
...have ts_id field in tag_summary table.
...rc_ip in table recentchanges already modified by patch patch-rc_ip_modify.sql.
...index usertext_timestamp already set on archive table.
...have el_index_60 field in externallinks table.
...ug_user_group key doesn't exist.
...have ug_expiry field in user_groups table.
...index img_user_timestamp already set on image table.
...img_media_type in table image already modified by patch patch-add-3d.sql.
...ip_changes table already exists.
...index PRIMARY already set on categorylinks table.
...index PRIMARY already set on templatelinks table.
...index PRIMARY already set on pagelinks table.
...index PRIMARY already set on text table.
...index PRIMARY already set on imagelinks table.
...index PRIMARY already set on iwlinks table.
...index PRIMARY already set on langlinks table.
...index PRIMARY already set on log_search table.
...index PRIMARY already set on module_deps table.
...index PRIMARY already set on objectcache table.
...index PRIMARY already set on querycache_info table.
...index PRIMARY already set on site_stats table.
...index PRIMARY already set on transcache table.
...index PRIMARY already set on user_former_groups table.
...index PRIMARY already set on user_properties table.
...comment table already exists.
...index PRIMARY already set on l10n_cache table.
...bot_passwords.bp_user is already unsigned int.
...change_tag.ct_log_id is already unsigned int.
...change_tag.ct_rev_id is already unsigned int.
...page_restrictions.pr_user is already unsigned int.
...tag_summary.ts_log_id is already unsigned int.
...tag_summary.ts_rev_id is already unsigned int.
...user_newtalk.user_id is already unsigned int.
...user_properties.up_user is already unsigned int.
...Comments table already exists.
...Comments_Vote table already exists.
...Comments_block table already exists.
...Vote table already exists.
...user_board table already exists.
...user_fields_privacy table already exists.
...user_profile table already exists.
...user_stats table already exists.
...user_relationship table already exists.
...user_relationship_request table already exists.
...user_system_gift table already exists.
...system_gift table already exists.
...user_gift table already exists.
...gift table already exists.
...user_system_messages table already exists.
...user_points_weekly table already exists.
...user_points_monthly table already exists.
...user_points_archive table already exists.
...user_stats table does not contain stats_year_id field.
...site_stats is populated...done.
Purging caches...done. Kovalev.ser (talk) 18:09, 2 March 2018 (UTC)
By "variables", it was meant to add the following to your LocalSettings.php:
$wgShowExceptionDetails = true;
$wgShowSQLErrors = true;
AhmadF.Cheema (talk) 18:15, 2 March 2018 (UTC)
Yes, this code is. But no errors are displayed. Kovalev.ser (talk) 02:31, 3 March 2018 (UTC)
If no error is displayed, what's the problem? Ciencia Al Poder (talk) 10:06, 3 March 2018 (UTC)
seems to work - incorrectly prescribed path, when you save the settings .htaccess
there is what any extension to html codes insert Kovalev.ser (talk) 14:15, 3 March 2018 (UTC)

How can I remove my account?

I want to remove my account. How can I remove it? Helma Hurkens (talk) 10:58, 2 March 2018 (UTC)

Where's your account? Your wiki or wikimedia? 星耀晨曦 (talk) 11:35, 2 March 2018 (UTC)

old database to new

I just migrated from my old mediawiki to a new server and mw installation.

All the data is there, but the user table is different, and I am getting this error:

[Wpkh5OaaUdnT@ZFKClrWFQAAAAI] /w/index.php?title=Special:CreateAccount&returnto=MCloud Wikimedia\Rdbms\DBQueryError from line 1149 of /var/www/html/w/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: SELECT ug_user,ug_group,ug_expiry FROM `user_groups` WHERE ug_user = '5'

Function: UserGroupMembership::getMembershipsForUser

Error: 1054 Unknown column 'ug_expiry' in 'field list' (localhost)

Backtrace:

#0 /var/www/html/w/includes/libs/rdbms/database/Database.php(979): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)

#1 /var/www/html/w/includes/libs/rdbms/database/Database.php(1343): Wikimedia\Rdbms\Database->query(string, string)

#2 /var/www/html/w/includes/user/UserGroupMembership.php(289): Wikimedia\Rdbms\Database->select(string, array, array, string)

#3 /var/www/html/w/includes/user/User.php(1430): UserGroupMembership::getMembershipsForUser(integer, Wikimedia\Rdbms\DatabaseMysqli)

#4 /var/www/html/w/includes/user/User.php(497): User->loadGroups()

#5 /var/www/html/w/includes/libs/objectcache/WANObjectCache.php(892): User->{closure}(boolean, integer, array, NULL)

#6 [internal function]: WANObjectCache->{closure}(boolean, integer, array, NULL)

#7 /var/www/html/w/includes/libs/objectcache/WANObjectCache.php(1012): call_user_func_array(Closure, array)

#8 /var/www/html/w/includes/libs/objectcache/WANObjectCache.php(898): WANObjectCache->doGetWithSetCallback(string, integer, Closure, array, NULL)

#9 /var/www/html/w/includes/user/User.php(521): WANObjectCache->getWithSetCallback(string, integer, Closure, array)

#10 /var/www/html/w/includes/user/User.php(441): User->loadFromCache()

#11 /var/www/html/w/includes/user/User.php(405): User->loadFromId(integer)

#12 /var/www/html/w/includes/session/UserInfo.php(88): User->load()

#13 /var/www/html/w/includes/session/CookieSessionProvider.php(119): MediaWiki\Session\UserInfo::newFromId(string)

#14 /var/www/html/w/includes/session/SessionManager.php(487): MediaWiki\Session\CookieSessionProvider->provideSessionInfo(WebRequest)

#15 /var/www/html/w/includes/session/SessionManager.php(190): MediaWiki\Session\SessionManager->getSessionInfoForRequest(WebRequest)

#16 /var/www/html/w/includes/WebRequest.php(735): MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)

#17 /var/www/html/w/includes/session/SessionManager.php(129): WebRequest->getSession()

#18 /var/www/html/w/includes/Setup.php(762): MediaWiki\Session\SessionManager::getGlobalSession()

#19 /var/www/html/w/includes/WebStart.php(114): require_once(string)

#20 /var/www/html/w/index.php(40): require(string)

#21 {main}

______________________

Is there a script that exists already that I could run to fix this? or am I going to have to manually alter the schema? 173.213.212.246 (talk) 15:25, 2 March 2018 (UTC)

Sorry, that was my post, I thought i was logged in. Hekdiesel (talk) 15:26, 2 March 2018 (UTC)
Do you run update.php? 星耀晨曦 (talk) 15:51, 2 March 2018 (UTC)
dang i didnt run update.php Hekdiesel (talk) 16:37, 2 March 2018 (UTC)
Please run update.php after upgrade mediawiki. Note: Always backup the database before running the script! 星耀晨曦 (talk) 16:47, 2 March 2018 (UTC)

Help person create random username

I want to be to implement some link that will allow someone to click on it to get a suggested username, something like:

https://en.wikipedia.org/wiki/Special:CreateAccount?username=USER-20180303125110

Is there any way to implement such a feature? T.Shafee(Evo﹠Evo)talk 12:51, 3 March 2018 (UTC)

extension "special:contact"

Hi,

This extension (Spécial:Contact) needs to write an username in the localsettings file and, in the form, shows this username and the email address corresponding.

Is it possible to avoid this and to have the possibility for the sender to enter his own coordinates ?

Thanks in your answers/ Pacha35 (talk) 22:22, 3 March 2018 (UTC)

If some "extension (Spécial:Contact)" exists then please link to its web page that explains more about that extension. Malyacko (talk) 11:17, 5 March 2018 (UTC)
Probably, Extension:ContactPage. AhmadF.Cheema (talk) 21:17, 5 March 2018 (UTC)
Thank you, I'll try this extension. Pacha35 (talk) 15:37, 11 April 2018 (UTC)

File versions

Hi. Is there a way to see which files have more than one version (under File history) other than by checking them individually? 2001:16B8:2B89:E800:68C3:A6B4:21BD:18BA (talk) 12:55, 4 March 2018 (UTC)

You can refer Allimages API. 星耀晨曦 (talk) 09:21, 5 March 2018 (UTC)

Local time clock & purge gadget

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


On Wikimedia Commons, a user can select the UTC or local time Clock & Purge gadget. I would like to implement this on Wikisource for myself. Where could I find the code for it? — Ineuw talk 20:00, 4 March 2018 (UTC)

https://commons.wikimedia.org/wiki/Special:Gadgets links to https://commons.wikimedia.org/wiki/MediaWiki:Gadget-UTCLiveClock.js. Manual:Interface/JavaScript#Personal scripts explains how to have a script for yourself. Malyacko (talk) 22:27, 4 March 2018 (UTC)
Thanks Malyacko. — Ineuw talk 23:58, 4 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Allow users to only edit their userpage and talkpage

How would it be possible to disallow users to edit any pages other than their userpage and talkpage? Reception123 (talk) 10:16, 5 March 2018 (UTC)

Probably through Extension:AbuseFilter.
Some wikis have rules to disallow edits to other people's user pages. Similar rules can be used as a starting point for creating a filter that serves your purpose. AhmadF.Cheema (talk) 10:49, 5 March 2018 (UTC)
You can disable editing of other namespaces by locking them in localsettings.php and have a certain right needed to edit that respective namespace.
For example, to lock the editing of the Template: namespace, you could add the following:
$wgNamespaceProtection[NS_TEMPLATE] = array( 'insertnamehere' );Star-Warden19:28, 10 March 2018 (UTC)

not get the whole drawing.....

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


i am drawing in inkscape and when i open in another program for g coding i am not getting my whole drawing. love the program fyi. 76.14.203.104 (talk) 19:02, 5 March 2018 (UTC)

Wrong support forum. For Inkscape queries, you will have to ask at one of the links mentioned here. AhmadF.Cheema (talk) 21:17, 5 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

substitution alignment

I substitute my infoboxes because that's easier for me.

I can't for the life of me figure out how to change the alignment without basically creating an entirely new infobox to call upon, which would be super annoying.

I've tried adding |align        ="left" and |style =leftto the infobox afterward and nothing changes. What can I do? i also do not want to edit common.css Dog1994 (talk) 02:50, 6 March 2018 (UTC)

If you use parameters in the infobox but the infobox isn't doing anything with them, it will change nothing...
If you're copying templates from wikipedia, see Manual:Importing Wikipedia infoboxes tutorial Ciencia Al Poder (talk) 21:55, 7 March 2018 (UTC)
they're not copied, no. completely built from scratch.
I have a CSS override so that they all align=right but I want some of them to align=left, and that's my problem. Dog1994 (talk) 22:25, 29 March 2018 (UTC)
If you are using local CSS overrides, than I assume those CSS rules are implemented on-to the Infobox through a class. In which case, can't just two separate classes be made, one for left-alignment and the other for right-alignment? AhmadF.Cheema (talk) 09:22, 30 March 2018 (UTC)
They can, how would I accomplish that?
To make it clear: i have one page that I am attempting to use multiple infoboxes on and it looks awful with all of them on the same alignment. I want to change it so that every other box is aligned left. Dog1994 (talk) 06:01, 24 April 2018 (UTC)
How exactly are you accomplishing, as you mentioned above, "align=right" for your Infoboxes? AhmadF.Cheema (talk) 22:49, 24 April 2018 (UTC)
I add:
.infobox { float: right; }
to Common.css and that forces all infoboxes to the right, which I need otherwise I can't place them where I need them to be. This is great for the vast majority of pages where I want a right-aligned infobox, but in some pages I need left aligned. I can't just remove the common.css since that will force all of my infoboxes back to the left.
So now I'm stuck since I need to be able to fluctuate certain infoboxes to the left. Dog1994 (talk) 07:28, 27 April 2018 (UTC)
On the table or div of the infobox, add style="float:{{{align|right}}};"
then add align=left on the templates you want it to be left-aligned. You can remove the .infobox { float: right; } style Ciencia Al Poder (talk) 09:11, 27 April 2018 (UTC)
Or add .infobox-float-left { float: left; } as a class, and add that class to the infoboxes you want on the left.
You should also add clear: right; to your infobox class, so your infoboxes stay to the right of the page, rather than stacking up next to each other. 110.149.125.240 (talk) 13:45, 27 April 2018 (UTC)
i can't tell if i just have no idea what i'm doing or maybe i've set up templates completely wrong.
I tried following @Ciencia Al Poder's suggestion but as usual, I still can't get my templates to do anything but be EITHER stuck permanently on the left or permanently on the right.
To my Template:Character page (the one I use most often) I added:
| style="float:{{{align|right}}} but removed the ; escape since that didn't make sense to me (but I later added it back and it made no difference)
and then I removed the
.infobox { float: right; }
from my MediaWiki:Common.css
but without that, my templates simply do not obey any float or align properties.
I didn't follow the other suggestion since i dont want tom mess with classes that I don't understand Dog1994 (talk) 22:28, 28 May 2018 (UTC)
Be sure style="float:{{{align|right}}}" is on the table, not on a column Ciencia Al Poder (talk) 09:05, 29 May 2018 (UTC)
How do I ensure it's on a table versus a column?
Currently I substitute, so I'm not sure it's being displayed as a table. I'm still very inexperienced with infoboxes, sorry! Dog1994 (talk) 18:51, 23 June 2018 (UTC)
See Help:Tables to see what's a table, and what's a column (or more correct, a table cell, which is what I wanted to say) Ciencia Al Poder (talk) 15:39, 24 June 2018 (UTC)

Harassment

Who I do contact for someone harassing me and blocking my IP Address from using Wikipedia? I was looking something up in regards to meditation and someone is preventing me from accessing resources. This was my first attempt to look something up on Wikipedia today especially on a new phone device. 2607:FB90:82BD:67BD:5592:795D:9E7:19FE (talk) 20:59, 6 March 2018 (UTC)
Please explain why you think "someone is preventing" you by providing specific error messages or explaining *why* you cannot "use" Wikipedia. What does "use" mean? Malyacko (talk) 10:54, 7 March 2018 (UTC)
Are you blocked from editing? I am too, but that's alright...
I use a mobile hotspot to provide internet service to my appliances. The IP addresses are highly volatile and not attached, nor easily traceable to any certain location. Because of that, there has been abuse due to these devices being misused.
You can create an account on Wikipedia, and once your identity is verified, you will be allowed to edit once you a re logged in. 24.192.109.217 (talk) 21:03, 6 March 2018 (UTC)
I do not know of a way to block a user from viewing Wikipedia - except from govermental censorship. Or are you speaking about someone in your local network, like your system administrator?
Or are you in fact having technical problems? 2001:16B8:106C:1400:866:36F8:1D16:7435 (talk) 04:26, 7 March 2018 (UTC)

Math extension help

I have upgraded to 1.30 and with this upgrade, I also decided to implement the Math extension. It is very important to me that math formulae always appear consistently despite the choice of web browser. My ideal solution is to have all formulae exist in the form of an SVG or PNG image.

I have total root control of this Debian-derivative machine. I installed an enormous battery of LaTeX-ish packages, compiled something with the 'make' command in the extensions/Math directory.

The documentation gets very, very unclear and confusing from that point. What do I do next? It is just too scattered to know what is suggestion, legacy or required for the final portion of their instructions.

Extension:Math/advancedSettings#Math output modes

How do I finish this installation? 24.192.109.217 (talk) 21:12, 6 March 2018 (UTC)

Bumping to top. I still need help with this. 24.192.109.217 (talk) 17:43, 7 March 2018 (UTC)
For example, I want to see the wiki code:
<math> [\operatorname{p.\!v.} (K)](f) = \lim_{\varepsilon \to 0} \int_{\mathbb{R}^{n} \setminus B_{\varepsilon(0)}} f(x) K(x) \, \mathrm{d} x. </math>
To appear, and always appear, just like this image from wikipedia, no matter how simple the expression.
https://wikimedia.org/api/rest_v1/media/math/render/svg/6e427b19d283df4c6da9d082fe2ba5164c12fad3 24.192.109.217 (talk) 19:04, 7 March 2018 (UTC)
This requires the Math extension icw Mathoid. There's just been some changes to make it easier to setup, and I suggest you read the related mailing list posting from last week about it first.
https://lists.wikimedia.org/pipermail/mediawiki-l/2018-March/047266.htmlTheDJ (Not WMF) (talkcontribs) 13:07, 8 March 2018 (UTC)
I saw that. Since my site is available to the internet, it should just work. It is 1.30.0 and was upgraded last week. I installed the extension (from Math-REL1_30-e13d2d5.tar) as required in documentation. Unfortunately, it doesn't work:
Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): [\operatorname{p.\!v.} (K)](f) = \lim_{\varepsilon \to 0} \int_{\mathbb{R}^{n} \setminus B_{\varepsilon(0)}} f(x) K(x) \, \mathrm{d} x.
So, just making sure...
I have the text:
wfLoadExtension( 'Math' );
in my LocalSettings.php
I have run these last week too:
sudo apt-get install build-essential dvipng ocaml texlive-fonts-recommended texlive-lang-greek texlive-latex-recommended
sudo apt-get install build-essential dvipng ocaml texlive-fonts-recommended texlive-lang-greek texlive-latex-recommended
and went into extensions/Math and ran 'make' and deleted the *.o files
So what am I missing? 24.192.109.217 (talk) 21:10, 12 March 2018 (UTC)
By the way, texvc is compiled and located in extensions/Math/math/texvc Could it be that it doesn't know it's there? There isn't much for documentation for this. I get the idea the Math extension probably has a lot of word-of-mouth support for those that are in the inner circle of MediaWiki/Wikipedia 24.192.109.217 (talk) 16:13, 13 March 2018 (UTC)

Publish Content on Wiki Page

Hello ,

I`m rather new to the MediaWiki platform and not quite sure how to approach some project i wish to create .

I have deployed a MediaWiki server on a local computer i have to be used as a KB for several developers working on a Open source project .

The project has several branches and for each of them i want to create a page .

And on each page i want dynamically update results from Builds and Tests ran by Jenkins CI on the format <DATE> - <Build Result> - <Test Result>

In a list or table or something .

I want to implement this to be done automatically .

So how would some one approach to implementing something of the sort? i have searched google for hours and found no valid solutions. Yonnatanba (talk) 09:37, 7 March 2018 (UTC)

Sounds like territory for an automated bot that you could write: Manual:Pywikibot Malyacko (talk) 10:52, 7 March 2018 (UTC)

Customing top bar colour

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi, I'm having a bit of trouble figuring out how to customise the background colour of the top bar's tabs. I can recolour the rest of the background just fine. However, the box around the link of each tab remains annoyingly conspicuous shades of blue or white that really don't jive with the existing background. Is there a way that I can fix this using CSS?

Thanks. TheTimManDraws (talk) 10:57, 7 March 2018 (UTC)

Inspect those elements with the developer tools of your browser (right-click, inspect element, or hit F12). You can inspect and play directly with the CSS rules applied for those elements. Note that setting the background-color property doesn't affect the background-image property, which is the one that is affecting you. Ciencia Al Poder (talk) 21:49, 7 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Hide one namespace?

Hi,

at the manual there is the information that ...

...

  • Certain namespaces require additional privilege(s), i.e. for reading or editing

...

See Manual:Using custom namespaces#Why you would want a custom namespace

So, I was if it is possible to hide a custom namespace for visitors that don't have an account?

I did not found anything further about it.

Thanks ... Birgit BirgitLachner (talk) 17:57, 7 March 2018 (UTC)

That expression is unfortunate. You can restrict a namespace from editing, but it's very complicated to prevent content from one namespace to be leaked.
Just don't use a wiki for storing private info unless the entire wiki is private. Ciencia Al Poder (talk) 21:44, 7 March 2018 (UTC)

Migrating from WikiSpaces

Is it possible to migrate content from WikiSpaces into MediaWiki?

If it is how can it be done?

Regards,

Nigel 158.143.39.79 (talk) 09:29, 8 March 2018 (UTC)

They offer several export options, although it doesn't display the complete list of options available.
The most complete dump they'll probably give you is an XML dump. It (should) contain the full page history of all pages. However, deleted pages are often excluded from the dump. For importing the dump to your own server or another host, see Manual:Importing XML dumps.
If they do not provide a complete dump, you should be able to use Special:Export to export all pages or in batches.
Images are not included in the XML dump. If they do not include images, you should download them manually or with the help of a bot or similar (like HTTrack).
Another option, if you are setting up your own server, is to use Manual:Grabbers. Ciencia Al Poder (talk) 10:28, 8 March 2018 (UTC)
I started a page to have a single hub of discussion for this: Wikispaces. Please help improve it! Tgr (WMF) (talk) 15:42, 1 June 2018 (UTC)

Migrating wiki from one server to another

I'm trying to migrate wiki to another server, i have made a mysql backup of a wiki database in phpmyadmin, but a database is about 150mb, and phpmyadmin only allows me to restore up to 96mb database file (it's a shared hosting, so i can't edit php.ini) also i don't have access to ssh, so i can only access phpmyadmin and server via ftp.

I have also tried some script that uploads database part by part, but after a few mins it stops and show phpmyadmin session timeout.... Darkwarrior92 (talk) 11:38, 8 March 2018 (UTC)

There are two options I think:

MediaWiki 1.29.2 - Can't get Google or Bing to index pages

Hi! I have two wikis that I'm having an awful time to get google or bing to index.

http://altcoinwiki.com

http://poolspawiki.com

MediaWiki 1.29.2
PHP 7.1.13 (cgi-fcgi)
MySQL 5.6.36-cll-lve
ICU 57.1

Google and Bing will index 6 or 7 random pages but that's it. I've been trying to for weeks, I have google and bing webmaster, and have force crawled several times, no major errors. I have a sitemap (http://altcoinwatch.com/sitemap.xml) and I just don't know what to do. I even edited some of the robots.txt per the mediawiki article to help with the short link pages.

Any help would be much appreciated! 66.83.130.14 (talk) 17:36, 8 March 2018 (UTC)

How did you generate your Wiki's sitemap? Did you try using GenerateSitemap.php for the generation?
Google webmasters has a "Google Index" section, what is the count of pages it shows to have been indexed? AhmadF.Cheema (talk) 19:00, 8 March 2018 (UTC)
I actually could not get the maintenance script to work right to generate the sitemap, so I went with an extension, which looking over the sitemap seems to be fine.
Google only shows 10 pages indexed, it actually showed like 15 before I tried doing everything in the help section told me to with my robots.txt (basically fix short urls so theyre not double indexed) which in contrast, the wiki has over 400 pages..
Actually I just checked the indexed pages through webmaster tools, and it shows google indexed over 140,000 pages on march 4th....so something is going wrong here.... 66.83.130.14 (talk) 19:35, 8 March 2018 (UTC)
oops scratch those numbers, was looking at the wrong site
Web pages
658
Submitted
200
Indexed
with only 10 actually showing up in google by using site:altcoinwiki.com 66.83.130.14 (talk) 19:41, 8 March 2018 (UTC)
Google (and other crawlers) don't just index what's in the sitemap. The sitemap is only used to tell search engines when a page has been updated (because it contains the modification timestamp), but nothing more. Search engines crawl your site naturally, starting with the main page and following links by relevance, etc, and crawling some pages each day. Sadly, there's no way to speed this AFAIK. Ciencia Al Poder (talk) 19:53, 8 March 2018 (UTC)

i want help

What happene ????
I Can't open https://phabricator.wikimedia.org/
When I open the websit "
= Forbidde " ??????? =
You don't have permission to access / on this server. Ahmedbourghidame (talk) 00:32, 9 March 2018 (UTC)
Are you using a Wikipedia Zero internet provider? If yes, please try using a provider that does not take part in Wikipedia Zero. AKlapper (WMF) (talk) 10:55, 9 March 2018 (UTC)
Also, for general questins about Phabricator, best place to ask is Talk:Phabricator/Help AKlapper (WMF) (talk) 11:02, 9 March 2018 (UTC)
Phab looks good for me. 星耀晨曦 (talk) 05:42, 9 March 2018 (UTC)
No 😓😓😓 Ahmedbourghidame (talk) 19:06, 9 March 2018 (UTC)
But yes!
Like for 星耀晨曦, Phabricator is working fine for me as well! 2001:16B8:10F3:5B00:ACEF:8280:DCD8:DB74 (talk) 20:26, 9 March 2018 (UTC)
Due to abuse behavior of some Phabricator users who access Phabricator via Wikipedia Zero, we currently do not allow to access Phabricator via Wikipedia Zero for a small number of certain providers.
So "I have no problems" comments won't help. What would help is if @Ahmedbourghidame answered my question above. :) AKlapper (WMF) (talk) 21:31, 9 March 2018 (UTC)

Dear specialists, In a small mediawiki the content of "files" grows. How can I show the content as gallery (instead of file list)? Bests, Markus Markus Bärlocher (talk) 06:28, 9 March 2018 (UTC)

You can refer Image gallery extensions. 星耀晨曦 (talk) 07:02, 9 March 2018 (UTC)
Image gallery (<nowiki><gallery></nowiki>) works in defaut NameSpace.
But I would like to have it in "File/Data" NS.With this I get al list of filenemes:
http://wiki.openseamap.org/wiki/Spezial:Alle_Seiten?from=&to=&namespace=6
Ho can I get a gallery of all pictures, ideally together wit the file names?
Bests, Markus Markus Bärlocher (talk) 11:25, 9 March 2018 (UTC)
<gallery> also works in File namespace, however File namespace is a built-in namespace that is dedicated to placing uploaded files. If you want to show all pictures of your wiki on one page, it may require the power of extension. I did a cursory search and did not find such an extension, you can search hard in this area. In addition, I don't recommend placing too many pictures on a single page, even if they are all thumbnails. This can result in loading a page for too long. 星耀晨曦 (talk) 16:22, 9 March 2018 (UTC)

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi Guys, I'm new here and i have a little problem with intern links : some of them doesn't work properly. I will try to explain to you :

When i click on the intern link the url become :http://localhost/wiki/index.php/Analyses_des_jeux_d%E2%80%99isolation_et_des_lignes_de_fuite#A_propos_des_analyses_des_jeux_d.27isolation_.C3.A9lectriques_et_des_lignes_de_fuite

And it doesn't work.

When i use summary to go on this section the url is : http://localhost/wiki/index.php/Analyses_des_jeux_d%E2%80%99isolation_et_des_lignes_de_fuite#A_propos_des_analyses_des_jeux_d.27isolation_.C3.A9lectriques_et_des_lignes_de_fuite.E2.80.8B

and it's working !

So why ? I think the problem is about "E2.80.8B" ?

Thank's for your help.

PS: I have only one link which is working (on 4/5 link on this page)

PS 2 : Sorry for my english skills Xereoscar (talk) 08:27, 9 March 2018 (UTC)

E2808B is a "zero width space" character.
Maybe you copied the content from another source which included that invisible character, causing it to change the link target.
Edit the page and try to remove character by character from the end. Ciencia Al Poder (talk) 10:22, 9 March 2018 (UTC)
Thank you, that's my problem ! I juste try to re-write the title and it's ok !
Thank you ! Xereoscar (talk) 10:59, 9 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Problem with LDAP Authentication

Hi,

I installed my first MediaWiki. My version is 1.30.0. MediaWiki is running on CentOS 7.

My problem is with LDAP Authentication. I downloaded file LdapAuthentication-REL1_30-907953e.tar.gz, after unzip copied this file to /var/www/html/extensions

I added to LocalSettings.php this lines:

### LDAP Authentication section ###

require_once 'extensions/LdapAuthentication/LdapAuthentication.php';

require_once 'includes/AuthPlugin.php';

$wgAuth = new LdapAuthenticationPlugin();

$wgLDAPDomainNames = array(

  'XXX',

);

$wgLDAPServerNames = array(

  'XXX' => 'server_name',

);

$wgLDAPUseLocal = false;

$wgLDAPEncryptionType = array(

  'XXX' => 'clear',

);

$wgLDAPPort = array(

  'XXX' => 389,

);

$wgLDAPProxyAgent = array(

  'XXX' => 'sAMAccountName=ProxyAgent,OU=Users,OU=ZZZ,dc=YYY',

);

$wgLDAPProxyAgentPassword = array(

  'XXX' => '************',

);

$wgLDAPSearchAttributes = array(

  'XXX' => 'sAMAccountName'

);

$wgLDAPBaseDNs = array(

  'XXX' => 'dc=YYY',

);

$wgLDAPGroupBaseDNs = array(

  'XXX' => 'OU=Groups,OU=ZZZ,dc=YYY'

);

$wgLDAPUserBaseDNs = array(

  'XXX' => 'OU=Users,OU=ZZZ,dc=YYY'

);

# Group based restriction

$wgLDAPGroupUseFullDN = array( "XXX"=>true );

$wgLDAPGroupObjectclass = array( "XXX"=>"group" );

$wgLDAPGroupAttribute = array( "XXX"=>"member" );

$wgLDAPGroupSearchNestedGroups = array( "XXX"=>true );

$wgLDAPGroupNameAttribute = array( "XXX"=>"cn" );

$wgLDAPRequiredGroups = array( "XXX"=>array("cn=Users,ou=groups,dc=YYY"));

$wgLDAPLowerCaseUsername = array(

  'XXX' => true,

);

$wgLDAPDebug = 0;

$wgDebugLogGroups['ldap'] = '/tmp/debugldap.log';

I don´t know where is the problem. File /tmp/debugldap.log is not creating.

Please help.

Thanks.

Regards.

Karel 176.74.153.177 (talk) 12:14, 9 March 2018 (UTC)

What is it that is not working?
Is there anything in the debug log? 2001:16B8:10F3:5B00:75D1:31FA:176B:7ECC (talk) 13:54, 9 March 2018 (UTC)
Login as LDAP user is not working.In web a have this error "An incorrect password was entered. Try it again."
All httpd logs is clean. 176.74.153.177 (talk) 06:47, 12 March 2018 (UTC)
That plugin it's not supported at newer versions, you should go for PluggableAuth or another one. Extension:LDAP Authentication 201.216.192.73 (talk) 18:09, 14 March 2018 (UTC)
(Actually I am using it with MW 1.30 and it is working nicely. But I have not configured it myself, so I don't know what might be wrong here. The replacements of LDAP-Authentication have not yet been written I think...) 2001:16B8:1075:A700:1141:C0FD:CECF:8EA9 (talk) 21:31, 14 March 2018 (UTC)
Ok, which plugin should i use for LDAP? 176.74.153.177 (talk) 07:19, 16 March 2018 (UTC)
can I use PluggableAuth for connect to LDAP? 176.74.153.177 (talk) 07:26, 16 March 2018 (UTC)
I can´t find how. Can you send me instructions? Thanks 176.74.153.177 (talk) 07:32, 16 March 2018 (UTC)
Did you resolve this issue? I am attempting to authenticate users via Active Directory and have the same problem. Packetboxer (talk) 19:25, 28 June 2018 (UTC)

Hi, whe am trying to connect to the server its asking me to enter the "PASSWORD". Have add the Key file also.Kindly hemlp me with this.

Hi,  whe am trying to connect to the server its asking me to enter the "PASSWORD". Have add the Key file also

.Kindly help me with this. 160.83.73.17 (talk) 15:20, 9 March 2018 (UTC)

Error trying to import Template:Infobox

I apologize for this being a cross-post (I posted this on Stack Overflow as well, but haven't heard any feedback yet), but I'm having trouble importing a template (Infobox) from Wikipedia into a localhost wiki.

Version information:

  • x64 Windows 10
  • Wamp64
  • MediaWiki 1.30.0
  • Apache 2.4.23
  • MySQL 5.7.14
  • PHP 7.0.10 (and 5.6.25, Wamp64 requires it for some reason)

Anyway, I have basically exported Wikipedia's Template:Infobox, including history, making a file that is ~30 MB in size.

I've changed the following so far to no avail:

  • Added $wgMaxUploadSize = 50000000; to LocalSettings.php.
  • Made sure $wgEnableUploads = true; was set in LocalSettings.php.
  • Set post_max_size = 100M in /wamp64/bin/apache2.4.23/bin/php.ini.
  • Made sure file_uploads = On was set in /wamp64/bin/apache2.4.23/bin/php.ini.
  • Set upload_max_filesize = 100M in /wamp64/bin/apache2.4.23/bin/php.ini.
  • Set max_execution_time = 500 in /wamp64/bin/apache2.4.23/bin/php.ini.

Also making sure to restart the server each time. In short, it times out every time, with the error log providing

Fatal error: Maximum execution time of 120 seconds exceeded in D:\wamp64\www\library_of_code\includes\libs\rdbms\database\DatabaseMysqli.php on line 47

With the stack ending around:

25 119.9852 57182728 Wikimedia\Rdbms\DatabaseMysqli->doQuery( ) ...\Database.php:1015

Which is the same in the PHP error logs:

[09-Mar-2018 15:24:15 UTC] PHP  25. Wikimedia\Rdbms\DatabaseMysqli->doQuery() D:\wamp64\www\library_of_code\includes\libs\rdbms\database\Database.php:1015

Any advice would be very helpful! Please let me know if I can provide more information! Superraptor12345 (talk) 15:44, 9 March 2018 (UTC)

Something is taking 120 seconds (2 minutes) to render on your wiki... that's a lot of time for a web page. If you're trying to import the XML dump from the web interface, try to import it from the command line instead, which doesn't have such strict execution limits. Use the Manual:importDump.php maintenance script for that. Ciencia Al Poder (talk) 16:09, 9 March 2018 (UTC)
Will look into it! I've changed it to 500 seconds and 1000 seconds with the same results, so I'm not sure if it is solely a time-based thing though.
EDIT: Tried running `php importDump.php < template_infobox.xml` and I get the error `stdin is not a tty`? Superraptor12345 (talk) 16:19, 9 March 2018 (UTC)
The "<" redirect only works on Linux AFAIK. You shoud pass the dump file as the last argument, without the "<" Ciencia Al Poder (talk) 16:43, 9 March 2018 (UTC)
Lol duh. I thought maybe since I was running in Git bash that I might be lucky, but you're totally right.
Currently, I'm running as suggested and it seems to be hanging, but I'll let run for like an hour and see what happens. Superraptor12345 (talk) 16:59, 9 March 2018 (UTC)
EDIT: Finished! Output notes `You might want to run rebuildrecentchanges.php to regenerate RecentChanges, and initSiteStats.php to update page and revision counts`. I should go ahead and run these right? (Also thanks so much) Superraptor12345 (talk) 17:13, 9 March 2018 (UTC)
It probably shouldn't be needed, unless you ran it with the --no-updates flag. Note that depending on the size of your wiki, running those scripts (rebuildrecentchanges.php in particular) may take a while. However, for template imports it shouldn't matter. Ciencia Al Poder (talk) 18:58, 9 March 2018 (UTC)
Everything worked fine! You're the best! Superraptor12345 (talk) 19:29, 9 March 2018 (UTC)
You can try set max_execution_time = 0 in your php.ini, it make execution never expires (Usually used in CLI, used in web is a bad idea). 星耀晨曦 (talk) 16:29, 9 March 2018 (UTC)
Tried this, I just hangs indefinitely (let it run for like 8 hours, no result) Superraptor12345 (talk) 16:39, 9 March 2018 (UTC)

Solicitud de ayuda

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Dear specialists:

Wikipedia has a bubok link where my name appears: Mariluz Reyes Fernández with my books. Please delete this link, because those books I transformed them, everything has changed in those books. I have written to Bubok many times, but they do not obey. I hope you can help me.

Thank you very much Mariluz Reyes Fernández (talk) 16:36, 9 March 2018 (UTC)

For questions related to the Spanish Wikipedia, it would be quicker to ask at one of its Help pages, such as this one. AhmadF.Cheema (talk) 18:08, 9 March 2018 (UTC)
Best regards to the Wikipedia
Por favor, necesito eliminar completamente mi publicación en:
https://www.bubok.es/autores/Mariluz
my books titled:
_El alma nunca calla
_La cara linda y la cara fea
_El urogallo cantor
_Ellos también son nuestros amigos
_Cascabel
_and my photo
I changed the content of these books. And I'm going to publish them again in another editorial.
The manager of Bubok does not answer me
Thank you very much
Mariluz Reyes Fernández Mariluz Reyes Fernández (talk) 07:57, 2 August 2018 (UTC)
Is it related with MediaWiki? wargo (talk) 08:22, 2 August 2018 (UTC)
What does bubok have to do with Wikipedia or MediaWiki? Ciencia Al Poder (talk) 09:12, 2 August 2018 (UTC)
This website does not uses MediaWiki at all. 94.195.93.228 (talk) 07:55, 6 August 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

help

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


way i cant open https://phabricator.wikimedia.org/tag/wikimedia-hackathon-newcomer/

Forbidden

You don't have permission to access /tag/wikimedia-hackathon-newcomer/ on this server. ??? What happen ..


.. Ahmedbourghidame (talk) 18:31, 9 March 2018 (UTC)

Please try again. The website is displaying correctly for me. 2001:16B8:10F3:5B00:ACEF:8280:DCD8:DB74 (talk) 20:27, 9 March 2018 (UTC)
Yes i try and try. ... It not working Ahmedbourghidame (talk) 01:01, 10 March 2018 (UTC)
See Project:Support desk/Flow/2018/03#h-i_want_help-2018-03-09T00:32:00.000Z. No need to start another discussion on the same topic. AKlapper (WMF) (talk) 11:14, 10 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Can't click on villages or jobs.

Can't click on villages or jobs. Please help. It's been this way for almost a week. My user id is AgingHippie1950. 68.104.105.99 (talk) 23:46, 9 March 2018 (UTC)

Which website is this related to? AhmadF.Cheema (talk) 00:45, 10 March 2018 (UTC)

apierror-visualeditor-docserver-http: HTTP 404.

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi,

i get the 404 if i try to open the Editor, here my cfg:

/etc/mediawiki/parsoid/config.yaml

       mwApis:
       - # This is the only required parameter,
         # the URL of you MediaWiki API endpoint.
         uri: 'https://wiki.anzahtest.de/api.php'
         # The "domain" is used for communication with Visual Editor
         # and RESTBase.  It defaults to the hostname portion of
         # the `uri` property below, but you can manually set it
         # to an arbitrary string.
         domain: 'ttps://wiki.anzahtest.de'  # optional

LocalSettings.php

  1. configuration extension (VisualEditor)

$wgDefaultUserOptions['visualeditor-enable'] = 1; $wgHiddenPrefs[] = 'visualeditor-enable'; $wgVirtualRestConfig['modules']['parsoid'] = array( 'url' => 'http://185.233.105.115:8142', ); 79.200.92.145 (talk) 14:03, 10 March 2018 (UTC)

You miss "h" in domain: 'ttps://wiki.anzahtest.de'. 星耀晨曦 (talk) 16:52, 10 March 2018 (UTC)
Fixed it and got the following error in the parsoid. log
{"name":"parsoid","hostname":"v22018034352662523","pid":28268,"level":60,"err":{"message":"Invalid domain: wiki.anzahtest.de","name":"../src/lib/index.js","stack":"../src/lib/index.js: Invalid domain: wiki.anzahtest.de\n    at errOut (/usr/lib/parsoid/src/lib/api/routes.js:31:13)\n    at routes.v3Middle (/usr/lib/parsoid/src/lib/api/routes.js:106:11)\n    at Layer.handle [as handle_request] (/usr/lib/parsoid/node_modules/express/lib/router/layer.js:95:5)\n    at next (/usr/lib/parsoid/node_modules/express/lib/router/route.js:137:13)\n    at Route.dispatch (/usr/lib/parsoid/node_modules/express/lib/router/route.js:112:3)\n    at Layer.handle [as handle_request] (/usr/lib/parsoid/node_modules/express/lib/router/layer.js:95:5)\n    at /usr/lib/parsoid/node_modules/express/lib/router/index.js:281:22\n    at param (/usr/lib/parsoid/node_modules/express/lib/router/index.js:354:14)\n    at param (/usr/lib/parsoid/node_modules/express/lib/router/index.js:365:14)\n    at param (/usr/lib/parsoid/node_modules/express/lib/router/index.js:365:14)\n    at param (/usr/lib/parsoid/node_modules/express/lib/router/index.js:365:14)\n    at param (/usr/lib/parsoid/node_modules/express/lib/router/index.js:365:14)\n    at Function.process_params (/usr/lib/parsoid/node_modules/express/lib/router/index.js:410:3)\n    at next (/usr/lib/parsoid/node_modules/express/lib/router/index.js:275:10)\n    at /usr/lib/parsoid/src/lib/api/ParsoidService.js:170:3\n    at Layer.handle [as handle_request] (/usr/lib/parsoid/node_modules/express/lib/router/layer.js:95:5)","httpStatus":404,"suppressLoggingStack":true,"levelPath":"fatal/request"},"msg":"Invalid domain: wiki.anzahtest.de","time":"2018-03-10T17:11:40.587Z","v":0} 79.200.92.145 (talk) 17:12, 10 March 2018 (UTC)
Try set domain: 'wiki.anzahtest.de' 星耀晨曦 (talk) 17:38, 10 March 2018 (UTC)
Perfect thank you :D 79.200.92.145 (talk) 19:35, 10 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Filter for preventing content removal

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi. Could anyone please give me a filter for AbuseFilter to prevent anonymous users from removing content from pages? 2001:16B8:2B25:5A00:8C9F:ECE6:5E28:DDC5 (talk) 19:29, 10 March 2018 (UTC)

Wikipedia's New user blanking articles should work with some modifications such as a check for anonymous users.
This probably can be done, by including the following at the beginning of the rule:
user_age = 0 &
AhmadF.Cheema (talk) 20:58, 10 March 2018 (UTC)
But isn't that one for blanking articles? I would need one that prevents at least a minimum amount of content removal (say roughly three sentences). 2001:16B8:2B25:5A00:8C9F:ECE6:5E28:DDC5 (talk) 21:22, 10 March 2018 (UTC)
From what I understand, the filter checks whether the article page's size was greater than 300 and then if after the edit the new size has been reduced to less than 50, the filter gets triggered.
You can modify the base filter according to your specific requirements. For example:
user_age = 0 &
( article_namespace == 0 &
  ( old_size > new_size + 30
    ( 
...
Something similar might work. AhmadF.Cheema (talk) 07:59, 11 March 2018 (UTC)
From what I see there, the filter will no longer check for the size of the page, but will only get triggered if the user has removed 30 bytes or more? Am I right? 2001:16B8:2BC6:4A00:8D16:62B0:384B:98A0 (talk) 12:07, 11 March 2018 (UTC)
It should work like this, but I haven't tested the filter, so can't be sure.
By-the-way, there was a mistake before, I updated it (replacing the minus with the plus). AhmadF.Cheema (talk) 13:19, 11 March 2018 (UTC)
Will you please post the entire filter with your modifications? Because I am trying to add the modifications, but I keep getting a "missing (" error. 2001:16B8:2BC6:4A00:8D16:62B0:384B:98A0 (talk) 13:34, 11 March 2018 (UTC)
A better foundation could be Large deletion from article by new editors.
Try the following:
edit_delta < -30 &
(
article_namespace == 0 &
(
user_age = 0 &
(
 ! "#redirect" in lcase(added_lines)
)
)
) AhmadF.Cheema (talk) 14:40, 11 March 2018 (UTC)
Thank you! Seems to be working according to tests. 2001:16B8:2BC6:4A00:8D16:62B0:384B:98A0 (talk) 16:46, 11 March 2018 (UTC)
One last question. If I want the filter to prevent regular, registered users, what do I need to change? I assume user age, but which value do I need? 2001:16B8:2B5F:5A00:4071:EDA3:AC6D:371B (talk) 20:51, 12 March 2018 (UTC)
Also, if I want to prevent the user from removing content from the mainspace and the category namespace? I tried adding 14 next to 0 &, but it doesn't work. How do I enter multiple values and then separate them? 2001:16B8:2B5F:5A00:4071:EDA3:AC6D:371B (talk) 20:59, 12 March 2018 (UTC)
For regular, registered users, instead of user_age = 0 use "user" in user_groups.
For namespaces, not sure if multiple values can be added, unless they can take the form of a comparison (e.g. article_namespace % 2 == 1).
For now, the following should work:
article_namespace == 0 & article_namespace == 14 &
(
...
)
For details, see Extension:AbuseFilter/Rules format especially #All variables. AhmadF.Cheema (talk) 21:15, 12 March 2018 (UTC)
Thank you! 2001:16B8:2BB5:DC00:2880:489B:4E:AA08 (talk) 22:39, 14 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to create a Main Page for mobile version Wikipedia?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi,

I can't figure out how to create a mobile Main Page like English Wikipedia (https://en.m.wikipedia.org/wiki/Main_Page) for a Wikipedia project. My local version has mobile views for regular pages, but it seems the Main Page needs to be created manually. How to do that? A-lú-mih (talk) 03:14, 11 March 2018 (UTC)

Just like by default a MediaWiki installation's Main page does not look anything like Wikipedia's and various templates and other source code has to be added to make it appear similar to the Wikipedia's version.Similar is the case for the mobile version of the Main page.
In the source code for the Main page, there are present "mp-" id attributes. In mobile view on the Main page, when an element is found to be marked with the attribute, that element will be shown and all other elements will be hidden. You'll have to study the code to see how you can fit it for your own Wiki. AhmadF.Cheema (talk) 08:09, 11 March 2018 (UTC)
Update
Assuming you are asking in reference to https://zh-min-nan.wikipedia.org/wiki/Thâu-ia̍h; you will need to enable the "mp-" tags by adding the following in your LocalSettings.php:
$wgMFSpecialCaseMainPage = true;
The extension code in order to disable mf- and mp- tags was modified way back in Jun, 2016 in response to a quite old (and still ongoing) 2011 task. $wgMFSpecialCaseMainPage was deprecated and disabled by default. AhmadF.Cheema (talk) 08:35, 11 March 2018 (UTC)
Thanks. Your answer makes it very clear. A-lú-mih (talk) 08:53, 11 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

API Error

When connecting via browser, I get the results fine, however when I try to connect via my Node.js app, I can't seem to connect to the server. I am using the built-in https.get command. 66.86.121.157 (talk) 10:48, 11 March 2018 (UTC)

http://en.wikipedia.org/
Can't connect to the basic site. 66.86.121.157 (talk) 11:24, 11 March 2018 (UTC)
http://en.wikipedia.org/ does not exist. https://en.wikipedia.org/ does. Malyacko (talk) 12:17, 11 March 2018 (UTC)
I tried it both ways and neither worked. 66.86.121.157 (talk) 13:09, 11 March 2018 (UTC)
The error is
"      throw er; // Unhandled 'error' event
      ^
Error: socket hang up
    at createHangUpError (_http_client.js:254:15)
    at TLSSocket.socketOnEnd (_http_client.js:346:23)
    at emitNone (events.js:91:20)
    at TLSSocket.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)" 66.86.121.157 (talk) 13:36, 11 March 2018 (UTC)
This happens just trying to connect to en.mediawiki.org, much less actually doing anything with the query. I've made a user-agent already, so it can't be that, 66.86.121.157 (talk) 13:37, 11 March 2018 (UTC)
en.mediawiki.org does not exist. Malyacko (talk) 23:39, 11 March 2018 (UTC)

Some items from the wiki abstracts dump miss the correct content

I download the file zhwiki-latest-abstract.xml from https://dumps.wikimedia.org/zhwiki/latest/, and plan to use it as a dict. But after extract the data to database, I found some items's abstract field have some/just code from the meta block of the wikicode, below are several examples:

item: 阿基米德

abstract: |birth_date = 約公元前287年

item: 古巴

abstract: (西班牙語)“无祖国,毋宁死,我们将取得胜利!”}}

item:

abstract: , in Handbook of Chemistry and Physics 81st edition, CRC press.

As you can see, the abstracts art not from the main content of the page, and sometimes not a whole paragraph/sentence.

I think the abstract should be the first paragraph of the passage or from a special block, isn't it? Gonzalo Willia (talk) 13:31, 11 March 2018 (UTC)

difficulty up loading

(607) ERROR: Unable to properly interpret your GEDCOM file. The problem may be caused by some incompatibility between our software and the genealogy program you are using. Make sure you have character encoding set to UTF-8 in your genealogy program before you export the GEDCOM. Contact site administrator if you need help. How can I fix this 184.55.213.42 (talk) 01:18, 12 March 2018 (UTC)

Wrong support forum. This place is only for support regarding MediaWiki software. AhmadF.Cheema (talk) 07:09, 12 March 2018 (UTC)

Recent changes special page

Hello all! How can I have improved recent chages page like here on Mediawiki [[Special:RecentChanges]]

Is it an extension or built in to the new version? Fokebox (talk) 11:22, 12 March 2018 (UTC)

See Edit Review Improvements/New filters for edit review.
As far as I've read, this appears to be a Wikimedia Foundation specific improvement. AhmadF.Cheema (talk) 12:51, 12 March 2018 (UTC)
Thank you ... so as far as I understood too this function is only for wikimedia website, right? Fokebox (talk) 14:24, 12 March 2018 (UTC)

Preview Not Working (HTTP Error)

My install

MediaWiki 1.27.4
PHP 5.6.33 (cgi-fcgi)
MySQL 5.6.36-82.1-log
ICU 4.8.1.1

idenprotectwiki.com

When I go to edit and then select preview I get an http error and the preview does not load.

I have added

$wfLoadExtension( 'WikiEditor' ); $wgDefaultUserOptions['usebetatoolbar'] =1;

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

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

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

and

$wgGroupPermissions['*']['read'] = true;

to properties.

Chrome Dev tools imply I am getting a http 400 error on a call to /api.

The site is a hosted site. Some googling implies that an issue with .htaccess is a possible cause ? ChrisRussellIden (talk) 12:43, 12 March 2018 (UTC)

Running RESTBase for VisualEditor on a private wiki

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hey there! I want to run VisualEditor on a private wiki. Now, to switch from wikitext to visual edit mode and keep the changes made, one needs to have RESTBase running on said wiki, as also noted on Extension:VisualEditor#Switching_between_Wikitext_Editing_and_VisualEditor.

I've got all of this working, but could not find any hint how to stop RESTBase from exposing every pages content through /api/rest_v1/page/html/<pagename>. That means, either all users (including unauthenticated ones) can access the api and thus read all pages, or none can (turning off restbase) and thus VE doesn't allow switching smoothly.

In some places (e.g. Extension talk:VisualEditor/2016#h-private_wiki_with_RESTBase?-2016-06-09T12:31:00.000Z and on IRC) I got the impression that this might just not be possible, leaving downstream users with the choice of either having a private wiki OR enabling switching edit modes without data loss. So far neither any documentation I could find mentioned this, nor did I find someone confident of confirming that. So I'd appreciate both help, be it "here's how it should works" or someone saying "I know this can't work". ;-)

Thanks beforehand! EddieGP (talk) 14:02, 12 March 2018 (UTC)

Hello,
Unfortunately, RESTBase does not inherit global preferences from MediaWiki, which means that it doesn't know if a wiki is public or not. You described your current choices correctly: you can either enable RESTBase and have the HTML of the pages be publicly available or renounce the switch-edit-mode feature.
That said, we are aware of the shortcoming. For further developments on this issue, you can subscribe to the relevant phabricator task.
Cheers,
Marko Mobrovac-WMF (talk) 14:01, 22 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Upgrading the version, WYSIWYG editor is not working. Alternatives?

I recently upgraded my version to 1.30.x but the WYSIWYG editor extensions is not working anymore. I can't use VisualEditor without a dedicated server, which is not the case. What should I do?

Thanks! 2804:14C:483:7503:0:0:0:1 (talk) 19:42, 12 March 2018 (UTC)

Notification from edit summary

MediaWiki message delivery (talk) 21:09, 12 March 2018 (UTC)

MediaWikiChat V.2.18 /me doesn't work

MediaWiki V.1.30.0

MediaWikiChat V.2.18

1.Download all files and place them to extensions/MediaWikiChat

2.Add "wfLoadExtension( 'MediaWikiChat' );" at the bottom of LocalSettings.php

3.Go to Your_wiki/mw-config and update your MediaWiki (That will automatically create the necessary database tables that this extension needs. )

4.Add "$wgChatMeCommand = true;" below the line of installing MediaWikiChat

But it doesn't work

P.S. I had to update MediaWiki two times because the first time necessary database tables weren't created 2A02:2698:2C23:D526:DC89:4420:A486:2627 (talk) 08:05, 13 March 2018 (UTC)

What exactly is the error message you are receiving?
Also, have you tried updating the database through update.php? Sometimes the web updater doesn't work completely correctly. AhmadF.Cheema (talk) 08:11, 13 March 2018 (UTC)
There's no error. This command just doesn't work. It's just a message 2A02:2698:2C23:D526:DC89:4420:A486:2627 (talk) 08:19, 13 March 2018 (UTC)
Try asking at Extension talk:MediaWikiChat too. The page appears to be on some of the developers' watchlists. AhmadF.Cheema (talk) 11:59, 13 March 2018 (UTC)

Stacking Templates/Tables

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


First-time user here of wikis (MediaWiki 1.29.2). I am making a wiki and am tinkering with templates. I made two templates, the second of which (when used) incorporates all the data from the first template (or at least that's the goal). Both are designed as tables. Here is the code for Template1:

{| class="wikitable" style="width: 300px; margin-left: 10px; float: right;"
! colspan="2" |{{PAGENAME}}
|-
| style="width: 100px;" |<small>'''Example1'''</small>
|<small>{{{Example1}}}</small>
|-
|<small>'''Example2'''</small>
|<small>{{{Example2}}}</small>
|-
|<small>'''Example3'''</small>
|<small>{{{Example3}}}</small>
|}

Basically, it's an Infobox.

Template two is virtually the exact same, except I would like Template1 to sit flushly atop Template 2. I can achieve the look I want with the following code, but it requires me to copy the Template1 info into Template2 each time I make a change:

{| class="wikitable" style="width: 300px; margin-left: 10px; float: right;"
! colspan="2" |{{PAGENAME}}
|-
| style="width: 100px;" |<small>'''Example1'''</small>
|<small>{{{Example1}}}</small>
|-
|<small>'''Example2'''</small>
|<small>{{{Example2}}}</small>
|-
|<small>'''Example3'''</small>
|<small>{{{Example3}}}</small>
|-
! colspan="2" |Template2
|-
|<small>'''Example4'''</small>
|<small>{{{Example4}}}</small>
|-
|<small>'''Example5'''</small>
|<small>{{{Example5}}}</small>
|-
|<small>'''Example6'''</small>
|<small>{{{Example6}}}</small>
|}

If I used {{Template1}} inside Template2, it appears, but it doesn't stack like I want. Instead, it appears beside Template2, not atop.

You all are insanely better at this, so any help is most appreciated. Gmlacey (talk) 14:16, 13 March 2018 (UTC)

There are a few ways to achieve this.
Template01:
{| class="wikitable" style="width: 300px; margin-left: 10px; float: right;"
! colspan="2" |{{PAGENAME}}
|-
| style="width: 100px;" |<small>'''Example1'''</small>
|<small>{{{Example1}}}</small>
|-
|<small>'''Example2'''</small>
|<small>{{{Example2}}}</small>
|-
|<small>'''Example3'''</small>
|<small>{{{Example3}}}</small>
|-
{{{morecolumns|}}}
|}
Template02:
{{Template01
|morecolumns=! colspan="2" {{{!}}Template2
{{!}}-
{{!}}<small>'''Example4'''</small>
{{!}}<small>{{{Example4}}}</small>
{{!}}-
{{!}}<small>'''Example5'''</small>
{{!}}<small>{{{Example5}}}</small>
{{!}}-
{{!}}<small>'''Example6'''</small>
{{!}}<small>{{{Example6}}}</small>
}}
In Template02, the {{!}} represents simple | which cannot simply be used here because it would be mistaken as one of the variables of Template01. AhmadF.Cheema (talk) 16:03, 13 March 2018 (UTC)
You are a genius! It worked. Thank you so much; it was driving me mad. Thank you! Gmlacey (talk) 17:44, 13 March 2018 (UTC)
Thanks to AhmadF.Cheema, the tables/templates stack up like I want, but now I can't seem to enter the data for parameters on the actual page Template2 is on. The normal way of using pipes doesn't work out. Any thoughts on how to get data into the parameters covered by both templates in Template2? Thank you! Gmlacey (talk) 01:51, 14 March 2018 (UTC)
My bad. Change your Template02 to the following:
{{Template01
 |Example1={{{Example1}}}|Example2={{{Example2}}}|Example3={{{Example3}}}|
 |morecolumns=! colspan="2" {{{!}}Template2
 {{!}}-
 {{!}}<small>'''Example4'''</small>
 {{!}}<small>{{{Example4}}}</small>
 {{!}}-
 {{!}}<small>'''Example5'''</small>
 {{!}}<small>{{{Example5}}}</small>
 {{!}}-
 {{!}}<small>'''Example6'''</small>
 {{!}}<small>{{{Example6}}}</small>
}}
AhmadF.Cheema (talk) 03:52, 14 March 2018 (UTC)
Thank you so much! Works! Gmlacey (talk) 13:41, 14 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

site name on each wiki page

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


HI,

on my wiki, I have the site name written on each page, just under the name of the page. I haven't found how to avoid this.

Is somebody can help me ?

Thanks

Rene Pacha35 (talk) 15:58, 13 March 2018 (UTC)

Edit your Wiki's MediaWiki:Tagline. AhmadF.Cheema (talk) 16:08, 13 March 2018 (UTC)
That's OK, thank you very much. Pacha35 (talk) 22:39, 13 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to display local images in wiki on Windows 10 WAMP?

Hi There!

My Issue

I have a local install of MediaWiki running on WAMP in Windows 10. I want to display images which exist on my system (local hard drive and external attached USB hard drives), but not under the wamp64/www (localhost) directory. Maybe c:\%userprofile%\desktop\sample image with spaces.png. How can I do this?

What I have tried so far that hasn't worked:

  1. Enabled $wgAllowExternalImages to true (file uploads already work, but what I'm trying to do avoids duplicating images by NOT uploading, and instead referring to them as external images hosted locally), but it doesn't seem to be working.
  2. Ran RunJobs.php. No jobs remaining.
  3. I made a sandbox page with this content:
Try 1
file:///C:/wamp64/www/hepperlepedia/resources/assets/some_image.png

Try 2
C:/wamp64/www/hepperlepedia/resources/assets/some_image.png

Try 3
c:/wamp64/www/hepperlepedia/resources/assets/some_image.png

Try 4
[file:///C:/wamp64/www/hepperlepedia/resources/assets/some_image.png]

Try 5
https://i0.wp.com/ehepperle.com/in-progress/feelheal/3/a/wp-content/uploads/2018/03/ehw-website-logo-placeholder-1.png?w=113

All to no avail. I'm not sure where else to go from here.

My Questions

  1. How can I make images located on my hard drive locally display in my local installation of MediaWiki on a Windows 10 machine?
  2. Why isn't $wgAllowExternalImages working? I've set it to true, but even external files hosted online on a domain (as in Try 5) don't display.

Any help is appreciated. Ehtech2000 (talk) 17:05, 13 March 2018 (UTC)

For external image to work, you must use a HTTP or HTTPS URL (not file: nor c:\), and the URL musth end with an image extension (.jpg, .png, .gif...) None of your examples fit that rule. The last one could be circumvented adding "&ext=.png" at the end, for example.
For local images to work as external images, you have to "publish" them in the webserver, so they are accessible from an URL. This could easily be done by adding a new virtual directory. See also https://httpd.apache.org/docs/2.4/urlmapping.html
There's no other way if you don't really want to reupload and duplicate them in MediaWiki. If you decide to upload them to your wiki, the importImages.php script may be useful. Ciencia Al Poder (talk) 10:30, 14 March 2018 (UTC)
Thanks, I check those out. Ehtech2000 (talk) 11:14, 22 March 2018 (UTC)

Nothing happens when I click Edit button

Hello! There is no action when I click the 'edit' button. [https://nordhausen-wiki.de/index.php?title=13._M%C3%A4rz Example]. What's wrong? 2003:8C:6E02:1768:A0B9:D512:BA7:23FF (talk) 18:18, 13 March 2018 (UTC)

Working fine for me.
Are you using any script blocking extensions? Maybe try opening the link in a different browser. AhmadF.Cheema (talk) 18:30, 13 March 2018 (UTC)
It might be that your range of IP addresses are blocked from editing and that you need to have an account to make edits. This is commonly done on large sites as a mean of fighting vandalism from hard-to-track or highly volatile IP addresses. For example, I own a mobile hotspot and I must log into wikipedia in order to make edits. The same may be true for this wiki too 24.192.109.217 (talk) 23:52, 13 March 2018 (UTC)

UniversalLanguageSelector

I am unable to down this extension. The download keeps failing after a few kilobytes 24.69.62.18 (talk) 23:13, 13 March 2018 (UTC)
Please provide exact steps how and where you downloaded something. 86.49.16.183 (talk) 15:26, 14 March 2018 (UTC)
Maybe try downloading using your phone on it's mobile network, and then importing the file to your computer? 24.192.109.217 (talk) 23:48, 13 March 2018 (UTC)

Edit toolbar extension not working in ResourceLoader JS debug mode

I didn't see anything prior, so asking for help. Scenario is that a custom extension on our wiki extends the toolbar on the edit page. Works fine in "normal" mode. JS code loads, but doesn't execute when the url uses "&debug=true" to debug client side Java script loaded by ResourceLoader.

Details:

1) Was rock solid on earlier versions of MediaWiki. Running on WAMP with latest stable versions of all components.

2) Key module trigger is this JavaScript:

$.when( mw.loader.using( 'ext.wikiEditor.toolbar' ), $.ready

).then( customizeToolbar() );

I believe this is where the bug is, whether with my code or some other component. Tough/impossible to debug as the error only occurs in debug mode.

3) Extension's JS file loaded using ResourceLoader. Extension.json includes:

"Hooks": {

 "EditPage::showEditForm:initial": "PWEditPage::onEditPage_showEditForm_initial"

},

Code in the invoked method is one line of:

       $output->addModules( 'ext.PortWizard' );

Code gets to browser, so don't think server side is the problem.

4) Reproduced on Edge and Chrome (also on Windows). No error type of output in browser console.

Any ideas?

Thanks,

Jason Iowajason (talk) 01:12, 14 March 2018 (UTC)

It looks like the js to invoke the script is not executed. You've said you have a the PHP code to send the JS to the browser, and you've told us the code gets to the browser, but we don't know how the code is to be invoked. Is there a document.onLoad or something? MarkAHershberger(talk) 16:41, 14 March 2018 (UTC)
Thanks for your assistance. The event I thought I should trigger of off is the "ready" event. The root level of the JS file contains the code in #2 above. This is a simplification of code from Extension:WikiEditor/Toolbar customization. Streamlined some of the checks in JS due to me controlling the browsers and other settings of the client machines. Iowajason (talk) 02:39, 15 March 2018 (UTC)
Maybe it's some sort of timing problem where your code executes before the toolbar is initialized or something like that. Try to add console.log() statements to JavaScript to detect the order of events, you may need to execute your function after a small timeout to account for anything that needs to be initialized first. Ciencia Al Poder (talk) 10:42, 15 March 2018 (UTC)

How do I change the SQL database?

It was setup to use mysql on the server itself. I want to move it to a SQL server. How is that done? 208.38.247.133 (talk) 14:41, 14 March 2018 (UTC)

MySQL is a kind of SQL server. I assume you want to move a wiki. 2001:16B8:1054:5800:881E:A9DC:4453:70 (talk) 15:47, 14 March 2018 (UTC)
If, by "a SQL server", you mean "A Microsoft SQL server", you can probably dump out the DB from MySQL and then perform an SQL import into the new DB server. You would then have to adjust the settings in your LocalSettings.php to point to the new DB. MarkAHershberger(talk) 16:37, 14 March 2018 (UTC)

Parserfunctions doen't work

HI,

I use MediaWiki 1.30.0 and 1.29.2.

Wheni try to use parserfunctions, for exemple in an infobox to select parameters with #if test, nothing happens.

The extension is insyalled, and Localsetting.php is correct.

What is wrong ?

Thanks Pacha35 (talk) 16:33, 14 March 2018 (UTC)

You say that the extension would be installed, but let me ask anyway: Is it listed on the Special:Version page in your wiki? 2001:16B8:1075:A700:1141:C0FD:CECF:8EA9 (talk) 21:39, 14 March 2018 (UTC)
Yes, as shown on the pic joigned
[1] Pacha35 (talk) 11:59, 15 March 2018 (UTC)
Question : is it possible that depends of the provider (OVH) ? Pacha35 (talk) 11:24, 16 March 2018 (UTC)

New installation questions

Hi, I have a fresh installation at xenial/nginx/php-fpm7.0/mysql

While going to: mywiki.com and hit log in, redirects me to: http://mywiki.com/wiki/Special:UserLogin

But, going to mywiki.com.xcade.net/index.php?title=Main_Page and hit log in, goes to : http://mywiki.com/index.php?title=Special:UserLogin&returnto=Main+Page&returntoquery=

I'm using simplesamlphp and installed pluggableauth (haven't configured SSO yet) I'm testing http first and that everythin works okay.

Also,

Can't access /Special:Version though my permissions are 755 folder and 665 for php at /includes/specials

IDK why some pages won't load as they should and returns 404.

Any suggestions?

Thanks! 201.216.192.73 (talk) 17:09, 14 March 2018 (UTC)

Sounds to me like you have to adjust things in the nginx configuration.
We have an example on this page: Manual:Short URL/Nginx. Also you might want to use the tool by Redwerks, hich is linked on that page, to create a configuration, which fits your needs! 2001:16B8:1075:A700:1141:C0FD:CECF:8EA9 (talk) 21:38, 14 March 2018 (UTC)
Nothing about your wiki appears out of order.
What URL do you try for /Special:Version? The directory permissions do not affect this since all requests go through the top-level index.php and are dispatched from there. MarkAHershberger(talk) 22:12, 14 March 2018 (UTC)

404 page Tools timescale

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi,

sry if this is the wrong place. The "Report a problem" section was not about content.

Clicking

" ... sometime before the event 251.902 million years ago ..."

in the lede, near the end of the second paragraph, in the Wiki article

https://en.wikipedia.org/wiki/Eurypterid

leads to a 404 page

https://tools.wmflabs.org/timescale/?Ma=251.902

Pls forward to the proper recipient or inform me on how to do this.

TiA!

T, AKA Unregistered Wiki Lurker 88.89.217.90 88.89.217.90 (talk) 21:11, 14 March 2018 (UTC)

The proper way to report this is to file a task in Phabricator. MarkAHershberger(talk) 21:16, 14 March 2018 (UTC)
Hi,
Thank you for your advice.
Seems this requires registration, so I'll just leave it be.
MVH,
T 88.89.217.90 (talk) 02:41, 15 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Bug in imagemagick package

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


If I want to start the program "convert" I get a error:


$ convert CANNOT LINK EXECUTABLE "convert": cannot locate symbol "FT_Done_MM_Var" referenced by "/data/data/com.termux/files/usr/lib/libharfbuzz.so"... Aborted $

Would be nice if you can fix it. I want to reduce my pictures on the phone.

Greets Ben 1.152.104.219 (talk) 00:08, 15 March 2018 (UTC)

You will have to ask in an ImageMagick forum or a forum of whatever distribution / operating system you are using when it comes to symbols offered by the Harfbuzz library provided by your distribution.
This problem does not sound related to MediaWiki. Malyacko (talk) 14:56, 15 March 2018 (UTC)
yeah you are right I'm in the wrong forum. Thx anyway. 210.11.186.161 (talk) 22:49, 15 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Other WMF project content insert

Hi, is it possible to insert content on a WMF project, from other WMF project. I mean the way we insert images from Commons. Is it possible to insert the same way other type of information? Lets exclude Wikidata. Juandev (talk) 06:53, 15 March 2018 (UTC)

Could you be more specific, please? Malyacko (talk) 14:54, 15 March 2018 (UTC)

Post Media wiki Installation Steps

Installation Ended successfully. Added LocalSettings.php to root folder(near index.php).

How to start using the wiki now? 171.161.48.16 (talk) 06:57, 15 March 2018 (UTC)

https://en.wikijournal.org/wiki/How_to_create_website_on_MediaWiki Fokebox (talk) 09:24, 15 March 2018 (UTC)

How to create app for iOS and Android of my mediawiki website?

Does somebody have such experience? Fokebox (talk) 09:30, 15 March 2018 (UTC)

The current developers of Wikimedia's mobile apps do. The developer of the original iOS app, Hampton, has experience with that. Maybe you could reach out to them. MarkAHershberger(talk) 18:22, 15 March 2018 (UTC)
Thank you ... but didn't understand exactly what, who I should try to contact& Hampton? What is it? Fokebox (talk) 07:10, 16 March 2018 (UTC)
Hampton Catlin is the developer behind the original Wikipedia app for iOS:
Catlin wrote ... a Wikipedia browsing client which was later purchased by the Wikimedia Foundation. MarkAHershberger(talk) 17:56, 16 March 2018 (UTC)

Image Upload ERROR

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Helllo I installed the last version of mediawiki on ubuntu server and I experienced a problem with Upload Image. I enable it from configuration,i have php Enable upload,I have in Local Settings upload image true all of them(2),i have permission in image folder for write (root,www-data) i have permission in all folder from server,webserver side,I have permission for everything I did chown,chmod,777 permission even in apache ,i have upload in php.ini,even in php5,php7,I restarted services,I upgrade mysql(1500 pages read on google about this problem) AND I STILL GET this ERROR Could not create directory "mwstore://local-backend/local-public/7/72". Raulcpop (talk) 10:51, 15 March 2018 (UTC)

The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

MediaWiki-Extension GeoData

Hello,

I have a problem with the GeoData extension on MediaWiki. I've installed MediaWiki on XAMPP and want to display the WGS1984 and the CH1903 coordinates in a table. When I copy the templates from the german version of https://de.wikipedia.org/wiki/Matterhorn the coordinates are shown correct with the following error:

{{#coordinates:}}: cannot have more than one primary tag per page

How can I blank off this error message because there's no error on Wikipedia?

Thanks. Id3839315 (talk) 11:49, 15 March 2018 (UTC)

Look at the Special:Version page on your wiki and verify that you have the same version of the extension that is on dewiki. MarkAHershberger(talk) 18:17, 15 March 2018 (UTC)

Image Second Error

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


After reinstalling entire system plus media wiki finally i uploaded a picture https://imgur.com/gVOpqyF.But after Press Upload https://imgur.com/gVOpqyF i get this error https://imgur.com/0kXuVru Raulcpop (talk) 13:51, 15 March 2018 (UTC)

See Manual:Configuring file uploads and Manual:How to debug Malyacko (talk) 14:53, 15 March 2018 (UTC)
I resolved: delete htcaccess file from images/ Raulcpop (talk) 15:16, 15 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

merge users error

Hi! when I merge users and delete user ,error.

Detail:

[01b5974060ea498cdc53a344] /wiki/%E7%89%B9%E6%AE%8A:%E5%90%88%E5%B9%B6%E7%94%A8%E6%88%B7 Wikimedia\Rdbms\DBQueryError from line 1149 of /var/www/html/w/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: UPDATE `watchlist` SET wl_user = '26' WHERE wl_user = '28'

Function: MergeUser::mergeDatabaseTables

Error: 1062 Duplicate entry '26-0-\xE9\xA6\x96\xE9\xA1\xB5' for key 'wl_user' (localhost)

plz give me a hand. Thanks! Flame qi (talk) 15:18, 15 March 2018 (UTC)

Could you file a task on Phabricator for this? MarkAHershberger(talk) 18:15, 15 March 2018 (UTC)
I was not registing on Phabricator ,so I could not file a task for this.Would you like file a task for this? Thank you ! Flame qi (talk) 06:34, 16 March 2018 (UTC)
You should do some preliminary investigation to help us solve your problem, e.g. enable debug log and post logs related to user merge action to here. 星耀晨曦 (talk) 06:46, 16 March 2018 (UTC)
In addition, you need to specify the version number of mediawiki and UserMerge extension you are using. You can also try run update.php. (Note: Please backup your database before run update.php). 星耀晨曦 (talk) 07:00, 16 March 2018 (UTC)
This issue has been reported multiple times already in Extension talk:UserMerge, but nobody has cared to fix it yet... Ciencia Al Poder (talk) 10:10, 16 March 2018 (UTC)

High Availibility

What is the best way to make Media Wiki highly available? 208.38.247.133 (talk) 15:59, 15 March 2018 (UTC)

By making "Media Wiki" publicly available over the internet. AhmadF.Cheema (talk) 16:45, 15 March 2018 (UTC)
I mean, if the Media Wiki server fails, whats the best way to setup a backup. 208.38.247.133 (talk) 16:58, 15 March 2018 (UTC)
If the server fails and you want your website (no matter the kind) to be available still, then you need to have some sort of load balancer configured. Your question isn't really about MediaWiki, so I'll point you to a question on Stack Exchange that should help. MarkAHershberger(talk) 18:11, 15 March 2018 (UTC)

Convert Date Format

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi All. Using MediaWiki 1.29.2, I’m trying to take the manual entry of a date (entered as, January 1, 2018) and automatically have it rendered differently elsewhere on the page (rendered as, 2018-01-01). Any thoughts on how to best accomplish this? Many thanks again! Gmlacey (talk) 21:44, 15 March 2018 (UTC)

Looks like not a mediawiki issue, you can refer en:Template:Date. 星耀晨曦 (talk) 06:51, 16 March 2018 (UTC)
It works! Thank you! Gmlacey (talk) 01:30, 18 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Parsoid & Mediawiki - Moving to a new server

Hi Guys,

We have been running Private MediaWiki with VisualEditor and using Parsoid provided by a Heroku instance for some time and this has worked with out an issue.

We recently needed to move our Wiki to a new host and change the hosting URL (this part may be important).

So I updated my $wgServer & $wgScriptPath with the new domain and path. I then spun up a new Heroku Instance for this new url. I also updated the $wgVirtualRestConfig url for the new Heroku App.

Now when testing and attempting to edit a page checking the log on Heroku I receive the following error: "Your wiki requires a logged-in account to access the API."

If I make the wiki public readable the editor, change $wgGroupPermissions['*']['read'] = false; to $wgGroupPermissions['*']['read'] = true; the editor works fine.

The only thing that has changed as mentioned is we have moved to a new host and we moved from a subdomain to a folder.

So we have gone from wiki.example.net to www.example.net/wiki.

Any help you can give would be appreciated. 58.96.34.75 (talk) 02:42, 16 March 2018 (UTC)

It isn't clear to me: Does your new wiki require a login? Did your old one?
What version of MediaWiki are you using? Is this the same version as your old one? MarkAHershberger(talk) 18:04, 16 March 2018 (UTC)

Hello,

Can someone tell me why MediaWiki is responding to every request with a header that sets the cpPosTime cookie?

This cookie (produced by the Apache backend serving MediaWiki) is causing Varnish to store a hit-for-pass in all of our pages, rendering our caching useless.

Debugging lead me to discover that when the Message Cache is disabled ($wgMessageCacheType = CACHE_NONE;) the cpPosTime cookie is not always returned, allowing varnish to cache. Without disabling the Message Cache, it appears that the Message Cache defaults to using the db. AFAICT, this makes every query to our MediaWiki site include a db write, causing the cpPosTime cookie to be set. Is this the desired default behaviour of MediaWiki?

This is occurring in our staging environment running Mediawiki 1.30.0, PHP 5.6.33, MariaDB 5.5.56-MariaDB, and ICU 50.1.2. In addition to upgrading Mediawiki, we're also adding varnish. Oh, and I've already disabled all MediaWiki extensions.

Both our production and staging environments have exactly 1 database. It is our master. We have no db slaves. There is no db replication.

Please help me to understand why our MediaWiki is setting the cpPosTime cookie for all requests, if this is normal behaviour, and--if so--how one should configure Varnish so it actually caches.

Thanks! Maltfield (talk) 05:19, 16 March 2018 (UTC)

I have $wgDebugLogFile & $wgDebugDBTransactions enabled, so I'll include this here for reference.
Here's the debug output when the $wgMessageCacheType variable is *not* set to CACHE_NONE
[DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: using request info {
    "IPAddress": "127.0.0.1",
    "UserAgent": "curl\/7.29.0",
    "ChronologyProtection": "true"
}
IP: 127.0.0.1
Start request GET /wiki/Michael_Log
HTTP HEADERS:
X-REAL-IP: 138.201.84.223
X-FORWARDED-PROTO: https
X-FORWARDED-PORT: 443
HOST: wiki.opensourceecology.org
USER-AGENT: curl/7.29.0
ACCEPT: */*
X-FORWARDED-FOR: 127.0.0.1
X-VARNISH: 494755
[caches] cluster: EmptyBagOStuff, WAN: mediawiki-main-default, stash: db-replicated, message: SqlBagOStuff, session: SqlBagOStuff
[caches] LocalisationCache: using store LCStoreDB
[CryptRand] openssl_random_pseudo_bytes generated 20 bytes of strong randomness.
[CryptRand] 0 bytes of randomness leftover in the buffer.
[DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: using request info {
    "IPAddress": "127.0.0.1",
    "UserAgent": "curl\/7.29.0",
    "ChronologyProtection": false
}
[DBConnection] Wikimedia\Rdbms\LoadBalancer::openConnection: calling initLB() before first connection.
[DBConnection] Connected to database 0 at 'localhost'.
[SQLBagOStuff] Connection 1064033 will be used for SqlBagOStuff
[session] SessionBackend "lg3t586cdk8n4q9ba89ug1su8ind99ck" is unsaved, marking dirty in constructor
[session] SessionBackend "lg3t586cdk8n4q9ba89ug1su8ind99ck" save: dataDirty=1 metaDirty=1 forcePersist=0
[cookie] already deleted setcookie: "osewiki_db_wiki__session", "", "1489629400", "/", "", "1", "1"
[cookie] already deleted setcookie: "osewiki_db_wiki_UserID", "", "1489629400", "/", "", "1", "1"
[cookie] already deleted setcookie: "osewiki_db_wiki_Token", "", "1489629400", "/", "", "1", "1"
[cookie] already deleted setcookie: "forceHTTPS", "", "1489629400", "/", "", "", "1"
[DBConnection] Connected to database 0 at 'localhost'.
Title::getRestrictionTypes: applicable restrictions to Michael Log are {edit,move}
[ContentHandler] Created handler for wikitext: WikitextContentHandler
Title::getRestrictionTypes: applicable restrictions to Maltfield Log are {edit,move}
OutputPage::checkLastModified: client did not send If-Modified-Since header
[DBPerformance] Expectation (writes <= 0) by MediaWiki::main not met (actual: 1):
query-m: REPLACE INTO `wiki_objectcache` (keyname,value,exptime) VALUES ('X')
#0 /var/www/html/wiki.opensourceecology.org/htdocs/includes/libs/rdbms/TransactionProfiler.php(219): Wikimedia\Rdbms\TransactionProfiler->reportExpectationViolated('writes', 'query-m: REPLAC...', 1)                                                                                                                                                                                
#1 /var/www/html/wiki.opensourceecology.org/htdocs/includes/libs/rdbms/database/Database.php(1037): Wikimedia\Rdbms\TransactionProfiler->recordQueryCompletion('query-m: REPLAC...', 1521165400.3345, true, 1)                                                                                                                                                                        
#2 /var/www/html/wiki.opensourceecology.org/htdocs/includes/libs/rdbms/database/Database.php(937): Wikimedia\Rdbms\Database->doProfiledQuery('REPLACE INTO `w...', 'REPLACE /* SqlB...', true, 'SqlBagOStuff::s...')                                                                                                                                                                  
#3 /var/www/html/wiki.opensourceecology.org/htdocs/includes/libs/rdbms/database/Database.php(2263): Wikimedia\Rdbms\Database->query('REPLACE INTO `w...', 'SqlBagOStuff::s...')
#4 /var/www/html/wiki.opensourceecology.org/htdocs/includes/libs/rdbms/database/DatabaseMysqlBase.php(497): Wikimedia\Rdbms\Database->nativeReplace('objectcache', Array, 'SqlBagOStuff::s...')                                                                                                                                                                                       
#5 /var/www/html/wiki.opensourceecology.org/htdocs/includes/objectcache/SqlBagOStuff.php(362): Wikimedia\Rdbms\DatabaseMysqlBase->replace('objectcache', Array, Array, 'SqlBagOStuff::s...')                                                                                                                                                                                          
#6 /var/www/html/wiki.opensourceecology.org/htdocs/includes/objectcache/SqlBagOStuff.php(376): SqlBagOStuff->setMulti(Array, 30)
#7 /var/www/html/wiki.opensourceecology.org/htdocs/includes/libs/objectcache/BagOStuff.php(545): SqlBagOStuff->set('osewiki_db-wiki...', 1, 30)
#8 /var/www/html/wiki.opensourceecology.org/htdocs/includes/libs/objectcache/BagOStuff.php(418): BagOStuff->add('osewiki_db-wiki...', 1, 30)
#9 [internal function]: BagOStuff->{closure}()
#10 /var/www/html/wiki.opensourceecology.org/htdocs/vendor/wikimedia/wait-condition-loop/src/WaitConditionLoop.php(92): call_user_func(Object(Closure))
#11 /var/www/html/wiki.opensourceecology.org/htdocs/includes/libs/objectcache/BagOStuff.php(429): Wikimedia\WaitConditionLoop->invoke()
#12 /var/www/html/wiki.opensourceecology.org/htdocs/includes/libs/objectcache/BagOStuff.php(472): BagOStuff->lock('osewiki_db-wiki...', 0, 30, 'MessageCache::g...')
#13 /var/www/html/wiki.opensourceecology.org/htdocs/includes/cache/MessageCache.php(762): BagOStuff->getScopedLock('osewiki_db-wiki...', 0, 30, 'MessageCache::g...')
#14 /var/www/html/wiki.opensourceecology.org/htdocs/includes/cache/MessageCache.php(420): MessageCache->getReentrantScopedLock('osewiki_db-wiki...', 0)
#15 /var/www/html/wiki.opensourceecology.org/htdocs/includes/cache/MessageCache.php(350): MessageCache->loadFromDBWithLock('en', Array, NULL)
#16 /var/www/html/wiki.opensourceecology.org/htdocs/includes/cache/MessageCache.php(991): MessageCache->load('en')
#17 /var/www/html/wiki.opensourceecology.org/htdocs/includes/cache/MessageCache.php(921): MessageCache->getMsgFromNamespace('Pagetitle', 'en')
#18 /var/www/html/wiki.opensourceecology.org/htdocs/includes/cache/MessageCache.php(888): MessageCache->getMessageForLang(Object(LanguageEn), 'pagetitle', true, Array)
#19 /var/www/html/wiki.opensourceecology.org/htdocs/includes/cache/MessageCache.php(829): MessageCache->getMessageFromFallbackChain(Object(LanguageEn), 'pagetitle', true)
#20 /var/www/html/wiki.opensourceecology.org/htdocs/includes/Message.php(1275): MessageCache->get('pagetitle', true, Object(LanguageEn))
#21 /var/www/html/wiki.opensourceecology.org/htdocs/includes/Message.php(842): Message->fetchMessage()
#22 /var/www/html/wiki.opensourceecology.org/htdocs/includes/Message.php(934): Message->toString('text')
#23 /var/www/html/wiki.opensourceecology.org/htdocs/includes/OutputPage.php(950): Message->text()
#24 /var/www/html/wiki.opensourceecology.org/htdocs/includes/OutputPage.php(998): OutputPage->setHTMLTitle(Object(Message))
#25 /var/www/html/wiki.opensourceecology.org/htdocs/includes/page/Article.php(463): OutputPage->setPageTitle('Maltfield Log')
#26 /var/www/html/wiki.opensourceecology.org/htdocs/includes/actions/ViewAction.php(68): Article->view()
#27 /var/www/html/wiki.opensourceecology.org/htdocs/includes/MediaWiki.php(499): ViewAction->show()
#28 /var/www/html/wiki.opensourceecology.org/htdocs/includes/MediaWiki.php(293): MediaWiki->performAction(Object(Article), Object(Title))
#29 /var/www/html/wiki.opensourceecology.org/htdocs/includes/MediaWiki.php(861): MediaWiki->performRequest()
#30 /var/www/html/wiki.opensourceecology.org/htdocs/includes/MediaWiki.php(523): MediaWiki->main()
#31 /var/www/html/wiki.opensourceecology.org/htdocs/index.php(43): MediaWiki->run()
#32 {main}
[DBPerformance] Expectation (writes <= 0) by MediaWiki::main not met (actual: 2):
query-m: REPLACE INTO `wiki_objectcache` (keyname,value,exptime) VALUES ('X')
#0 /var/www/html/wiki.opensourceecology.org/htdocs/includes/libs/rdbms/TransactionProfiler.php(219): Wikimedia\Rdbms\TransactionProfiler->reportExpectationViolated('writes', 'query-m: REPLAC...', 2)                                                                                                                                                                                
#1 /var/www/html/wiki.opensourceecology.org/htdocs/includes/libs/rdbms/database/Database.php(1037): Wikimedia\Rdbms\TransactionProfiler->recordQueryCompletion('query-m: REPLAC...', 1521165400.3374, true, 2)                                                                                                                                                                        
#2 /var/www/html/wiki.opensourceecology.org/htdocs/includes/libs/rdbms/database/Database.php(937): Wikimedia\Rdbms\Database->doProfiledQuery('REPLACE INTO `w...', 'REPLACE /* SqlB...', true, 'SqlBagOStuff::s...')                                                                                                                                                                  
#3 /var/www/html/wiki.opensourceecology.org/htdocs/includes/libs/rdbms/database/Database.php(2263): Wikimedia\Rdbms\Database->query('REPLACE INTO `w...', 'SqlBagOStuff::s...')
#4 /var/www/html/wiki.opensourceecology.org/htdocs/includes/libs/rdbms/database/DatabaseMysqlBase.php(497): Wikimedia\Rdbms\Database->nativeReplace('objectcache', Array, 'SqlBagOStuff::s...')                                                                                                                                                                                       
#5 /var/www/html/wiki.opensourceecology.org/htdocs/includes/objectcache/SqlBagOStuff.php(362): Wikimedia\Rdbms\DatabaseMysqlBase->replace('objectcache', Array, Array, 'SqlBagOStuff::s...')                                                                                                                                                                                          
#6 /var/www/html/wiki.opensourceecology.org/htdocs/includes/objectcache/SqlBagOStuff.php(376): SqlBagOStuff->setMulti(Array, 0)
#7 /var/www/html/wiki.opensourceecology.org/htdocs/includes/cache/MessageCache.php(690): SqlBagOStuff->set('osewiki_db-wiki...', Array)
#8 /var/www/html/wiki.opensourceecology.org/htdocs/includes/cache/MessageCache.php(428): MessageCache->saveToCaches(Array, 'all', 'en')
#9 /var/www/html/wiki.opensourceecology.org/htdocs/includes/cache/MessageCache.php(350): MessageCache->loadFromDBWithLock('en', Array, NULL)
#10 /var/www/html/wiki.opensourceecology.org/htdocs/includes/cache/MessageCache.php(991): MessageCache->load('en')
#11 /var/www/html/wiki.opensourceecology.org/htdocs/includes/cache/MessageCache.php(921): MessageCache->getMsgFromNamespace('Pagetitle', 'en')
#12 /var/www/html/wiki.opensourceecology.org/htdocs/includes/cache/MessageCache.php(888): MessageCache->getMessageForLang(Object(LanguageEn), 'pagetitle', true, Array)
#13 /var/www/html/wiki.opensourceecology.org/htdocs/includes/cache/MessageCache.php(829): MessageCache->getMessageFromFallbackChain(Object(LanguageEn), 'pagetitle', true)
#14 /var/www/html/wiki.opensourceecology.org/htdocs/includes/Message.php(1275): MessageCache->get('pagetitle', true, Object(LanguageEn))
#15 /var/www/html/wiki.opensourceecology.org/htdocs/includes/Message.php(842): Message->fetchMessage()
#16 /var/www/html/wiki.opensourceecology.org/htdocs/includes/Message.php(934): Message->toString('text')
#17 /var/www/html/wiki.opensourceecology.org/htdocs/includes/OutputPage.php(950): Message->text()
#18 /var/www/html/wiki.opensourceecology.org/htdocs/includes/OutputPage.php(998): OutputPage->setHTMLTitle(Object(Message))
#19 /var/www/html/wiki.opensourceecology.org/htdocs/includes/page/Article.php(463): OutputPage->setPageTitle('Maltfield Log')
#20 /var/www/html/wiki.opensourceecology.org/htdocs/includes/actions/ViewAction.php(68): Article->view()
#21 /var/www/html/wiki.opensourceecology.org/htdocs/includes/MediaWiki.php(499): ViewAction->show()
#22 /var/www/html/wiki.opensourceecology.org/htdocs/includes/MediaWiki.php(293): MediaWiki->performAction(Object(Article), Object(Title))
#23 /var/www/html/wiki.opensourceecology.org/htdocs/includes/MediaWiki.php(861): MediaWiki->performRequest()
#24 /var/www/html/wiki.opensourceecology.org/htdocs/includes/MediaWiki.php(523): MediaWiki->main()
#25 /var/www/html/wiki.opensourceecology.org/htdocs/index.php(43): MediaWiki->run()
#26 {main}
[DBPerformance] Expectation (writes <= 0) by MediaWiki::main not met (actual: 3):
query-m: DELETE FROM `wiki_objectcache` WHERE keyname = 'X'
#0 /var/www/html/wiki.opensourceecology.org/htdocs/includes/libs/rdbms/TransactionProfiler.php(219): Wikimedia\Rdbms\TransactionProfiler->reportExpectationViolated('writes', 'query-m: DELETE...', 3)                                                                                                                                                                                
#1 /var/www/html/wiki.opensourceecology.org/htdocs/includes/libs/rdbms/database/Database.php(1037): Wikimedia\Rdbms\TransactionProfiler->recordQueryCompletion('query-m: DELETE...', 1521165400.3392, true, 1)                                                                                                                                                                        
#2 /var/www/html/wiki.opensourceecology.org/htdocs/includes/libs/rdbms/database/Database.php(937): Wikimedia\Rdbms\Database->doProfiledQuery('DELETE FROM `wi...', 'DELETE /* SqlBa...', true, 'SqlBagOStuff::d...')                                                                                                                                                                  
#3 /var/www/html/wiki.opensourceecology.org/htdocs/includes/libs/rdbms/database/Database.php(2370): Wikimedia\Rdbms\Database->query('DELETE FROM `wi...', 'SqlBagOStuff::d...')
#4 /var/www/html/wiki.opensourceecology.org/htdocs/includes/objectcache/SqlBagOStuff.php(433): Wikimedia\Rdbms\Database->delete('objectcache', Array, 'SqlBagOStuff::d...')
#5 /var/www/html/wiki.opensourceecology.org/htdocs/includes/libs/objectcache/BagOStuff.php(447): SqlBagOStuff->delete('osewiki_db-wiki...')
#6 /var/www/html/wiki.opensourceecology.org/htdocs/includes/libs/objectcache/BagOStuff.php(485): BagOStuff->unlock('osewiki_db-wiki...')
#7 [internal function]: BagOStuff->{closure}()
#8 /var/www/html/wiki.opensourceecology.org/htdocs/vendor/wikimedia/scoped-callback/src/ScopedCallback.php(76): call_user_func_array(Object(Closure), Array)
#9 /var/www/html/wiki.opensourceecology.org/htdocs/includes/cache/MessageCache.php(350): Wikimedia\ScopedCallback->__destruct()
#10 /var/www/html/wiki.opensourceecology.org/htdocs/includes/cache/MessageCache.php(350): MessageCache->loadFromDBWithLock('en', Array, NULL)
#11 /var/www/html/wiki.opensourceecology.org/htdocs/includes/cache/MessageCache.php(991): MessageCache->load('en')
#12 /var/www/html/wiki.opensourceecology.org/htdocs/includes/cache/MessageCache.php(921): MessageCache->getMsgFromNamespace('Pagetitle', 'en')
#13 /var/www/html/wiki.opensourceecology.org/htdocs/includes/cache/MessageCache.php(888): MessageCache->getMessageForLang(Object(LanguageEn), 'pagetitle', true, Array)
#14 /var/www/html/wiki.opensourceecology.org/htdocs/includes/cache/MessageCache.php(829): MessageCache->getMessageFromFallbackChain(Object(LanguageEn), 'pagetitle', true)
#15 /var/www/html/wiki.opensourceecology.org/htdocs/includes/Message.php(1275): MessageCache->get('pagetitle', true, Object(LanguageEn))
#16 /var/www/html/wiki.opensourceecology.org/htdocs/includes/Message.php(842): Message->fetchMessage()
#17 /var/www/html/wiki.opensourceecology.org/htdocs/includes/Message.php(934): Message->toString('text')
#18 /var/www/html/wiki.opensourceecology.org/htdocs/includes/OutputPage.php(950): Message->text()
#19 /var/www/html/wiki.opensourceecology.org/htdocs/includes/OutputPage.php(998): OutputPage->setHTMLTitle(Object(Message))
#20 /var/www/html/wiki.opensourceecology.org/htdocs/includes/page/Article.php(463): OutputPage->setPageTitle('Maltfield Log')
#21 /var/www/html/wiki.opensourceecology.org/htdocs/includes/actions/ViewAction.php(68): Article->view()
#22 /var/www/html/wiki.opensourceecology.org/htdocs/includes/MediaWiki.php(499): ViewAction->show()
#23 /var/www/html/wiki.opensourceecology.org/htdocs/includes/MediaWiki.php(293): MediaWiki->performAction(Object(Article), Object(Title))
#24 /var/www/html/wiki.opensourceecology.org/htdocs/includes/MediaWiki.php(861): MediaWiki->performRequest()
#25 /var/www/html/wiki.opensourceecology.org/htdocs/includes/MediaWiki.php(523): MediaWiki->main()
#26 /var/www/html/wiki.opensourceecology.org/htdocs/index.php(43): MediaWiki->run()
#27 {main}
[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->getParser
Parser: using preprocessor: Preprocessor_DOM
Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions->__construct
[caches] parser: SqlBagOStuff
Article::view using parser cache: yes
Parser cache options found.
ParserOutput cache found.
Article::view: showing parser cache contents
MediaWiki::preOutputCommit: primary transaction round committed
MediaWiki::preOutputCommit: pre-send deferred updates completed
[cookie] setcookie: "cpPosTime", "1521165400.3692", "1521165460", "/", "", "1", "1"
[DBReplication] Wikimedia\Rdbms\ChronologyProtector::shutdownLB: DB 'localhost' touched
MediaWiki::preOutputCommit: LBFactory shutdown completed
Title::getRestrictionTypes: applicable restrictions to Maltfield Log are {edit,move}
OutputPage::haveCacheVaryCookies: no cache-varying cookies found
OutputPage::sendCacheControl: private caching; Fri, 16 Mar 2018 01:55:42 GMT **
Request ended normally
[session] Saving all sessions on shutdown
[DBConnection] Closing connection to database 'localhost'.
[DBConnection] Closing connection to database 'localhost'.
And here's the debug output when it *is* set to CACHE_NONE.
[DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: using request info {
    "IPAddress": "127.0.0.1",
    "UserAgent": "curl\/7.29.0",
    "ChronologyProtection": "true"
}
IP: 127.0.0.1
Start request GET /wiki/Michael_Log
HTTP HEADERS:
X-REAL-IP: 138.201.84.223
X-FORWARDED-PROTO: https
X-FORWARDED-PORT: 443
HOST: wiki.opensourceecology.org
USER-AGENT: curl/7.29.0
ACCEPT: */*
X-FORWARDED-FOR: 127.0.0.1
ACCEPT-ENCODING: gzip
X-VARNISH: 146580
[caches] cluster: EmptyBagOStuff, WAN: mediawiki-main-default, stash: db-replicated, message: EmptyBagOStuff, session: SqlBagOStuff
[caches] LocalisationCache: using store LCStoreDB
[CryptRand] openssl_random_pseudo_bytes generated 20 bytes of strong randomness.
[CryptRand] 0 bytes of randomness leftover in the buffer.
[DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: using request info {
    "IPAddress": "127.0.0.1",
    "UserAgent": "curl\/7.29.0",
    "ChronologyProtection": false
}
[DBConnection] Wikimedia\Rdbms\LoadBalancer::openConnection: calling initLB() before first connection.
[DBConnection] Connected to database 0 at 'localhost'.
[SQLBagOStuff] Connection 1064073 will be used for SqlBagOStuff
[session] SessionBackend "nhu5kl4t72jhuu3nfcus835sjgpdfpa0" is unsaved, marking dirty in constructor
[session] SessionBackend "nhu5kl4t72jhuu3nfcus835sjgpdfpa0" save: dataDirty=1 metaDirty=1 forcePersist=0
[cookie] already deleted setcookie: "osewiki_db_wiki__session", "", "1489629637", "/", "", "1", "1"
[cookie] already deleted setcookie: "osewiki_db_wiki_UserID", "", "1489629637", "/", "", "1", "1"
[cookie] already deleted setcookie: "osewiki_db_wiki_Token", "", "1489629637", "/", "", "1", "1"
[cookie] already deleted setcookie: "forceHTTPS", "", "1489629637", "/", "", "", "1"
[DBConnection] Connected to database 0 at 'localhost'.
Title::getRestrictionTypes: applicable restrictions to Michael Log are {edit,move}
[ContentHandler] Created handler for wikitext: WikitextContentHandler
Title::getRestrictionTypes: applicable restrictions to Maltfield Log are {edit,move}
OutputPage::checkLastModified: client did not send If-Modified-Since header
[MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is empty, loading from database
Unstubbing $wgParser on call of $wgParser::firstCallInit from MessageCache->getParser
Parser: using preprocessor: Preprocessor_DOM
Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions->__construct
[caches] parser: SqlBagOStuff
Article::view using parser cache: yes
Parser cache options found.
ParserOutput cache found.
Article::view: showing parser cache contents
MediaWiki::preOutputCommit: primary transaction round committed
MediaWiki::preOutputCommit: pre-send deferred updates completed
MediaWiki::preOutputCommit: LBFactory shutdown completed
Title::getRestrictionTypes: applicable restrictions to Maltfield Log are {edit,move}
OutputPage::haveCacheVaryCookies: no cache-varying cookies found
OutputPage::haveCacheVaryCookies: no cache-varying cookies found
OutputPage::sendCacheControl: local proxy caching; Fri, 16 Mar 2018 01:58:47 GMT **
Request ended normally
[session] Saving all sessions on shutdown
[DBConnection] Closing connection to database 'localhost'.
[DBConnection] Closing connection to database 'localhost'.
Note the "[caches]" line that shows "message: EmptyBagOStuff" instead of "message: SqlBagOStuff"
Note that the "[MessageCache]" line is also different
# when it is *not* set to CACHE_NONE.
[MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is expired/volatile, loading from database
# when it *is* set to CACHE_NONE.
[MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is empty, loading from database
But the "[MessageCache]" line when it is *not* set to CACHE_NONE is preceded by a bunch of stack traces from "[DBPerformance]". This is absent when it *is* set to CACHE_NONE.
Please let me know if there's any more information I can provide for context. TIA! Maltfield (talk) 05:27, 16 March 2018 (UTC)
This may be a bug.
The purpose of the "Expectation (writes <= 0)" is that GET requests don't write to the database. This is generally true, except when the database is used for the object cache, l10n cache and even sessions, which is a common setting on small wikis. To avoid database writes, caching should be configured to use redis or memcache.
That cookie is used by the "ChronologyProtection", a concept that has no documentation but I guess it's used to control reads from database slaves and prevent reading a slave that is lagging after a write to the database has been done.
Maybe the fact that database is used for cache is causing it to send cookies every time, something that shouldn't happen for cache writes from my understanding.
This may be worth opening a BUGREPORT, and CC Aaron Schultz if you open a bug about this :) Ciencia Al Poder (talk) 15:29, 16 March 2018 (UTC)
Thanks for the fast response :)
So are you saying that most wikis that utilize a varnish proxy for caching change the default behaviour of the built-in MediaWiki caches such that they do *not* use the DB for caching? What about the other caches (Main, MainStash, SessionCache)?
If so, this would be great to document in the Manual:Varnish_caching guide.
Also, I'm not sure we want to deploy a redis/memcache dependency. I'm debating between
(a) configuring varnish to simply strip the Chronology Protection 'cpPosTime' cookie from the backend, causing varnish to cache responses where that cookie was present, but without the cookie present or
(b) disabling the message cache
What would be the consequences of each?
I don't fully understand the use of the Chronology Protection, but I would expect the worst-case is that we end up caching a page that is slightly out-of-date. So maybe it could end up that a visitor that's not logged-in will see old versions of the page.
What are the consequences of the message cache being disabled entirely? If >90% of our queries are cache hits, I doubt this would be a significant performance loss. Or would it? There is no section on the Message Cache in Manual:Performance_tuning. Maltfield (talk) 19:24, 16 March 2018 (UTC)
In case anyone else has this issue, I decided to use APCU for the message cache using the following line in LocalSettings.php
$wgMessageCacheType = CACHE_ACCEL;
The How to make MediawWiki fast article by Aaron Schulz and Manual:Performance_tuning helped me to come up with the following settings in LocalSettings.php
#################
# OPTIMIZATIONS #
#################
# See these links for more info:    
#  * https://www.mediawiki.org/wiki/Manual:Performance_tuning
#  * https://www.mediawiki.org/wiki/Manual:Caching
#  * https://www.mediawiki.org/wiki/User:Aaron_Schulz/How_to_make_MediaWiki_fast
# INTERNAL MEDIAWIKI CACHE OPTIONS (DISTINCT FROM VARNISH)
# MainCache and MessageCache should use APCU per Aaron Schulz
$wgMainCacheType = CACHE_ACCEL;
# note that if message cache uses the db (per defaults), then it may make every
# page load include a db change, which causes mediawiki to emmit a set-cookie
# for cpPosTime. The cookie's presence coming from the backend causes varnish
# not to cache the page (rightfully so), and the result is that varnish (which
# is our most important cache) is rendered useless. For more info, see:
#  * https://www.mediawiki.org/wiki/Project%3ASupport%20desk/Flow/2018/03#h-cpPosTime_cookie_%26_varnish_caching-2018-03-16T05%3A19%3A00.000Z
#  * https://wiki.opensourceecology.org/wiki/Maltfield_log_2018#Thr_Mar_15.2C_2018
$wgMessageCacheType = CACHE_ACCEL;
$wgUseLocalMessageCache = true;
# Parser Cache should still use the DB per Aaron Schulz
$wgParserCacheType = CACHE_DB;
# enable caching navigation sidebar per Aaron Schulz
$wgEnableSidebarCache = true;
# cache interface messages to files in this directory per Aaron Schulz
# note that this should be outside the docroot!
$wgCacheDirectory = "$IP/../cache";
# OTHER OPTIMIZATIONS
# decrease db-heavy features per Aaron Schulz
$wgMiserMode = true;
# Causes serious encoding problems
$wgUseGzip = false;
Maltfield (talk) 00:29, 17 March 2018 (UTC)
Hi Maltfield,
After you set the $wgMessageCacheType = CACHE_ACCEL; , have you ever saw the following error message anymore?
[MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is expired/volatile, loading from database
We tried to set $wgMessageCacheType to CACHE_ACCEL (with uAPC) or redis. But both of these two setting result-in same error message about. Deletedaccount4567435 (talk) 06:48, 11 February 2019 (UTC)

when i was looking at the meissen urnes onyour pages/why did my personial photos

show up on your pages ? please explain .? . awaiting your reply . John robert grant (talk) 06:53, 16 March 2018 (UTC)
when I was checking out your web site .my documents file +photos .came up on the screen ?I was looking at the meissen
urns /autumn /summer .model 1065 .why ? John robert grant (talk) 06:03, 25 March 2018 (UTC)
Please provide a complete link to "the meissen urnes on your pages" that you are referring to. Please explain what "personal photos" you refer to. Malyacko (talk) 14:09, 16 March 2018 (UTC)
as above +when I was joining logging into your system. more of my photos.came on the screen /Meissen porcelain .
the owner of the urnes is selling them ,in the usa .ihad printed many pages ,from his web site .as I clicked on the urns on your
site ,my photos came on your screen .I was trying to download info ,from your site ,so I got no info of the urns from your files
please explain what is happing ? john . John robert grant (talk) 06:30, 25 March 2018 (UTC)
As long as you do not provide a link, nobody knows what you are talking about. See the comments in this thread. Malyacko (talk) 18:30, 25 March 2018 (UTC)
al so when I was createing ,to join your web .sit .phots .on my documents was on your page .wow do you do this ?photos of my
Meissen collection ,was on the screan .please let me no ,what is going on ? john . John robert grant (talk) 07:42, 18 March 2018 (UTC)
Again, can you kindly provide the link to the web-page where your photos are being displayed?
Was this happening on mediawiki.org or some other website? AhmadF.Cheema (talk) 08:58, 18 March 2018 (UTC)

How to disable printing of wiki pages - Mediawiki 1.30

Recently upgraded from Mediawiki 1.11 to Mediawiki 1.30. In 1.11, we customized Monobook (default skin) to have a different stylesheet which printed nothing. User had to log in and their default skip was another one which allowed printing.

With 1.30, it seems like

Any suggestion on how to accomplish this? 70.142.247.157 (talk) 13:04, 16 March 2018 (UTC)

MediaWiki:Print.css
See Manual:Interface/Stylesheets Ciencia Al Poder (talk) 15:10, 16 March 2018 (UTC)
Am I the only one, who has, in thoughts, just copied thousands of pages into Word to quickly print them? The idea to prevent printing through CSS does not sound to me like it will work... 2001:16B8:10BB:6300:FC59:22CF:B529:8735 (talk) 00:16, 17 March 2018 (UTC)
Is there any other way to accomplish it? 70.142.247.157 (talk) 15:10, 20 March 2018 (UTC)
Hi
I tried to disable Print option for my entire Mediawiki page using MediaWiki:Print.css , but it doesn't work
And i used the css code
@media print {
html, body {
display: none; /* hide whole page */
}
}
Can you help me to find out the better solution to block users not to print the page
or else is there any extension there to block print page . please let me know Niyaz nizu16 (talk) 07:32, 18 April 2018 (UTC)
Probably don't need the @media print here. Try with including the following in your MediaWiki:Print.css:
#content {
	display: none;
}
AhmadF.Cheema (talk) 15:01, 18 April 2018 (UTC)
I tried but it doesn't works , Can i get the better way for it since it is very mandatory to disable the content of mediawiki page from printing , Hope you understand Or else Is there any extension there to do it... Kindly please let me know Niyaz nizu16 (talk) 05:39, 19 April 2018 (UTC)
It's impossible to prevent printing. Even if you made it so printing was disabled, or just resulted in empty content, people can just copy paste the content, then print it from there. Then even if you prevented copy paste (this isn't possible either), people could still take a screenshot of the page. Then even if you prevent taking screenshots (this isn't possible either), people could still take a photo of their screen.
In summary, preventing printing is physically impossible. If people can see the content, they can print it. You're wasting your time. 121.214.61.173 (talk) 11:08, 19 April 2018 (UTC)

Recovering data from 2008

Hi

I have an old project from 2008 which was documented using mediawiki. Ten years have passed and I recently found the old HDD with this data. I copied the mediawiki directory from the hdd to /var/www/html/mediawiki in my Ubuntu 17.10 LAMP. http://localhost/mediawiki gives a blank page.

The mediawiki drecotry is over 2 GB, mostly images. Did mediawiki already use mysql in 2008?

Timo 85.157.30.186 (talk) 16:51, 16 March 2018 (UTC)

Yes, you'll have to dump the DB on that disk to get the content back. MarkAHershberger(talk) 17:57, 16 March 2018 (UTC)
And additionally, your old MediaWiki version might be incomatible with the PHP version, which you are running on your new machine. So should you get according PHP errors, you probable have to upgrade MediaWiki after your move. 2001:16B8:10BB:6300:FC59:22CF:B529:8735 (talk) 00:13, 17 March 2018 (UTC)

How to stop notifications of my own edits?

How to stop notifications of my own edits? 76.174.146.55 (talk) 20:52, 16 March 2018 (UTC)

I don't think a user receives notifications for one's "own edits". AhmadF.Cheema (talk) 06:30, 17 March 2018 (UTC)

How to Create Special Page to Edit LocalSettings.php ?

How to Create Special Page to Edit LocalSettings.php ? Johnywhy (talk) 21:45, 16 March 2018 (UTC)

Don't do it. LocalSettings.php is the basic configuration file of a wiki and it contains a bunch of sensitive and private information. You should not make this information public by making it editable by everyone or at least everyone with according MediaWiki user rights.
In order to be able to edit LocalSettings.php, the user has to have file system access and it is good that way. :-) 2001:16B8:10BB:6300:FC59:22CF:B529:8735 (talk) 00:09, 17 March 2018 (UTC)
"user has to have file system access"
and the same rights should be required for that page. The page will require admin login. Johnywhy (talk) 13:59, 18 March 2018 (UTC)
Technically speaking, you can do this. 星耀晨曦 (talk) 16:35, 19 March 2018 (UTC)
Technically speaking you can also give people file system access. The question is: How clever is that? And how clever is it to allow editing the file with the most sensitive content through MediaWiki? There only needs to be a single security issue in MediaWiki and apart from your usual problems in that case, every user will not only be able to see e.g. your complete configuration, but also your DB access data. I am currently not sure, if this is as bad as installing Extension:MaintenanceShell or if it is even worse. Actually, I think it is worse. Not clever if you are asking me. 2001:16B8:1090:3500:1F3:853A:17F9:9161 (talk) 18:12, 19 March 2018 (UTC)
if done properly, like ANY securely programmed webpage, then it will be secure.
Any webpage can be done security or insecurely.
Eg, multiple layers of authentication, input validation, etc etc
This MediaWiki hosting service intends to create something similar:
https://phabricator.miraheze.org/T194 Johnywhy (talk) 23:29, 19 March 2018 (UTC)
You can develop extension that can edit LocalSettings.php. 星耀晨曦 (talk) 06:19, 20 March 2018 (UTC)

Templating for Dummies (i.e. me)

I'm sorry if these are dumb questions, but I just don't get Templates.

I am creating a Wiki about a sporting organisation. For the people (players, officials etc) I would like to include Infoboxes (similar to Wikipedia's Field Hockey Player).

e.g. I've created a Template called Person. I use the code format: {{subst:Name}} to include the Template blank info into my Page for the editors to fill in...at least, I think how it's supposed to work. Is that how it works?

But, that just puts the unformatted text on my page. How do I style it up?

I tried importing pages & templates via XML into my wiki, but it doesn't seem to bring the styles.

I'm afraid my editors have even less computer experience than me, so I need to make the system as simple as possible for them. Audabee (talk) 00:41, 17 March 2018 (UTC)

For Wikipedia infoboxes, first take a look at Manual:Importing Wikipedia infoboxes tutorial. AhmadF.Cheema (talk) 03:04, 17 March 2018 (UTC)

log in problem

I have created an account - user name Wabisabijones. However it is unrecognised when I attempt to log in. When I try to create a new account with the same name, it says the name is already in use. 85.210.190.66 (talk) 10:31, 17 March 2018 (UTC)

Which website is that about? Malyacko (talk) 12:29, 17 March 2018 (UTC)

Why disabling anon editing on wikis is common?

Topic about many MediaWiki users has selected to put it in into wikis.

Why this thing:

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

is so common? I find many wikis powered by Mediawiki has this thing on. 2A02:C7F:963F:BA00:75B9:439B:3023:BBD3 (talk) 12:02, 17 March 2018 (UTC)

Not all wikis can be edit by public. 星耀晨曦 (talk) 12:14, 17 March 2018 (UTC)
Yes, but it is used to stop vandalism? 2A02:C7F:963F:BA00:75B9:439B:3023:BBD3 (talk) 12:20, 17 March 2018 (UTC)
This is used to disable editing by anonymous users, so it can be used to stop vandalism or also along with other rules can be used to create "a private wiki, for oneself and approved others". See Manual:Preventing access. AhmadF.Cheema (talk) 12:23, 17 March 2018 (UTC)
It should be like you said. Some companies may use mediawiki as their website, they don't want people who are not employees to edit their wiki. 星耀晨曦 (talk) 12:24, 17 March 2018 (UTC)
Private wikis is closed to anyone, so no IPs will be able to read and edit private wiki. Vandalism on wikis are harmful. 2A02:C7F:963F:BA00:75B9:439B:3023:BBD3 (talk) 12:26, 17 March 2018 (UTC)
many and many wiki i can find has this thing on. 176.27.175.9 (talk) 21:01, 3 April 2018 (UTC)
Why there are no messages? 2A02:C7F:963F:BA00:5DF7:13F1:AFD3:B4B2 (talk) 18:39, 5 April 2018 (UTC)
NOTE: I can't find any wikis without this thing on. All has "$wgGroupPermissions['*']['edit'] = false;" enabled. 2A02:C7F:963F:BA00:419E:5652:917D:2F86 (talk) 16:39, 12 April 2018 (UTC)
Well, this wiki doesn't have this thing on, that's why you're able to post your comments here :) Ciencia Al Poder (talk) 09:34, 13 April 2018 (UTC)
But how about read-only wikis? 2A02:C7F:963F:BA00:D054:D024:D525:E84C (talk) 12:30, 13 April 2018 (UTC)
read-only wikis are obviously restricting edits to anon. Ciencia Al Poder (talk) 17:19, 13 April 2018 (UTC)
The same goes to Wikitech wiki, where not only has to be logged in, but you must use e-mails on Wikitech. 2A02:C7F:963F:BA00:D054:D024:D525:E84C (talk) 18:35, 13 April 2018 (UTC)
most and most wikis listed at Sites using MediaWiki/en has this thing "$wgGroupPermissions['*']['edit'] = false;" enabled, which requires a logon to edit for reasons of vandalism or spam.
Why the people is adding it in on many new wikis? 2A02:C7F:963F:BA00:D9DE:EDCC:B34F:7AEC (talk) 18:09, 14 April 2018 (UTC)
You already replied to yourself: for reasons of vandalism or spam Ciencia Al Poder (talk) 09:44, 15 April 2018 (UTC)

Populate Table Cell with Previous Page Name

Hello everyone. In my wiki, my pages are actually named as dates (i.e., March 17, 2018). New pages/dates are added every few days accordingly. I have a table on each page (included as a template on the page) in which one row is named "Previous" and another is named "Next," indicating the previous page/date created and the next. However, how the heck do I populate the actual cell to automatically find the previous entry by page name (chronologically) and the next? I'd much rather not have to manually enter this every time I create a new page. Maybe something to do with "page table"? Many thanks to all your gurus. Gmlacey (talk) 01:28, 18 March 2018 (UTC)

If the number of days between pages is constant or close enough, you can use the #time parser function to calculate a few previous/next dates (example:
{{#time: Y-m-d | +2 day }}) and use #ifexist function to display only the first one that actually exists. Ciencia Al Poder (talk) 15:28, 18 March 2018 (UTC)
Not sure this will work though since many of these pages are in the past. I’m adding this as a new option. This idea seems to return just results from the current day, plus or minus however many. :-/ Gmlacey (talk) 23:36, 18 March 2018 (UTC)

action=render and "NewPP limit report" info

Currently, the output of action=render contains also the NewPP parser report tags. Is there any reason for it? Lugusto (talk) 05:42, 18 March 2018 (UTC)

It's also returned from the parse api, with a parameter to disable it. I don't know the reason for it, however. Ciencia Al Poder (talk) 15:22, 18 March 2018 (UTC)

Search not finding some page titles

My wiki isn't finding some pages when I search by page title or even content. I tried searching all namespaces. The page shows up in the search suggestions however.

I'm running version 1.29.1, PHP 5.6.34, MySQL 5.7.20 . Alex Swak (talk) 10:35, 18 March 2018 (UTC)

Increase results in cached special pages

Hi. Is there a way to increase the total number of results that are displayed on special pages (when caching is active), e.g. list of redirects, to show more than the standard 1,000 results? Or, perhaps, even to disable caching for just a/some particular page(s)? 2001:16B8:2BE1:8C00:18CA:51D4:274B:507 (talk) 11:24, 18 March 2018 (UTC)

up 2001:16B8:2BA3:5B00:B8EC:70BF:560D:143B (talk) 18:36, 20 March 2018 (UTC)

== Format text in

 tag ==

Even if <pre> tag encloses a preformatted text, HTML supports formatting of the block as explained here https://www.sitepoint.com/everything-need-know-html-pre-element/#using-nested-html-elements .

For instance, the following code:

<pre>
<pre>
    This is preformatted text.
  It should be <span style="color:red;">further formattable</span>

should produce a block of text with the last part in color red.
This works if you try it on CodePen or similar website, but produces this output in MediaWiki:

    This is preformatted text.
  It should be <span style="color:red;">further formattable</span>

So the color is ignored.
Why this happens? And anyone knows how to workaround it?

Thanks Luca Mauri (talk) 11:47, 18 March 2018 (UTC)

See m:Help:HTML in wikitext#Pre. You can use following way:
 It should be <span style="color:red;">further formattable</span>
Effect:
It should be further formattable 星耀晨曦 (talk) 12:38, 18 March 2018 (UTC)
Thanks for your effort, but unfortunately I can't use this method instead. I am importing into my Wiki several already-existing PRE blocks containing spaces, so I cannot simply add a space in front of each row. Luca Mauri (talk) 15:13, 18 March 2018 (UTC)
I have the same issue and not solve. Xin344 (talk) 10:52, 2 June 2020 (UTC)

Cannot Create Phabricator Task

On click "Create new task" on

https://phabricator.wikimedia.org/maniphest/task/edit/form/1/?projects=MediaWiki-extensions-UpdateMediaWiki

reports

ManiphestUnhandled Exception ("Exception") Johnywhy (talk) 13:53, 18 March 2018 (UTC)

Cannot reproduce. Note that a project called "MediaWiki-extensions-UpdateMediaWiki" does not exist - where did you find that link and what makes you think that this project should exist in Phabricator? What is the complete, full error message? Are you logged into Phabricator?
Note that Phabricator issues are best to bring up and discuss on Talk:Phabricator/Help. Malyacko (talk) 11:22, 19 March 2018 (UTC)
i'm sorry, i'm not sure where i found the link. I might have linked from:
https://www.mediawiki.org/wiki/Special:ExtensionDistributor?extdistname=UpdateMediaWiki&extdistversion=REL1_27
(cancel the download when the page loads, then view the page)
which i was linked to from:
Special:ExtensionDistributor
What makes me think what project should exist in Phabricator? UpdateMediaWiki? I did not create it, i was linked to it.
Yes, the link forces me to log in before i get the error. I login with MediaWiki, NOT as Developer.
thx Johnywhy (talk) 23:39, 19 March 2018 (UTC)
No project should exist in Phabricator. Except for when the maintainer of UpdateMediaWiki asked for one and will actually take a look at tasks. No need to create random places where bug reporters think that maintainers would take a look while maintainers don't even know about those random places. Malyacko (talk) 11:53, 24 March 2018 (UTC)
And I still don't get any exception when clicking your link :-/ Malyacko (talk) 11:54, 24 March 2018 (UTC)
"No need to create random places"
how do you create random places? Johnywhy (talk) 15:48, 24 March 2018 (UTC)
If that was a serious question then I don't understand it and I'd kindly ask you to rephrase. Thanks. Malyacko (talk) 18:31, 25 March 2018 (UTC)
You said i created a place. I clarified that i did not create a place, i was linked to it. Then you repeated that i created a place. If i misunderstand your meaning, then I'd kindly ask you to rephrase. Johnywhy (talk) 19:38, 25 March 2018 (UTC)
Ah, thanks. Could you elaborate where/how exactly on Special:ExtensionDistributor to see such a broken link? Malyacko (talk) 10:24, 26 March 2018 (UTC)
It's linked from the very bottom of the infobox in Extension:UpdateMediaWiki. This, that and the other (talk) 11:45, 26 March 2018 (UTC)
Andre, I see an Unhandled Exception message Edge transactions must have destination PHIDs as in edge lists (found key "MediaWiki-extensions-UpdateMediaWiki" on transaction of type "41"). on phab.wmflabs.org when I go ahead and try to create the task with the unknown project. Phabricator really should handle this more gracefully, as it is obviously confusing to unfamiliar users.
More specifically, perhaps we need to keep a list of extensions without (or maybe with?) Phabricator projects, and offer a bug-reporting link for the `MediaWiki-extensions-Other` project for extensions without a specific project. This, that and the other (talk) 01:54, 26 March 2018 (UTC)
Ah, so this happens after clicking the create button. Wasn't clear to me. Worth a bug report, I'd say. Malyacko (talk) 10:24, 26 March 2018 (UTC)
Would you like to file one? I haven't always had positive experiences on secure.phabricator.com. This, that and the other (talk) 05:13, 27 March 2018 (UTC)
i'll leave this bug report to someone more knowledgeable than me. Johnywhy (talk) 07:21, 27 March 2018 (UTC)
Sorry, that was in reply to Malyacko (Andre). I should have clicked Reply on the relevant post. This, that and the other (talk) 10:06, 27 March 2018 (UTC)
np Johnywhy (talk) 10:32, 27 March 2018 (UTC)

UpdateMediaWiki Fails

page Special:Updatemediawiki reports:

Update MediaWiki

Current version 1.28.3

New update foundv{{#inv

Update already downloaded

Update ready Install now?

**Could not find latest realeases**

Updatemediawiki extension is for version 1.27, downloaded from Special:ExtensionDistributor/UpdateMediaWiki Johnywhy (talk) 13:55, 18 March 2018 (UTC)

Try doing a manual update as detailed on upgrade! 2001:16B8:1066:CB00:B8F0:E6DC:F97:C63D (talk) 14:30, 18 March 2018 (UTC)

How to Show Only My Own Actions in "My notices"

i'm seeing other users' actions in "My notices" on this page. Johnywhy (talk) 14:03, 18 March 2018 (UTC)

Can't understand why you would want to do it, but the notification settings can be changed from Special:Preferences#mw-prefsection-echo. AhmadF.Cheema (talk) 14:08, 18 March 2018 (UTC)
thx for the tip!
not sure if i did it correctly, but maybe.
https://img18.pixhost.org/images/6/66540038_screenshot-201.png
i am only interested in my own support issues, not everyone's support issues. Why would i be interested in everyone else's support issues? i'm not a WikiMedia developer, just admin of my own wiki.
thx Johnywhy (talk) 23:52, 19 March 2018 (UTC)
By "My Own Actions", I thought you meant your own actions such as edits and page creations. I didn't know that you had apparently actually meant notifications for any other actions on the page you have made edits on. In which case, you will need to remove such pages from your Watchlist. Adding or removing a page from a user's Watchlist is done by clicking on the star besides the "View history" tab near the top of the page. AhmadF.Cheema (talk) 05:15, 20 March 2018 (UTC)

New version of Image is not showing

I recently noticed that after I upload new version of image, still the old version appears in thumbnails until I do ?action=purge and clear cache . Even if first I clear cache and then do ?action=purge still old version is visible . Any idea what may cause this problem? SANtosito (talk) 17:10, 18 March 2018 (UTC)

Be sure the Manual:Job queue is functional. If there are pending jobs, the cache of the page may take a while to be cleared. Ideally you should set up a job runner service to automatically run jobs in background. Ciencia Al Poder (talk) 10:26, 19 March 2018 (UTC)
I'm having a different flavor of this: new version of images not being displayed even after purge and clear cache.
When I view the image history the thumbnails are correct, and the thumbnail is correct on the page the image is used on. However clicking on the thumbnail on a page using the image, the previous version of the image is displayed. Clicking on the thumbnail for the latest version of the image in the file history is showing the right image, the latest copy.
Job queue is empty.
I've even tried Approving the latest image version to no avail.
I did notice that the file in question in the images sub-directory had permissions -rw-r--r-- while the others were -rwxr-xr-x. I issued chmod 755 -R images and the files are now all the same, -rwxr-xr-x.
This wiki was just recently migrated from 1.32 to 1.38.2, with the prior version of the file having been loaded on that older server, and the new image added after the migration.
Any ideas what may be causing this issue?
MediaWiki 1.38.2
PHP 7.4.30 (apache2handler)
MariaDB 5.5.68-MariaDB
ICU 50.2
Lua 5.1.5
Elasticsearch 6.5.0 Dalehoop (talk) 18:58, 29 August 2022 (UTC)
Please do not set the execute permissions to uploaded files! Only directories must have the executable bit, not regular files. Some servers may incorrectly attempt to execute a file when downloaded if it has the executable bit set, which may result in your server being compromised if someone uploaded a script file or executable binary.
Check if the problem is your browser cache, by viewing the page using incognito mode. Ciencia Al Poder (talk) 21:32, 29 August 2022 (UTC)
I'm seeing the same issue where the old version of the image keeps being shown. Purging the cache, or viewing it in a private window makes no difference. If I click on the image in the page, it will show the image in a pop-up frame; this is the correct version. On the page itself though, I keep seeing the old version. Casparvdh (talk) 16:01, 3 January 2025 (UTC)
Okay, this is not what usually happens. Several possible causes that you should diagnose on your own:
  • There's a caching proxy between your server and your browser (a CDN, cloudflare, etc)
  • Thumbnails are not being regenerated. That should not happen unless there's a permission problem in the filesystem Ciencia Al Poder (talk) 17:02, 4 January 2025 (UTC)

About restbase service configration and any error.

Hi!guys.

mediawiki:1.30.0

extension:Visual editor

nodejs:V9.2.1

first error:

The restbase service sometime Failed with result 'exit-code'.

detail:

● restbase.service - Mediawiki RESTBase Service

   Loaded: loaded (/lib/systemd/system/restbase.service; enabled; vendor preset: enabled)

   Active: failed (Result: exit-code) since Sun 2018-03-18 16:59:45 CST; 14h ago

     Docs: https://www.mediawiki.org/wiki/RESTBase

  Process: 3130 ExecStart=/usr/local/bin/node /home/flame/node_modules/restbase/server.js (code=exited, status=1/FAILURE)

Main PID: 3130 (code=exited, status=1/FAILURE)

    Tasks: 0

   Memory: 19.9M

      CPU: 6min 40.814s

   CGroup: /system.slice/restbase.service

Mar 18 16:59:45 ubuntu systemd[1]: restbase.service: Failed with result 'exit-code'.

Mar 18 16:59:45 ubuntu node[3130]: module.js:544

Mar 18 16:59:45 ubuntu node[3130]:     throw err;

Mar 18 16:59:45 ubuntu node[3130]:     ^

Mar 18 16:59:45 ubuntu node[3130]: Error: Cannot find module '/home/flame/node_modules/_service-runner@2.4.8@service-runner/service-runner.js'

Mar 18 16:59:45 ubuntu node[3130]:     at Function.Module._resolveFilename (module.js:542:15)

Mar 18 16:59:45 ubuntu node[3130]:     at Function.Module._load (module.js:472:25)

Mar 18 16:59:45 ubuntu node[3130]:     at Function.Module.runMain (module.js:682:10)

Mar 18 16:59:45 ubuntu node[3130]:     at startup (bootstrap_node.js:191:16)

Mar 18 16:59:45 ubuntu node[3130]:     at bootstrap_node.js:613:3

second error:

when I use Visual Editor edit a pages ,This log was wroten: error "message":"404: not_found#route" and have warning: "message":"404: not_found#route".

detail:

Mar 19 07:32:21 ubuntu node[21940]: {"name":"restbase","hostname":"ubuntu","pid":21984,"level":40,"levelPath":"warn/startup","msg":"listening on *:7231","time":"2018-03-18T

Mar 19 07:32:21 ubuntu node[21940]: {"name":"restbase","hostname":"ubuntu","pid":21940,"level":40,"levelPath":"warn/service-runner","msg":"Startup finished","time":"2018-03

Mar 19 07:32:29 ubuntu node[21940]: {"name":"restbase","hostname":"ubuntu","pid":21954,"level":40,"err":{"message":"404: not_found#route","name":"restbase","stack":"HTTPErr

Mar 19 07:32:29 ubuntu node[21940]: ath":"warn/bg-updates","root_req":{"method":"get","uri":"/192.168.3.51/v1/page/html/%E9%A6%96%E9%A1%B5/978?redirect=false","headers":{"u

Mar 19 07:44:35 ubuntu node[21940]: {"name":"restbase","hostname":"ubuntu","pid":21974,"level":40,"err":{"message":"404: not_found#route","name":"restbase","stack":"HTTPErr

Mar 19 07:44:35 ubuntu node[21940]: ath":"warn/bg-updates","root_req":{"method":"get","uri":"/192.168.3.51/v1/page/html/%E9%A6%96%E9%A1%B5/984?redirect=false","headers":{"u

Mar 19 07:45:51 ubuntu node[21940]: {"name":"restbase","hostname":"ubuntu","pid":21984,"level":40,"err":{"message":"404: not_found#route","name":"restbase","stack":"HTTPErr

Mar 19 07:45:51 ubuntu node[21940]: ath":"warn/bg-updates","root_req":{"method":"get","uri":"/192.168.3.51/v1/page/html/Dpl3%E6%89%8B%E5%86%8C%2F%E8%BE%93%E5%87%BA%E6%A0%BC

Mar 19 07:47:04 ubuntu node[21940]: {"name":"restbase","hostname":"ubuntu","pid":21954,"level":40,"err":{"message":"404: not_found#route","name":"restbase","stack":"HTTPErr

Mar 19 07:47:04 ubuntu node[21940]: ath":"warn/bg-updates","root_req":{"method":"get","uri":"/192.168.3.51/v1/page/html/%E4%B8%80%E5%85%83%E4%B8%80%E6%AC%A1%E6%96%B9%E7%A8%

Pleash give a hand . Flame qi (talk) 00:00, 19 March 2018 (UTC)

Looks like some node modules for restbase are missing. Did you run "npm install" from the restbase installation folder? Ciencia Al Poder (talk) 10:28, 19 March 2018 (UTC)
Make sure you run npm install before using. 星耀晨曦 (talk) 10:30, 19 March 2018 (UTC)
Yes ,I sure run" cnpm install restbase" (cnpm is chinese npm version) before using .I don't know why appears error "message":"404: not_found#route". but ,now the restbase service worked well. Flame qi (talk) 23:52, 22 March 2018 (UTC)

Setting up MediaWiki alongside another site

I have an Ubuntu desktop PC running as a server, which has Gitlab installed (Through the instructions here: https://about.gitlab.com/installation/#ubuntu)

I followed the instructions on Manual:Running MediaWiki on Debian or Ubuntu but when I come to the part where it wants me to go to http://localhost/mediawiki it just takes me to Gitlab instead.

I followed the instructions to set up symbolic link /var/www/html/mediawiki to /var/lib/mediawiki but it doesn't work still.

Not really sure how to make both Gitlab and MediaWiki work side by side, but ideally I would want localhost/gitlab and localhost/mediawiki to go to the respective sites. How do I do this? Thanks! Arvz88 (talk) 11:11, 19 March 2018 (UTC)

See Manual:Short URL/LocalSettings.php Malyacko (talk) 11:19, 19 March 2018 (UTC)
@Malyacko I don't have a LocalSettings.php yet in my mediawiki install folder, because I haven't gone through the set up for media wiki yet, well because I can't get to it from the browser Arvz88 (talk) 11:27, 19 March 2018 (UTC)
So it seems like the problem is because Gitlab has installed its own version of Apache, which is already running, so whatever apache I installed for mediawiki isn't running? Something like that? Arvz88 (talk) 11:32, 19 March 2018 (UTC)
Ok, I shutdown Gitlab and then restarted apache2, and Mediawiki can now be accessed from localhost/mediawiki, but I still need to figure out how to get both running at the same time through localhost/gitlab and localhost/mediawiki Arvz88 (talk) 11:55, 19 March 2018 (UTC)
You can't have 2 apache (or any other webserver) running on the same port. HTTP uses port 80 by default.
One or another must be set up to use a different port, then both can be run but one on port 80 and the other on a different port (like port 81, 8080, etc).
If each application has different webserver requirements that require both apaches at the same time, one option is to set Gitlab to a different port and set apache to act as a proxy to the Gitlab application when accessing the Gitlab paths Ciencia Al Poder (talk) 22:29, 19 March 2018 (UTC)

How to add custom script as soon as the <head> tag opens.

I can't seem to move a script as high as I need it to be. Is there any work-around or plugin that allows full visibility into the <head> tag to add a script higher up? The script being too low is impacting its performance. 65.207.79.74 (talk) 17:32, 19 March 2018 (UTC)

Update really old MediaWiki installation

Here's the stats -- what should we do first?

  • MediaWiki 1.12.0
  • PHP 5.2.6 (apache2handler)
  • MySQL 5.0.45

I found Manual:Upgrading#How do I upgrade from a really old version which implies that we should just try to install straight up to 1.30. Step 4 says that I may not be able to put the wiki in a read-only version though? Also, that link doesn't talk about upgrading PHP and MySQL at all. MediaWiki 1.30.0 requires at least PHP 5.5.9 and MySQL 5.5.8 and we don't have either -- which should we update first? Banaticus (talk) 22:29, 19 March 2018 (UTC)

Because your version is too old, it is may not to stay online while upgrading. First of all you should upgrade your PHP and MySQL. Then upgrade your mediawiki installation. Note: Please backup your database and file before upgrade. 星耀晨曦 (talk) 06:16, 20 March 2018 (UTC)
How do we update MySQL? Banaticus (talk) 13:51, 20 March 2018 (UTC)
For more information on upgrading MySQL see official document. Since you MySQL is old, there may be compatibility problems when upgrading. 星耀晨曦 (talk) 14:10, 20 March 2018 (UTC)

Help with embedded files

I'm really new with mediawiki and I'm having problems with embedding a PDF file. I have installed the PDFEmbed extension- that seems to be working correctly.

I edit a wiki page by clicking the embed file icon. it looks like this inside double-brackets:

File:/servername/mediawiki/docs/filename.pdf

I save the changes and it creates the red link to the file. I click on the link and it takes me to the upload file page. I click Choose File and browse to the file and select it. I click upload and it takes me to the file history page and the document seems to be there. But going back to read the page I see the file listed, but clicking on it just takes me back to the upload page.

What am I doing wrong? I want to be able to click and open the file, but that never happens.

Thanks

FJM Frankjmurray3 (talk) 23:50, 19 March 2018 (UTC)

"You must be logged in and have a valid email address in your preferences to send email to other users"

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Can't seem to send email from one user to another.

Trying to use link:

https://gunsense.xyz/index.php/Special:EmailUser/WikiSysop

MediaWiki version: 1.30

Details: https://gunsense.xyz/index.php/Special:Version

Getting:

"No send address

You must be logged in and have a valid email address in your preferences to send email to other users. Johnywhy (talk) 06:19, 20 March 2018 (UTC)

Make sure you logged. 星耀晨曦 (talk) 06:22, 20 March 2018 (UTC)
thx. The user who is trying to send email is logged in, and their email address was validated. Johnywhy (talk) 06:24, 20 March 2018 (UTC)
Did the user confirm the email address? 星耀晨曦 (talk) 06:28, 20 March 2018 (UTC)
yes, both sender and receiver confirmed their email addresses.
How to determine if they are confirmed? Is there a special page that show if users' email is confirmed?
thx Johnywhy (talk) 06:48, 20 March 2018 (UTC)
Update: I re-confirmed the email address of the sender. Now can send email.
I believe the sender already confirmed their email, but maybe not.
Will report back if problem continues.
thx Johnywhy (talk) 07:08, 20 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Hi

Hi Have set up mediawiki on a remote server, I am the only editor i am assuming i have admin type rights but cannot acess page to edit side bar. Notuluca (talk) 08:02, 20 March 2018 (UTC)

By "page to edit side bar", do you mean your Wiki's version of this page: MediaWiki:Sidebar?
See your Wiki's version of Special:Preferences to make sure whether you belong to the Administrators group or not. AhmadF.Cheema (talk) 08:14, 20 March 2018 (UTC)
Info... the error is You don't have permission to access /MediaWiki:Sidebar on this server. Notuluca (talk) 08:20, 20 March 2018 (UTC)
same error as above
You don't have permission to access /Special:Preferences on this server. Notuluca (talk) 08:24, 20 March 2018 (UTC)
the special pages link in sidebar has same error Notuluca (talk) 08:25, 20 March 2018 (UTC)
info.... files on server all have user;owner...group;group Notuluca (talk) 08:32, 20 March 2018 (UTC)
checking permissions of specialpage and specials folders in /htdocs/includes Notuluca (talk) 08:46, 20 March 2018 (UTC)
Appears to be an incorrectly set-up server issue, rather than a MediaWiki one.
For MediaWiki files on your server, is the "Read" permission given to "World"? AhmadF.Cheema (talk) 09:17, 20 March 2018 (UTC)
I have no world group
I will contact web space support and post up the results Notuluca (talk) 09:31, 20 March 2018 (UTC)
Transcript from chat with webspace support will let you know the outcome
I have tested and even test files couldn't be accessed when added on the includes/specials directory. I will have to raise this for now to our engineers for further checking
notuluca: thanks so will it be on a ticket in my loggin
Yes, I will be creating a ticket for this, and will be raised to our engineers. As soon as this is resolved, we will let you know right away via email Notuluca (talk) 10:06, 20 March 2018 (UTC)
The problem is happening probably with any URL that contains a colon. This is a common problem on sites hosted on Windows (not only MediaWiki). The solution may vary depending on the webserver you use. Ciencia Al Poder (talk) 10:12, 20 March 2018 (UTC)

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


hello please help me with the engine codes in all makes of cars and the specifications starting year ansd ending year cc and the model codes used 41.202.241.43 (talk) 08:28, 20 March 2018 (UTC)

Welcome to the help desk for the MediaWiki software. Your question does not seem to be about the MediaWiki software, hence I am afraid you will have to ask it somewhere else. :) Malyacko (talk) 08:35, 20 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Recaptcha Gives Database Error

MW 1.30 Using Extension:ConfirmEdit#Manual installation

Attempting to edit a page, receiving:

Database error A database query error has occurred. This may indicate a bug in the software.[WrDGxZdE@5TvynP5ZpqwLgAAAdc] 2018-03-20 08:31:01: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"

My config in LocalSettings.php:

wfLoadExtension( 'ConfirmEdit' );

wfLoadExtensions([ 'ConfirmEdit', 'ConfirmEdit/ReCaptchaNoCaptcha' ]);

$wgCaptchaClass = 'ReCaptchaNoCaptcha';

$wgReCaptchaSiteKey = 'my public key here';

$wgReCaptchaSecretKey = 'my private key here';

Any fix? Johnywhy (talk) 08:37, 20 March 2018 (UTC)

Set the following in your LocalSettings.php to obtain a more detailed error message:
$wgShowExceptionDetails = true;
$wgShowDBErrorBacktrace = true;
$wgShowSQLErrors = true;
For details, see Manual:How to debug. AhmadF.Cheema (talk) 09:22, 20 March 2018 (UTC)
Thx for verbose-error config.
But now i'm not getting error or Captcha, even tho enabled.
No matter-- I decided to limit spam with ConfirmAccount extension, instead of Captcha.
-Thx Johnywhy (talk) 10:20, 20 March 2018 (UTC)

Extension:ConfirmAccount Does Not Remove User After Rejection

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Installed and confirmed basic usage of extension. https://www.mediawiki.org/wiki/Extension:ConfirmAccount

But, after Admin rejected an account request, the same username/email could not submit another request.

Received:

Username is already in use in a pending account request.

Any fix? thx Johnywhy (talk) 09:22, 20 March 2018 (UTC)

The page says, in the Known Issues section: If only a few people view the confirm accounts page, the randomly triggered pruning of old requests will not trigger often, so old rejected requests may persist. Ciencia Al Poder (talk) 10:20, 20 March 2018 (UTC)
Thx for catching that. It seems the quote you shared isn't precisely correct. I found the following in \ConfirmAccount\frontend\specialpages\actions\ConfirmAccount_body.php

# Every 30th view, prune old deleted items

if ( 0 == mt_rand( 0, 29 ) ) {
ConfirmAccount::runAutoMaintenance();
}
Maybe i can force prune on every rejection? The function `runAutoMaintenance` lives in \ConfirmAccount\backend\ConfirmAccount.class.php

class ConfirmAccount {

/** * Move old stale requests to rejected list. Delete old rejected requests. */
public static function runAutoMaintenance() {...
thx Johnywhy (talk) 10:54, 20 March 2018 (UTC)
Architecture meetings 50.201.56.82 (talk) 14:09, 20 March 2018 (UTC)
Since this is not MW core, it seems the Archtecture meeting isn't the appropriate place to discuss.
Instead, i contacted the extension author. Thread:
User talk:Aaron Schulz/Flow export#h-ConfirmAccount:_Prune_on_every_rejection?-2018-03-20T16:37:00.000Z Johnywhy (talk) 16:38, 20 March 2018 (UTC)
I created a fix-it task in the extension.
I attempted my fix, but it did not seem to work.
Any suggestions?
https://phabricator.wikimedia.org/T190343 Johnywhy (talk) 21:30, 21 March 2018 (UTC)
looks like i solved it. There are 2 steps:
  • Set rejected items to expire immediately (LocalSettings.php)
  • Prune rejected items at beginning of Request action (RequestAccount_body.php)
Details:
In LocalSettings.php, after required declaration, set Rejected-Age to 0. That ensures rejected requests will be removed on prune-action:
require_once "$IP/extensions/ConfirmAccount/ConfirmAccount.php";
$wgRejectedAccountMaxAge = 0;
Add Prune code to the function that shows the Request form:
in /ConfirmAccount/frontend/specialpages/actions/RequestAccount_body.php, function showForm, add very last command in the function:
old code:
$out->addWikiMsg( 'requestaccount-footer' );
}
new code:
$out->addWikiMsg( 'requestaccount-footer' );
# PRUNE
ConfirmAccount::runAutoMaintenance();
} Johnywhy (talk) 04:21, 22 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Spam users despite using Google reCAPTCHA

For some time we struggled with a lot of spam users (new fake accounts generated) at our wiki. Since using the Google reCAPTCHA (Extension:ConfirmEdit#ReCaptcha (NoCaptcha)) things have gotten better. But still sometimes fake accounts (and pages filled with, mostly Russian, spam text) are created, sometimes 1 per day, sometimes 5 per day, most days no fake accounts created. How is this possibly since bots cannot fill in a captcha (I presume)? Waanders (talk) 09:28, 20 March 2018 (UTC)

https://www.shieldsquare.com/sorry-google-captcha-recaptcha-doesnt-stop-bots/ Ciencia Al Poder (talk) 10:17, 20 March 2018 (UTC)
Okay ... Thanks. So now what? There is nothing to do against this? Waanders (talk) 12:18, 22 March 2018 (UTC)
Depending on the wiki, use QuestyCaptcha.
If you have sufficient access to the server, you can check from what IP they come from, and ban the entire IP range (the whois registry usually gives a hint about the IP range), specially if the IP is from a hosting company. Ciencia Al Poder (talk) 10:43, 23 March 2018 (UTC)
Thanks a lot. "ban the entire IP range": how? Also, it's from different ip-addresses. 99% = Russia Waanders (talk) 11:43, 23 March 2018 (UTC)
For banning IP address ranges, see Help:Range blocks. AhmadF.Cheema (talk) 14:19, 23 March 2018 (UTC)
(This is a test passage to follow up on T190429) Trizek_(WMF) (talk) 17:10, 22 March 2018 (UTC)

How do I add a custom script at the opening of the <head> tag on all pages?

Need to add a short JS script that loads almost instantly on page-load. It needs to be as soon as the <head> tag begins. 173.73.54.201 (talk) 13:30, 20 March 2018 (UTC)

Not sure if this would work, but try using the Google Analytics Extension maybe. It allows you to load custom JavaScript for tracking codes, but it might work for other things too. Nicole Sharp (talk) 16:06, 20 March 2018 (UTC)
Thank you Nicole. I found this extension: Extension:HeadScript. Does anyone have experience with it? It looks like it *might* do what I need. 173.73.54.201 (talk) 16:16, 20 March 2018 (UTC)
You can also try updating MediaWiki:common.js, per manual:interface/JavaScript. Nicole Sharp (talk) 14:21, 21 March 2018 (UTC)
Just tried out Extension:HeadScript. It works for Google Analytics with a Global Site Tag. You can use it for multiple scripts. FYI, the new Google Analytics Global Site Tag is not compatible with the Google Analytics Extension. Nicole Sharp (talk) 14:58, 21 March 2018 (UTC)
Adding script via the Extension:HeadScript method causes my wiki to http 500 error and adding via MediaWiki:common.js I don't see any of the google adsense or analytics scripts in the header when I go to view source (of other pages on my wiki). Is my internet host blocking this? Chuck.Kahn (talk) 21:11, 8 October 2018 (UTC)
The "HTTP ERROR 500" could be due to some incompatibility in the extension version, or even due to a syntax error in your appended code.
Can you share the code (with private data removed) which you add to your LocalSettings.php file? AhmadF.Cheema (talk) 21:33, 8 October 2018 (UTC)
Something like this https://pastebin.com/ndTmcw3s Chuck.Kahn (talk) 00:14, 9 October 2018 (UTC)
I was referring more to the code surrounding the JavaScript code, to see whether there was any syntax mistake in the php code, like the code line used to enable the extension and $wgHeadScriptCode line. AhmadF.Cheema (talk) 01:34, 9 October 2018 (UTC)
Of that pastebin, it seems the "gtag" lines 6 and 8 are the problem. If I leave them out, the page loads. If I leave them in, then "HTTP ERROR 500". Chuck.Kahn (talk) 19:08, 10 October 2018 (UTC)
Changing the ' marks to \' in lines 6 and 8 got rid of the HTTP ERROR 500. Chuck.Kahn (talk) 04:29, 11 October 2018 (UTC)
I am interested in this question.
Ist there a way to add a new <script> tag without using an extension?
Thanks! 192.166.87.116 (talk) 12:38, 29 January 2019 (UTC)

Connecting Two Templates/Tables

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I have two templates (they look like infoboxes) that I am transcluding onto one page. They are tables and properly right-align, but there appears a line-break between the bottom of the first one and the top of the second one. I would like these to flush up to one another, so that the bottom border of the top one is also the top border to the bottom one, or as close as possible.

I currently transclude the templates as: Template:Infobox ATemplate:Infobox B

Any thoughts? Thanks very kindly! Gmlacey (talk) 15:45, 20 March 2018 (UTC)

I figured it out. I just added "margin-top: -15px;" to the bottom template and presto. Gmlacey (talk) 14:35, 21 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

500 Internal Server Error for image galleries

I keep getting a 500 Internal Server Error whenever attempting to copy and paste the following syntax to MediaWiki on DreamHost Shared Hosting. Any ideas on what might be causing it or how to fix it? https://nicolesharp1.dreamhosters.com/sandbox/info.php

Syntax does not save: user:Nicole Sharp/sandboxhttps://nicolesharp1.dreamhosters.com/sandbox/mediawiki/index.php?title=sandbox.

Syntax does save: wikipedia:user:Nicole Sharp/sandboxhttps://nicolesharp1.dreamhosters.com/sandbox/mediawiki/index.php?title=sandbox_2.

Since the single image gallery does save but the page with two galleries does not, it looks like there is some kind of limitation preventing the larger page from being saved. I have tried increasing the allotted PHP settings but to no avail, so that does not appear to be the issue, especially since the full sandbox page does save on AlterVista (which has less resources than DreamHost does): http://nicolesharp1.altervista.org/sandbox/mediawiki/index.php?title=sandbox.

Nicole Sharp (talk) 16:01, 20 March 2018 (UTC)

I think I might have found a workaround. If I simply create the galleries using HTML IMG links instead of wikimarkup with Instant Commons, the page will save and display in seconds instead of minutes (or not at all).
https://nicolesharp1.dreamhosters.com/sandbox/mediawiki/index.php?title=Sandbox_4
Any idea though why the page will not save if the Wikimedia Commons images are wikilinked to, but will save if they are hyperlinked to?
Nicole Sharp (talk) 01:56, 21 March 2018 (UTC)
Qapla'!! Switching from FastCGI to CGI resolved the problem. Nicole Sharp (talk) 17:56, 21 March 2018 (UTC)

Pope Francis Article Needs Small Edition

In the article of Pope Francis his title as a Pope only refers to him as Francis in the section near his Photo or Image, previously other past Popes such as Benedict XVI refers to him as Pope Benedict XVI so I suggest to Wikipedia Developers to make that small correction to the Pope Francis article putting instead of Francis to Pope Francis DeutscherFeuer (talk) 17:24, 20 March 2018 (UTC)

This forum is concerned with the technical side of Wikipedia software, for Wikipedia's content it would be better if you made your comments on Wikipedia such as the talk page of the Pope Francis article. AhmadF.Cheema (talk) 18:06, 20 March 2018 (UTC)

using the word "head" throws error

When I edit a page and try to use the word "head" at the beginning of the 2nd line and click save or preview it throws an error.

screenshots at http://wiki.kurtheriangambit.com/ss/

Is this intended or is there something wonky with my install? v1.30, no extensions. only edits are to stop all users from editing other than sysops.

total MW newb here.

thx. Angelycan (talk) 21:34, 20 March 2018 (UTC)

Remove. Wikipedia old version 43.245.123.128 (talk) 23:28, 20 March 2018 (UTC)
This may be a ModSecurity problem. Ask your host to disable it. Ciencia Al Poder (talk) 10:19, 22 March 2018 (UTC)

Extension Search Engine?

Special:PrefixIndex is best available search engine for extensions. Selection "Extension" namespace. But, not an adequate search engine, because it searches only the beginning of the name.

Is there a search engine for extensions?

Or a complete list of all extensions on a single page?

thx 76.174.146.55 (talk) 07:00, 21 March 2018 (UTC)

See Category:Extensions#Finding extensions AhmadF.Cheema (talk) 07:06, 21 March 2018 (UTC)
Thx for reply, but that's not a search engine for extensions, nor a complete list of all extensions on a single page.
I finally found an extension search engine here:
Manual:Extensions
Suggestion: put that search engine on these pages:
Category:Extensions
Special:AllPages/Extension:
However, i'm skeptical that this returns complete results, because searching for "prefix:Extension" only returns 111 results, and i think there must be more than 111 extensions.
https://www.mediawiki.org/w/index.php?title=Special:Search&limit=500&offset=0&profile=default&search=prefix%3AExtension
Also found a complete list of all extensions, but not maintained:
Extension Matrix/AllExtensions
Is there a way to list on a single page all items with a certain prefix? Seems that ought to be a "SpecialPage". Johnywhy (talk) 07:25, 21 March 2018 (UTC)
This one seems a superior search engine, setting Namespace to "Extension":
Special:PrefixIndex
But, not an adequate search engine, because it searches only the beginning of the name.
Seems this would be a better extension search-engine to put on Manual:Extensions Johnywhy (talk) 07:51, 21 March 2018 (UTC)

Upload/Insert Button for Non-Image Files?

With $wgStrictFileExtensions = false, the upload page allows to upload non-image files. But there's no point-and-click way to insert the file into a page.

Is there a way to get an upload/insert button on edit toolbar, to insert non-image files? Johnywhy (talk) 07:06, 21 March 2018 (UTC)

The new Visual Toolbar seems might offer this functionality. Unfortunately my host doesn't support node.js
Without Visual Toolbar, this seems a possible option--
Extension:WikiEditor/Toolbar customization Johnywhy (talk) 07:55, 21 March 2018 (UTC)

Bug: upload button on edit toolbar only allows images with $wgStrictFileExtensions = false

Bug: upload button on edit toolbar only allows images, even if $wgStrictFileExtensions = false Johnywhy (talk) 07:07, 21 March 2018 (UTC)

See https://phabricator.wikimedia.org/T190258 Malyacko (talk) 09:45, 22 March 2018 (UTC)
heh :) Thx, @Malyacko. I'm the person who created that task. Johnywhy (talk) 11:25, 22 March 2018 (UTC)

How to List All Items with a Certain Prefix?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Is there a "SpecialPage" to list all pages with the same prefix? Such as "Project", "Special", "Extension" etc. Johnywhy (talk) 07:44, 21 March 2018 (UTC)

Special:PrefixIndex Johnywhy (talk) 07:46, 21 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Bug? Embedded
Does Not Embed Search Controls

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Embedded
in a page does not embed search controls. Instead it displays a very large list of pages.

How to display search controls?

thx Johnywhy (talk) 08:37, 21 March 2018 (UTC)

Transcluding special pages only outputs results. You can set parameters as in templates to customize display but users can not set another values without changing page source. wargo (talk) 11:03, 21 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

About Edit Tokens

Hi everyone,

for my project, i'm developing some Bots for my Wiki to edit pages.

After i successfully logged in with my script, i need an Edit Token to edit or create pages. My question is: does this mean that I need to retrieve an edit token for each page the bot is gonna edit or do i need just one edit token per session?

I'm using MediaWiki 1.29.2 and developing bots in PHP 7.0. Andrea.bozzano87 (talk) 11:25, 21 March 2018 (UTC)

Its probably fine to just use one per session.
If you end up with an error, just fetch a new one and try again. Bawolff (talk) 21:33, 22 March 2018 (UTC)
Ok, i'll try to use just 1 edit token. Thank you for your answer :) Andrea.bozzano87 (talk) 09:35, 23 March 2018 (UTC)
It does not seem to be documented anywhere how long a token is supposed to be valid. In my tests it usually survives many hours and 1000:s of edits. Taylor 49 (talk) 21:10, 10 April 2019 (UTC)
Generally tokens should be tied to the life of the session. There's no particular guarantee how long the session will necessarily last for.
If you want to program defensively, you should have a case to get a new token at any time when you receive a token error. Bawolff (talk) 10:31, 11 April 2019 (UTC)

Fatal error: Class 'SpecialSearch' not found

Been trying to google my way to an answer, but I haven't been very successful at that. I just recently put up a new wiki using mediawiki. But when I try and search a name or a word to try and create a new page with it. I get the following error:

Fatal error: Class 'SpecialSearch' not found in /DOMAIN/mediawiki/includes/specialpage/SpecialPageFactory.php on line 392

It's a fresh install, and I can't seem to be able to figure it out. Any ideas? 185.26.63.4 (talk) 12:37, 21 March 2018 (UTC)

Which exact MediaWiki version? Malyacko (talk) 09:45, 22 March 2018 (UTC)

Need help with log in

The system will not recognize my password. It has been a while since I used it. I asked the system to reset password but I never receive an email after it send it. It is not in spam. I do not have other email addresses. Apparently knows the account exists but I get to reset email. Help. 207.235.23.121 (talk) 13:42, 21 March 2018 (UTC)

Which "the system" is this about? Malyacko (talk) 09:43, 22 March 2018 (UTC)

RESTBase. How to define a different interface

Hi everyone.

I tried to set up the RESTBase server. The server itself runs fine, but it binds to the wrong IP address (I have a machine with several network interfaces). It just takes the first network interface it finds, which is wrong. The Mathoid server has a setting in the conf: section called «interface». The RESTBase server also supports this setting but it is neither documented nor present in the example configuration.

It would be helpful to add this to your documentation!

Thanks!

Swen Pulsargranular (talk) 14:38, 21 March 2018 (UTC)

Restbase documentation sucks, sadly. But this is a wiki, so feel free to edit the page and add the option yourself! Ciencia Al Poder (talk) 10:16, 22 March 2018 (UTC)

New to Wiki Creation: A little direction would help

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Greetings all. Apologies for being stupid. I have always wanted to do a Wiki for my film projects at http://www.ariapictures.com/wiki and I have. BUT!!! I am now lost as to what to do.

I thought it was similar to Wordpress where there were templates, URL structures, and access to the plugins (or extensions). But I am not finding how to adjust their settings (it said they were needed when I chose them on installation)

Also, I noticed on other wiki sites like this one, that the url structure does not use http://ariapictures.com/wiki/index.php?title=Main_Page

How do I remove the "index.php?title=*****" portion so it looks pretty?

Again sorry to be a pain, delete me, remove me, as I will be here asking and learning as much as I can. A new dawn of fun. I am a web designer, but I am thinking that wiki's are blank until you generate pages, which I get, but where are the settings and preferences for the global, not just mine?

Peace - God Bless. GeraldMDavenport (talk) 03:16, 22 March 2018 (UTC)

The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Mediawiki connect to active directory

is it possible connect mediawiki to active directory (MS server 2012) with LDAP?

mediawiki can use LDAP, but I am not sure with active directory 176.74.153.177 (talk) 06:03, 22 March 2018 (UTC)

createAndPromote.php

how do i run createAndPromote.php by ssh from linux to a remote server Notuluca (talk) 14:03, 22 March 2018 (UTC)

See Manual:createAndPromote.php. 星耀晨曦 (talk) 14:19, 22 March 2018 (UTC)
Does not explain how to run the script on a remote server via ssh Notuluca (talk) 14:26, 22 March 2018 (UTC)
No, it explained. Run php createAndPromote.php in your terminal. 星耀晨曦 (talk) 14:28, 22 March 2018 (UTC)
have ssh into server but php gives command not found in maintaince folder Notuluca (talk) 19:06, 24 March 2018 (UTC)
It should be that you didn't put the PHP executable file path into the environment variable. You can run whereis php to find it, it looks like it will be in a bin directory. 星耀晨曦 (talk) 03:44, 25 March 2018 (UTC)

Updating Mediawiki from 1.29 to 1.30 - Error: 42601 ERROR: syntax error at or near "ADD"

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi guys. Long story short, I've taken on the project of upgrading our Mediawiki from 1.15 (I know...) to 1.30. At this point, I've gotten it up to version 1.29 after sorting through the various changes/requirements. But I've finally hit a snag. After moving to version 1.30, it seems Mediawiki still functions just fine, but when I run update.php, I get the error below. In a perfect world we'd be on MySQL/MariaDB since it seems most people use that with Mediawiki, but this is something I've inherited:

----------------------------------------

...Adding value '3D' to enum type media_type.

[a9ba0b22d75b22a89e363931] [no req]   Wikimedia\Rdbms\DBQueryError from line 114   9 of /var/lib/mediawiki/includes/libs/rdbms/database/Database.php: A database qu   ery error has occurred. Did you forget to run your application's database schema    updater after upgrading?

Query: ALTER TYPE "media_type" ADD VALUE '3D'

Function: Wikimedia\Rdbms\Database::query

Error: 42601 ERROR:  syntax error at or near "ADD"

LINE 1: ...se::query root@testwiki... */ TYPE "media_type" ADD VALUE ...

                                                             ^

Backtrace:

#0 /var/lib/mediawiki/includes/libs/rdbms/database/DatabasePostgres.php(262): Wi   kimedia\Rdbms\Database->reportQueryError(string, string, string, string, boolean   )

#1 /var/lib/mediawiki/includes/libs/rdbms/database/Database.php(979): Wikimedia\   Rdbms\DatabasePostgres->reportQueryError(string, string, string, string, boolean   )

#2 /var/lib/mediawiki/includes/installer/PostgresUpdater.php(879): Wikimedia\Rdb   ms\Database->query(string)

#3 [internal function]: PostgresUpdater->addPgEnumValue(string, string)

#4 /var/lib/mediawiki/includes/installer/DatabaseUpdater.php(472): call_user_fun   c_array(array, array)

#5 /var/lib/mediawiki/includes/installer/DatabaseUpdater.php(436): DatabaseUpdat   er->runUpdates(array, boolean)

#6 /var/lib/mediawiki/maintenance/update.php(204): DatabaseUpdater->doUpdates(ar   ray)

#7 /var/lib/mediawiki/maintenance/doMaintenance.php(92): UpdateMediaWiki->execut   e()

#8 /var/lib/mediawiki/maintenance/update.php(249): require_once(string)

#9 {main}

----------------------------------------

Product Version
MediaWiki 1.30.0 (4c97eee)

00:35, 3 March 2018

PHP 5.5.38-1~dotdeb+7.1 (apache2handler)
PostgreSQL 8.4.22lts6

The end goal is to get this fully working with 1.30, and then create a fresh VM on Debian 9/Latest PostgreSQL. SoftekIS (talk) 16:13, 22 March 2018 (UTC)

the ADD VALUE syntax was only added in postgres 9.1. So you should probably move to postgres 9 before h Bawolff (talk) 21:31, 22 March 2018 (UTC)
I'll give that a shot tomorrow. My plan all along was to upgrade the database at some point, but was hoping to get everything working on 1.30 first. But if this works, it's good enough for me :) SoftekIS (talk) 01:53, 23 March 2018 (UTC)
Update: upgraded PostgreSQL to 9.5.1, and the script worked. I noticed while reading the script that it references 1.31, so I wonder if that was even intended to be in 1.30 since 1.30 still says it only requires PostgreSQL 8.3+.
Regardless, thanks for the tip! SoftekIS (talk) 16:41, 23 March 2018 (UTC)
hmm. I filed a bug about that. https://phabricator.wikimedia.org/T190539 Bawolff (talk) 17:01, 23 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Error when uploading files: Could not open lock file for "mwstore://local-backend/local-public/2/2d/Smart.jpg

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi there,

I have recently moved a wikimedia installation from one server to another. Both servers (old/new) are running on IIS.

Everything seems to be working on the new server... however, I'm getting an error when uploading files:

------------------------------

Action failed

Could not open lock file for "mwstore://local-backend/local-public/2/2d/Smart.jpg".

Return to Main Page.

------------------------------

I found some help topics already posted on this forum, however, all of the solutions are related to permissions in Unix. No solutions exist for Windows or IIS.

Any help would be appreciated... I'm thinking I didn't setup something on the new server that was setup on the old one...

Thanks. Teslatradeup (talk) 18:16, 22 March 2018 (UTC)

Check permissions of the images directory and subdirectories. Windows does not have unix style permissions, but do have ACLs which control who can write in what directory. Make sure the webserver is allowed to write to images directory. Bawolff (talk) 21:28, 22 March 2018 (UTC)
Thank you Bawolff - your post made me concentrate my efforts on permissions. I compared all of the folder permissions one by one with the old server and found the issue. All works now.
I had to add the app pool local account for mediawiki to the IIS_USRS group. :) Thanks! Teslatradeup (talk) 03:27, 23 March 2018 (UTC)
. Teslatradeup (talk) 03:26, 23 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Simple calculator

I was thinking of adding a simple calculator to one wiki I am at. I have a JSON file with data that I want to use and fill a combobox with part of this data too. Is it possible to do this without any extension and/or Javascript? Or I'm required to use both in order to achieve this?

Thanks! Kazuma20 (talk) 07:19, 23 March 2018 (UTC)

You need to use both. However, I'm not sure what's the purpose of a JSON file for a calculator. Ciencia Al Poder (talk) 10:36, 23 March 2018 (UTC)
Because I need to use specific data and apply that data to the formulas I have. Kazuma20 (talk) 15:59, 23 March 2018 (UTC)
Have you tried using a Spreadsheet instead of a wiki? Look at open office/Libre office/Microsoft excel Ciencia Al Poder (talk) 10:16, 24 March 2018 (UTC)

jplayer  : audio / video player

Hello,

The layout of sound documents is pretty basic. However there is a full software compatible with Wiki since Freeware and OpenSource.

jplayer http://jplayer.org/

is it planned to implement it?

or do you have another alternative?

I wish to be able to broadcast some of the documentaries I have stored on

www.voixdupatrimoine.net

thank you L.g6r (talk) 07:30, 23 March 2018 (UTC)

See Extension:TimedMediaHandler for what exists and for links to what is (not) planned. Malyacko (talk) 11:50, 24 March 2018 (UTC)
It seems to me that this extension is adapted to the video but as for the documents that wants to put on line, it is not a reader as powerful as JPLAYER.
But what prevents to implement JPLAYER?
which is very light, full compatible with all L.g6r (talk) 14:34, 25 March 2018 (UTC)
Effectivement on peut se poser toutes ces questions mais en final, JPLAYER à cet instant répond bien mieux et de loin à ce qui existe et est en place dans le monde WIKI pour la mise en ligne de fichiers audios.
' VP9 concerne la vidéo '.
Mais au delà ce vos remarques et préconisation, la diversification des solutions offertes à tous sont elles un bien ou un problème ?
actually we can ask all these questions but in the end, JPLAYER at this time responds much better and by far to what exists and is in place in the WIKI world for the upload of audio files.
'VP9 is about video'.
But beyond what your remarks and recommendation, the diversification of the solutions offered to all are they a good or a problem? 109.208.16.78 (talk) 14:02, 27 March 2018 (UTC)
974/5000
It seems to me that the discussion is unequal, you speak as administrator and software technician, I speak as a user like most of us.
I simply realize that the available players are largely perfectible, Jplayer is a possible solution, very simple to implement by a neophyte (there is only one HTML page to adapt each time by putting the name of the author and the names of the audio files).
By visiting the JPLAYER website, you will have all the answers to your questions and the MABOA developer will answer all your questions on the dedicated forum.
I understand that it is necessary to have technical constraints to
cordially L.g6r (talk) 05:29, 2 April 2018 (UTC)
We have an audio and video player. If there are problems with the current audio and video player you'd need to list specific problems. Currently, "support jplayer" is a solution to an unidentified problem so nobody knows why to spend time on jplayer. (I visited the Jplayer website and I did not find all answers so I asked them here for you as you came up with the jplayer request for reasons we don't know.) Malyacko (talk) 13:25, 4 April 2018 (UTC)

[RESOLVED] Spoilers with lazy loading for heavy content

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi,

I'm not sure if I understand how browsers (Chrome) should work, but I've faced with the following issue. I have a page that's grown up to 50-60 embedded YouTube videos (due to historical reasons). Page load time now takes about 2-3 minutes and the page along with the tab it's hosted in becomes not responsible: the tab just gets frozen. I don't want to split the page into smaller smaller pages because I want the page keep its history and view count. The idea that came to my mind is hiding all embedded videos into spoilers.

Ok, I've implemented a pure HTML/CSS spoilers solution, but it requires at least label, and input/type=checkbox tags/attributes set to be allowed. HTMLTags does not work because it does not allow to nest tags and content, allowing its content to be plain text only. So, I found another way: the Spoilers extension. The latest version of the extension cannot work because I must use MediaWiki 1.23.6, so I had to downgrade the extension to 1.2 (thanks to Git tags). However, when I enclosed all embedded videos in the spoiler tag, it had no effect, and the browser seemed to load embedded videos even if no spoiler was open. Therefore, I'm stuck with not responsible frozen page.

What I'm looking for is: is there any way of making spoiler-ed content lazy and not load content unless the content becomes visible? I suspect I have wrong assumptions about browser DOM rendering., though, but any ideas are really welcome.

Thank you in advance! 92.253.250.171 (talk) 09:32, 23 March 2018 (UTC)

Using MediaWiki 1.23.6 is a security risk. Please upgrade.
About youtube videos, how are you including them? Maybe the problem is in the way how are they being embedded. Ciencia Al Poder (talk) 10:35, 23 March 2018 (UTC)
Thanks for pointing out the security risk!
I'm currently using Extension:EmbedVideo 2.1.8 that provides <nowiki>{{#ev:youtube}}</nowiki>. 92.253.250.171 (talk) 11:03, 23 March 2018 (UTC)
Hm, it looks like this is how browsers work. Let's say if have a single div with style=display:none, and many iframes in it, the browser will still load all iframes. and the page gets not responsible and lagging for significant amount of time
Is there probably a workaround, or should I come to terms of splitting the page into smaller ones losing its history consistency? 92.253.250.171 (talk) 11:11, 23 March 2018 (UTC)
Unfortunately, display:none does not stop browser from rendering and fetching external resources .I finished up with a custom-patched version of the Spoilers extension, where I load the spoiler-ed content lazily using JavaScript. Now the page loads instantly without any lags. 92.253.250.171 (talk) 23:37, 23 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Country & City Listing API

Is there any country and city listing api there from wikivoyage? Can anyone please provide us those links and how to use?

Thanks Ankur matrix (talk) 14:18, 23 March 2018 (UTC)

I don't know about any. You should ask at wikivoyage though. —TheDJ (Not WMF) (talkcontribs) 19:44, 23 March 2018 (UTC)

Move MediaWiki 1.19 to New Server (database remaining on different existing server) - Linux

Hello,

We are running MediaWiki 1.19.0, on Cent0S server, with MySQL database residing on a different CentOS server. We would like to "move" our MediaWiki to a new CentOS server, and point it to the existing MySQL server. We have found documentation on MediaWiki's FAQ site, on moving a MediaWiki; however, it does not provide detail for the scenario we are trying to accomplish. We were planning to stay with the 1.19.x version, as suggest by MediaWiki, for when moving a MediaWiki.

Has anyone reading this been through this process? If so, would you be willing to share how you went through this and any pitfalls you may have discovered?

Thanks! Itdocs (talk) 14:37, 23 March 2018 (UTC)

In general, you need to know that your property has user uploaded files and the database. If you keep MySQL server, then you only care about files.
  1. Before moving, make sure that the target server environment is not much different from the current server environment, otherwise you may have to deal with the issue due by the difference.
  2. Back up your site files before moving.
  3. Pay attention to the problems caused by file permission after moving.
  4. Note SELinux. 星耀晨曦 (talk) 15:52, 23 March 2018 (UTC)

Cannot Find files with extension "xlsx"

I can upload XLSX files with no Problem. But when I try to open it, goes to /Images/dir/dir/*.xlsx "There is currently no text...."

Its working for /images/dir/dir/*.xls

Thanks! Nihalpandit (talk) 15:03, 23 March 2018 (UTC)

Upgrade to mediawiki-1.28.0 Killed my PW and I now cannot log in

I got caught unaware with a new update to a new version of MWiki, in which my old password was rendered unusable. This is a local installation with no internet access to any outside my computer, so I have not been "hacked." The account is still there, I simply cannot:

1) log in, won't accept stored password;

2) cannot CHANGE pw because of the above; will not accept "previous" password. I don't really want to set up another account; I want to use the one I already have.

So, how to nuke the existing password and account files, and simply set up a new account over the old one? Surely there's a way to do that.

System: FC Linux, version 4.15.9-200.fc26.x86_64. 216.36.161.27 (talk) 15:09, 23 March 2018 (UTC)

Will the upgrade lose password? Very strange. Fortunately, we have a command line script to change a user password -- changePassword.php. 星耀晨曦 (talk) 15:41, 23 March 2018 (UTC)
Sounds like a configuration problem to me. Maybe an update script had been used to convert the passwords to a new format, e.g. to pbkdf2, but LocalSettings.php has been configured not to use this format?
This problem should then not only affect one user, but all users. In this case running changePassword.php would be needed for all users... 2001:16B8:10B9:200:9846:F04:B025:5A5E (talk) 15:46, 23 March 2018 (UTC)
This script will only change the password for the specified user. 星耀晨曦 (talk) 15:58, 23 March 2018 (UTC)
Right. What I wanted to say is: If really all users are affected, changePassword.php is not really a good option. Actually, I - just like you - do not quite understand, how the problem happened. Without knowing what now is wrong exactly, it will be hard to give a good advice.
More investigation will be needed! 2001:16B8:10B9:200:982A:8317:6182:F7C5 (talk) 16:01, 23 March 2018 (UTC)
Have you backed up the pre-upgrade database? This allows you to roll back your upgrade.
Is there a weird thing happening when you run update.php? 星耀晨曦 (talk) 16:05, 23 March 2018 (UTC)

How to subscribe to a Phabricator file?

Hello. I want to be notified every time the "MessagesHE.php" file is modified (whether via an email or an alert on Phabricator, it doesn't matter).

In the "MessagesHE.php" page on Phabricator, I don't see any button that says "Subscribe" or something similar. Is there any way to get notifications or emails for changes to this file? Guycn2 (talk) 20:35, 23 March 2018 (UTC)

I do not see how Phabricator comes into play: It's just one of the places where code repository files are listed; https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+log/master/languages/messages/MessagesHe.php would be another.
Gerrit/Code review#Finding patches to review seems to offer only getting notifications about entire projects.
(For future reference, Talk:Phabricator/Help is the best place to ask Phabricator questions.) AKlapper (WMF) (talk) 11:49, 24 March 2018 (UTC)
You can add yourself to Git/Reviewers#mediawiki/core if you want. This will add you as a Gerrit reviewer to every patch that modifies a file matching the given regular expression. The file_regexp for you could simply be MessagesHe\.php. This, that and the other (talk) 02:03, 26 March 2018 (UTC)
Thank you both for your help.
@This, that and the other: , I have added myself to this list, but it doesn't seem to work well... Guycn2 (talk) 05:10, 26 March 2018 (UTC)
You wrote file-regexp. The parameter is called file_regexp. AKlapper (WMF) (talk) 10:13, 26 March 2018 (UTC)
I tried re-adding you: https://www.mediawiki.org/w/index.php?title=Git/Reviewers&diff=2745847&oldid=2745638 This, that and the other (talk) 11:25, 26 March 2018 (UTC)
Thank you so much! Where will I be able to see new changes to this file? Also, is it possible to add me as a reviewer to the he.json file (which is the main file of Hebrew system messages)? Guycn2 (talk) 10:21, 27 March 2018 (UTC)
You can separate the regular expressions by a pipe character (|). So you would use MessagesHe\.php|/he\.json. I put the extra forward slash in there to avoid getting notified for any language codes which happen to end in he, such as (made-up example) the.json.
As for what happens, you'll get a series of emails. You may find you need to set up some email rules in your mail program/website to filter some of these out, but that aspect of it is up to you. This, that and the other (talk) 11:41, 27 March 2018 (UTC)
Thanks a lot, I really appreciate your help! Guycn2 (talk) 11:56, 27 March 2018 (UTC)

Is it possible to re-enable the Related Articles feature on Hebrew Wikipedia, for desktop view? After gaining community consensus, of course. It should be possible by changing wmgRelatedArticlesFooterWhitelistedSkins on InitialiseSettings.php, it has already been implemented on ht.wikipedia according to their community request. I'm just asking to make sure it's possible, as we're now discussing about it on he.wikipedia. Guycn2 (talk) 22:47, 23 March 2018 (UTC)

How To Purge Files on Delete?

On Special:Upload, when i try to upload a file that was previously deleted, i receive a warning.

Warning: A file by that name has been deleted or moved.

The warning offers "Ignore warning and save file anyway"

That's fine. But, in page source-edit, when i try to re-upload a deleted file, i do NOT get the option to "Ignore warning and save file anyway".-- i'm simply blocked from uploading the file.

How can i purge deleted files, so they can be re-uploaded immediately after deletion?

Is there a file-expiration setting i can add to LocalSettings.php? Johnywhy (talk) 23:46, 23 March 2018 (UTC)

That's interesting. Can you take me through the exact steps you are taking in the page-source editor to upload the file? (as in, exactly which buttons you are clicking, what you type, etc) This, that and the other (talk) 02:05, 26 March 2018 (UTC)
  1. Click "Edit Source".
  2. Click "Embedded file" button.
  3. Click "Upload" button.
  4. Click "Select a file" button, and pick previously uploaded-and-deleted file.
  5. Check "This is my own work", and click "Upload" button.
  6. Enter Description and click "Save" button.
  7. Receive error:
    Something went wrong. A file with this name exists already, please check https://gunsense.xyz/index.php/File:Gun-deaths.jpg  if you are not sure if you want to change it.
  8. Click "Dismiss".
  9. "Save" button is now grayed out. No option given to "Ignore warning and save file anyway" Johnywhy (talk) 01:56, 28 March 2018 (UTC)
Reported at phab:T190913. I have a funny feeling this is already tracked under another task, but I couldn't find one. This, that and the other (talk) 09:59, 28 March 2018 (UTC)

Foreign file repository isn't showing any images

We have a wiki accessible on https://soyuz.red and a file hosting wiki accessible on https://media.soyuz.red where all the pictures are supposed to be uploaded to. We tested uploading pictures and posting them on the wiki. Pictures can be uploaded but they can't posted on the wiki where they should be displayed.

This image was uploaded: https://media.soyuz.red/File:Red_eagle.png

This is a link to the sandbox where the same picture is posted but it doesn't appear. https://soyuz.red/Soyuz:Sandbox Instant Commons isn't working on that page either but it works on the Media Wiki because we use Wikipedia Commons pictures for templates.

This is the code we have for the file repository:

$wgForeignFileRepos[] = [
    'class'                   => 'ForeignAPIRepo',
    'name'                    => 'filewiki',
    'apibase'                 => 'https://media.soyuz.red/api.php',
    'hashLevels'              => 2,
    'fetchDescription'        => true,
    'descriptionCacheExpiry'  => 43200,
    'apiThumbCacheExpiry'     => 86400,
];

X Sturm0vik X (talk) 04:03, 24 March 2018 (UTC)

Autoblock blocks all users (Extension 'Check user' shows that all users have the same ip used by my proxy)

After I click checkbox 'Automatically block the last IP address used by this user, and any subsequent IP addresses they try to edit from' on block page and submit, all users are blocked. Extension 'Check user' shows that all users have the same ip used by my proxy. I can find members' real ips only by entering my proxy server ip and then inspecting XFF field. Is it possible to autoblock user correctly? Apaokin (talk) 10:56, 24 March 2018 (UTC)

Why Does Manual Recommend to Allow Execution of Uploaded Files?

isn't this a giant security hole?

Manual:Configuring file uploads#Check directory security Johnywhy (talk) 20:25, 24 March 2018 (UTC)

might be explained by this:
"Execute privilege on directories is required to access files inside them. (Yes, this is confusing. Blame AT&T.) --Brion VIBBER 00:47, 19 February 2006 (UTC)"
Manual talk:Configuring file uploads#Chmod Johnywhy (talk) 20:30, 24 March 2018 (UTC)
so how to prevent execution of uploaded files? Johnywhy (talk) 20:31, 24 March 2018 (UTC)
Note that folders need to be executable to access them. Files should not be executable - to view them, read rights are enough. 2001:16B8:1090:5700:FDD4:A2A:2A46:C98 (talk) 23:17, 24 March 2018 (UTC)
then what will be the default execute rights on uploaded files (if they are inside of an executable directory)? Johnywhy (talk) 06:47, 25 March 2018 (UTC)
is it a security risk to upload executable files? Johnywhy (talk) 01:58, 28 March 2018 (UTC)

When i insert a special page link into a wiki page, the wiki page displays the result (ie the output of the special-page link). Which is great.

The problem arises when you edit the page in TinyMCE. In TinyMCE editor, you don't get the special-page link, you get the special-page output.

If you touch the output in TinyMCE, the special link breaks.

Solution: TinyMCE should display the special-page link, not it's output.

How to make TinyMCE display the special-page link, instead of it's output? Johnywhy (talk) 07:04, 25 March 2018 (UTC)

How to make my mediawiki site "Responsive" to different computer sizes?

Hello Everyone,

Am having a trouble these days, I wanted to change the layout of my MediaWiki site to adopt the Amharic Wikipedia and I edit the 'main page' to have four boxes aligned just as Amharic Wikipedia and it was a success in my computer all the layout and styling.

But, when I see it in other computers, the site (especially) the 'main page' rendered differently than in my computer. I thought it was due to by my improper use of CSS. So, I reedited the code. But, the problem is still unsolved.

I mean my MediaWiki site still rendered differently, in different computer screen sizes, than I expected.

Then, After I read a lot on MediaWiki I can understood that I should edit my MediaWiki site's MediaWiki:Common.css.

But, I do not know how I should I edit MediaWiki:Common.css, because I do not know the exact class

names which I should write a CSS code in order to make my MediaWiki site Responsive.

Thus, I was thinking If I can found anyone who is willing to help me out with this problem - How can I make my MediaWiki site 'Responsive' to different computer screen sizes?

----- I can not share the URL of My MediaWiki site, because it is deployed as an Intranet.

I am running - MediaWiki 1.26.0

PHP 5.6.19 (cgi-fcgi)

MySQL 5.7.11-log

Best Regards, AddisuMekonene (talk) 13:20, 25 March 2018 (UTC)

See https://www.mediawiki.org/wiki/Manual:Mobiles,_tablets_and_responsive_design and discussion in https://www.mediawiki.org/wiki/Project%3ASupport%20desk/Flow/2014/11#h-Responsive_skins_for_mobiles%2C_tablets_and_PCs-2014-11-08T17%3A33%3A00.000Z
Also note that MediaWiki 1.26 is an ancient insecure version. Please upgrade to supported software for your own safety. Malyacko (talk) 13:55, 25 March 2018 (UTC)
Only my 'main page' is not Responsive, other pages are responsive, it is very disturbing to see the 'main page' (which is also the default 'Home Page') rendered bad to different computer screen sizes.
So, is there any way to only make this 'main page' Responsive to different Computer Screen Sizes?
The second one is, I wanted to upgrade my MediaWiki, but my MySQL database root password says Access denied, even though I have the right password!
I do not know what I should supposed to do.@Malyacko AddisuMekonene (talk) 14:13, 25 March 2018 (UTC)
By "different Computer Screen Sizes" do you mean the mobile version of the website shown while using Extension:MobileFrontend? In which case, also see Project:Support desk/Flow/2018/03#h-How_to_create_a_Main_Page_for_mobile_version_Wikipedia?-2018-03-11T03:14:00.000Z. AhmadF.Cheema (talk) 15:17, 25 March 2018 (UTC)
My MediaWiki site is not accessible from Mobile! It is only accessible from Desktop Computers.
And I only need to make the 'main page' (Home Page) Responsive to to different Computer Screen Sizes.
My Question is How can make the 'main page' Responsive just by tweaking the MediaWiki:Common.css using CSS Media Queries ?
Thank you once again in advance. AddisuMekonene (talk) 15:35, 25 March 2018 (UTC)
You mentioned that you adopted the Amharic Wikipedia. As far as I can see, its code is enough to make the Main page columns responsive without the need for additional CSS rules. What is the code that you are using for your Main page? AhmadF.Cheema (talk) 16:15, 25 March 2018 (UTC)
Send me your email so that I can attach you the code @AhmadF.Cheema
I can not copy paste it here. AddisuMekonene (talk) 08:34, 26 March 2018 (UTC)
Private emails do not help others and do not scale. If you have a minimal self-contained testcase then please upload your minimal self-contained testcase somewhere. Thanks! Malyacko (talk) 12:38, 28 March 2018 (UTC)

Making Categories from Page Name

My pages are named as dates, such as, "March 25, 2018"

I am looking to automatically pull from the page name the following values individually so as to make categories from them, without me having to automatically enter them each time: "March" "March 25" and "2018"

I believe if I wanted the whole page name as a category, I could just do [[Category:{{PAGENAME}}]] (I think). Any thoughts on just getting the specifics, though? Many thanks. Gmlacey (talk) 19:32, 25 March 2018 (UTC)

How to Embed List of All Namespace-Pages in a Wiki Page?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


When i move a page to a custom namespace, then it's no longer listed in
{{Special:AllPages}}

How to embed list of all pages in a custom namespace? Johnywhy (talk) 19:44, 25 March 2018 (UTC)

i think the answer is here, but not sure how to use it.
https://en.wikipedia.org/wiki/Template:List_subpages#Example
i don't care about prefix or user, just namespace. and i guess i'll have to learn about templates. Johnywhy (talk) 19:50, 25 March 2018 (UTC)
Special:AllPages has a filter for namespace. It only displays pages in the main namespace by default. Ciencia Al Poder (talk) 09:33, 26 March 2018 (UTC)
Thx, can you give a clue?
The following don't work:
{{List subpages|My_Namespace}}
{{List subpages|prefix|content namespace|caption=My_Namespace}}
{{List subpages My_Namespace}}
{{ns:My_Namespace}}
{{List My_Namespace}}
{{Special:My_Namespace}}
{{list subpages|My_Namespace|Namespace}}
{{List subpages namespace=My_Namespace}}
You said "filter", implying that, without a filter, Special:AllPages will display all pages in all namespaces. But it doesn't. The following only shows pages which are in the Main namespace:
{{Special:Allpages}}
Johnywhy (talk) 23:20, 26 March 2018 (UTC)
{{Special:Prefixindex/Namespace}} where "namespace" is your namespace. wargo (talk) 01:21, 27 March 2018 (UTC)
thx. Not working. I must be doing something wrong.
This page shows 2 pages in the Gun Sense Rebuttals namespace:
https://gunsense.xyz/index.php?title=Special%3APrefixIndex&prefix=&namespace=4
But those pages do not appear in This page
https://gunsense.xyz/index.php/Scrap
which contains the source below, based on your example:
{{Special:Prefixindex/Gun_Sense_Rebuttals}}
Is this a whitespace problem? The following doesn't work either:
{{Special:Prefixindex/Gun%20Sense%20Rebuttals}}
nor does:
{{Special:Prefixindex/Gun Sense Rebuttals}}
thx Johnywhy (talk) 02:31, 27 March 2018 (UTC)
"scrap" is not in this namespace. wargo (talk) 09:11, 27 March 2018 (UTC)
"scrap" is not in this namespace.
why is that important? Johnywhy (talk) 09:33, 27 March 2018 (UTC)
You need to list pages from certain namespace, right? wargo (talk) 09:35, 27 March 2018 (UTC)
right.
this page shows there are 2 pages in the namespace of interest--
https://gunsense.xyz/index.php?title=Special%3APrefixIndex&prefix=&namespace=4
i understand that 'scrap' is not in the namespace of interest.
i don't understand why that's important. Johnywhy (talk) 09:36, 27 March 2018 (UTC)
If it is not in namespace of interest why you would to display it? What pages you want to list? wargo (talk) 10:34, 27 March 2018 (UTC)
You must add the colon:
{{Special:Prefixindex/Gun Sense Rebuttals:}} Ciencia Al Poder (talk) 10:19, 27 March 2018 (UTC)
I think there is a mistake above.
{{Special:Prefixindex/Namespace}} where "Namespace" is not the namespace but actually the prefix.
Adding the colon at the end, gives the namespace pages. AhmadF.Cheema (talk) 10:20, 27 March 2018 (UTC)
Bingo. This works:
{{Special:Prefixindex/Gun Sense Rebuttals:}}
This works identically, so whitespace is ok!
{{Special:Prefixindex/Gun_Sense_Rebuttals:}}
{{Special:Prefixindex/Namespace}} where "Namespace" is not the namespace but actually the prefix.
-- Are you saying that, without colon, i need to enter a prefix someplace? Johnywhy (talk) 13:34, 27 March 2018 (UTC)
I meant that without the colon, i.e. writing something like {{Special:Prefixindex/Foo}} would give all the pages whose names start with Foo. AhmadF.Cheema (talk) 13:41, 27 March 2018 (UTC)
Ah, so the colon is just part of the prefix-name, and not part of any magic syntax in this embed ("transcode"?).
And a prefix-name is really just part of the wiki page-name, right? Again, not magic. But mediawiki namespace features simply interpret a colon in a page-name as a namespace delimiter, correct?
If a prefix was, say, "Foo-", for example, then i'd use
{{Special:Prefixindex/Foo-}}
In that case, namespace features would not recognize Foo as a namespace. Johnywhy (talk) 14:13, 27 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to use ISO 8601 DATETIME for signature timestamps?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


How do I display ISO 8601 DATETIME for ~~~~ signature timestamps? E.g. to get "Nicole Sharp (talk) 11:21, 26 March 2018 (UTC)" to display as "Nicole Sharp (talk) 2018-03-26T07:21-04:00" instead? Note that I would like to include the local timezone difference (-04:00 for EDT, -05:00 for EST) if possible (otherwise just as Z). Nicole Sharp (talk) 11:25, 26 March 2018 (UTC)

I think I got something: <code>{{#time: Y-m-d"T"h:i:s"Z"}}</code> prints 2026-05-11T01:24:20Z. But how do I get that into signatures? I didn't see how to adjust dynamically for timezone either since the default timezone is UTC (Z). Help:Extension:ParserFunctions##time Nicole Sharp (talk) 12:00, 26 March 2018 (UTC)
But that code will change the date whenever the page is resaved. It would need to be converted to text to be preserved as a signature timestamp. Nicole Sharp (talk) 12:10, 26 March 2018 (UTC)
Solved! It looks like adding this to LocalSettings.php did the trick:
## https://www.mediawiki.org/wiki/DefaultUserOptions
$wgDefaultUserOptions['date'] = 'ISO 8601';
Nicole Sharp (talk) 05:51, 29 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

upgrade/install of 1.30.0 over 1.28.1 fails mysql connection

Hey,

I am currently on 1.28.1 attempting update to 1.30.0 using a db backend with ssl required.

my wiki vps os is debian 8 updated to latest packages.

If i leave my previous LocalSettings.php in the root folder i get

[93f135981d2034ebf2c31945] 2018-03-26 12:28:44: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"

If i try to update using /mw-config url, after i input db settings from my old LocalSettings.php I get

Cannot access the database: Access denied for user 'mediawiki_user'@'<MY_WIKI_HOSTNAME>' (using password: YES) (ACTUAL_MYSQL_SERVER_HOSTNAME).

Check the host, username and password and try again.

...

My sql server is configured to accept only ssl sessions for this user. I guess that's the problem the installer is having.

Just to be clear, connecting using ssl from the shell to the mysql server works fine. I just did a backup previous to update using shell mysqldump. Seccentral (talk) 12:33, 26 March 2018 (UTC)

I worked around this issue by tunneling the mysql connection via SSH and cloning the user in the database to have access without requiring SSL, so that the mediawiki installer can access what it sees as a local "127.0.0.1" mysql server. Database upgrade worked and now i'm on 1.30.0 Seccentral (talk) 13:29, 26 March 2018 (UTC)

Where I can type the PHP code to automate the Wiki page (see point 2) ?

Is it doable to get the content of one Wiki page and put them on another page using Semantic Mediawiki ?

  1. I have MediaWiki installed and its extension Semantic.I want to use PHP for doing the above task.
  2. Where I should write my code in my case for e.g. we use Eclipse IDE for Selenium ?
  3. How would I identify the objects from the web page ?
  4. Any tutorial or link I must refer to do this task. Pa041p (talk) 12:58, 26 March 2018 (UTC)
@Support 1 :- Can someone please look into it ? Pa041p (talk) 13:50, 26 March 2018 (UTC)
The question might be too vague. Please be more specific which underlying specific problem you would like to solve. In general, it is possible to transclude content of one wiki page into another: https://en.wikipedia.org/wiki/Help:Labeled_section_transclusion#Section_marking Malyacko (talk) 12:37, 28 March 2018 (UTC)

Hi, I was checking out a wikipedia page. And as reference I saw a link to a low quality website about loans with not even contact information in this website. To where I can send this information? Outspoken2014 (talk) 15:07, 26 March 2018 (UTC)

Hi, to the talk/discussion page of that Wikipedia page. Malyacko (talk) 16:50, 26 March 2018 (UTC)

prevention against hijacking

can anybody help me with this problem in my wiki?

when i try to log in to my wiki, it will tell me this:

There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Go back to the previous page, reload that page and then try again.

apparently, this had to do with 1.27, but i am on 1.30, and when i had to change a variable, the variable didn't exist.

perhaps it was the VisualEditor extension that i extracted and then moved to the 'extensions' folder, because before i installed that, it worked perfectly fine.

can anybody pls help? DM5Pedia (talk) 17:03, 26 March 2018 (UTC)

By "variable", I assume you meant $wgSessionCacheType. The variable always exists, although it might not be specifically present in your LocalSettings.php.
Try setting the following in your LocalSettings.php and see if it works: $wgSessionCacheType = CACHE_DB; AhmadF.Cheema (talk) 20:13, 26 March 2018 (UTC)

Class 'SpecialSearch' not found

Been trying to make a wiki. But whenever I try to use the search function, I get the following error.

Fatal error: Class 'SpecialSearch' not found in /home/httpd/...../mediawiki/includes/specialpage/SpecialPageFactory.php on line 392 WildestDrake (talk) 19:52, 26 March 2018 (UTC)

Where did you get your MediaWiki files from? Git? Tar archive?
Did you recently perform an upgrade? AhmadF.Cheema (talk) 20:21, 26 March 2018 (UTC)
It was the .tar.gz hosted on the mediawiki main page. I assume that you suspect it may be an unpacking issue? I used 7-zip. First once for the .gz then again for the .tar
And then uploaded the whole content to the /mediawiki directory. I am right now in the middle of uploading a newly downloaded and unpacked in a fresh install area. I.e deleted and wiped the database. WildestDrake (talk) 20:37, 26 March 2018 (UTC)
Fresh install from the Mediawiki site. Think it could've been an extraction issue? WildestDrake (talk) 20:23, 26 March 2018 (UTC)
Not an unpacking issue, at-least not directly.
Issues like yours commonly happen when files from a newer MediaWiki version are extracted over files from an older MediaWiki version. You should always unpack the new version first in an empty directory and then copy to this directory your LocalSettings.php, images etc. AhmadF.Cheema (talk) 01:12, 27 March 2018 (UTC)

Hide certain fields for unregistered users

Hey! I'm using Mediawiki in combination with PageSchemas to create a DB. Until now the DB is only a working tool, but we plan to go online in a few weeks.

Since it is for the moment a private DB there are some fields in our schemas containing notes that are supposed to be only private notes for the contributors.

Is it possible to cofigure MediaWiki/PageSchemas in such a way, that certain fields may not bee seen by unregistered users? 83.175.70.69 (talk) 20:24, 26 March 2018 (UTC)

Namespace vs Category?

When to use one or the other? Is the info in this table available someplace? Johnywhy (talk) 00:06, 27 March 2018 (UTC)

Upgrade Issue from 1.26 to 1.30: All Styles gone

Hi,

I upgraded MediaWiki version 1.26 to 1.30 in our test environment.

https://vpfaa.webtest.iu.edu/~vpfaa/academicguide2/index.php/Main_Page

I actually made a copy of this MediaWiki site so I could test it.

https://vpfaa.webtest.iu.edu/~vpfaa/academicguide/index.php/Main_Page

I did that so I do not actually break the original one. Now both of them are missing CSS and other styles.

In production environment it looks like this:

https://www.indiana.edu/~vpfaa/academicguide/index.php/Main_Page

We thought of upgrading because we upgraded PHP to version 7.1 and version 1.26 is not compatible with version 7.1. In production we are right now just pointing .htaccess to version 5.6 of PHP so that it works.

Any help to resolve the issue above will be apreciated.

Thanks,

Akbar Akbarehsan (talk) 01:35, 27 March 2018 (UTC)

In your LocalSettings.php set $wgShowExceptionDetails to true in order to display the complete error message.
Also might be relevant: Manual:Errors and symptoms#The wiki appears without styles applied and images are missing. AhmadF.Cheema (talk) 07:02, 27 March 2018 (UTC)
Hi,
Thanks for your response. I have it mostly fixed.
https://vpfaa.webtest.iu.edu/~vpfaa/academicguide2/index.php/Main_Page
but the left navigation has scrolled down a little.
Any thoughts and ideas?
Thanks. Akbarehsan (talk) 13:15, 27 March 2018 (UTC)
There is a .CSS rule being loaded for your Wiki:
@media screen{div#column-content{width:100%;float:right;margin:0 0 0.6em -12.2em;padding:0}
The "margin" part is the one causing the problem.
By-the-way, with the MediaWiki core upgrade, did you also update the Skin files too? AhmadF.Cheema (talk) 13:38, 27 March 2018 (UTC)
This is for the first time I am dealing with Media Wiki. We did not upgrade the skins file.
How do we do it? We may have a backup of the old skins directory.
Thanks. Akbarehsan (talk) 13:51, 27 March 2018 (UTC)
How exactly did you perform the upgrade? Did you use a tarball archive? And then did you extract the archive in a new directory or directly in the older MediaWiki version's directory? AhmadF.Cheema (talk) 14:26, 27 March 2018 (UTC)
I used a tar ball and used tar xvzf to extract into the install directory. And then ran php update.php
Thanks. Akbarehsan (talk) 14:31, 27 March 2018 (UTC)
I extracted it directly into the older Media Wiki's version directory. Akbarehsan (talk) 14:32, 27 March 2018 (UTC)
And now I have updated files for default MonoBook Skin as well with no impact. Akbarehsan (talk) 14:33, 27 March 2018 (UTC)
The new upgraded tarball should be extracted into a new directory.
See Manual:Upgrading#Unpack the new files. AhmadF.Cheema (talk) 14:47, 27 March 2018 (UTC)
Okay. So, I did unpack everything into a new directory And copied the LocalSettings.php and images but the left hand navigation issues is still unresolved.
https://vpfaa.webtest.iu.edu/~vpfaa/academicguide3/index.php/Main_Page
https://vpfaa.webtest.iu.edu/~vpfaa/academicguide2/index.php/Main_Page
The first one is in the new directory. The second one I had untarred in the old directory to upgrade.
Thanks. Akbarehsan (talk) 16:23, 27 March 2018 (UTC)
OK, so its not an old code interfering with the new code issue.
A quick hack to fix the present styling issue would be to, in your MediaWiki:Common.css, replace
#column-content { margin-left: -20em }
with
#column-content { margin-left: -20em !important }
Something like this is not needed by default, but whoever edited your Wiki's CSS eight years ago, apparently needed this rule to make the styling work with their other styling modifications. AhmadF.Cheema (talk) 16:47, 27 March 2018 (UTC)
I am sorry to bother you. But as I said, I am very new to Media Wiki. Where can I edit that file? I did a Find for it and could not find it.
Also, I suspect I can not edit it because it was done so far back that by someone who has left the organization that we do not even have the admin password. Akbarehsan (talk) 17:38, 27 March 2018 (UTC)
No bother at all.
I actually did provide the link in my last reply. Click on: MediaWiki:Common.css.
For ease of access, MediaWiki allows the possibility to define personal .CSS and JavaScript code by editing special pages on the Wiki itself (identical to how you would edit any normal content page), without needing to edit the software core files. AhmadF.Cheema (talk) 17:45, 27 March 2018 (UTC)
I tried but could not edit that file.
What am I missing? Akbarehsan (talk) 17:50, 27 March 2018 (UTC)
This probably means that your account does not have admin rights on the Wiki.
So, do you have SSH access to the Wiki?
If so, you can make use of Manual:ChangePassword.php.
To change password directly from the database, see How to reset my MediaWiki admin password?. AhmadF.Cheema (talk) 17:55, 27 March 2018 (UTC)
I do not have an account. But I do have access to SSH and I can access all files on the server and the DB.
Should I add myself to the Users table in DB?
Thanks. Akbarehsan (talk) 18:01, 27 March 2018 (UTC)
It would be easier to just change the password for the account named Admin, which is apparently the username which was used previously by your Wiki's former administrator.
After this you can simply start using that account. AhmadF.Cheema (talk) 18:04, 27 March 2018 (UTC)
Use ChangePassword.php for Admin password change? Or the other link you provided? Akbarehsan (talk) 18:14, 27 March 2018 (UTC)
First try ChangePassword.php, as this is, I suppose, the officially recommended option. AhmadF.Cheema (talk) 18:27, 27 March 2018 (UTC)
Thanks for all your help. I am very close now. Just one more question:
How do I get rid of H3 like "academic guide", "handbook and guides", "search" etc?
https://vpfaa.webtest.iu.edu/~vpfaa/academicguide3/index.php/Main_Page
Thanks. Akbarehsan (talk) 19:46, 27 March 2018 (UTC)
If you don't like the aesthetics of the sidebar, you can try using a different skin, such as Skin:Vector as used on this site and Wikipedia.
In any case, the following inserted in your MediaWiki:Common.css should work:
#p-academic_guide, #p-Handbook_and_Guides, #p-search, #p-tb {
	display:none;
}
AhmadF.Cheema (talk) 20:29, 27 March 2018 (UTC)

How to include some paragraphs to the translate target?

In the Manual:Page_table, I found some parts of paragraph are not included to the translation targets, so I tried to add them into the target according to instructions in Help:Extension:Translate/Page translation example. But I can't enable it because I have no privileges of translation administrator.

  1. To a translate administrator, could you enable them?
  2. Can I have any way to become a translation administrator? Cudo29 (talk) 02:28, 27 March 2018 (UTC)

Creating New Category With or Without Pre-Colon?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


This site advises to create a new category with

[[:Category:Category name]]

but they also advise to create a new category with:

[[Category:Category name]]

How are these different? Johnywhy (talk) 03:09, 27 March 2018 (UTC)

Without the pre-colon, the present page gets inserted into the category. With the pre-colon only the category name with a normal wiki link to it is displayed on the present page without inserting the page into the category. AhmadF.Cheema (talk) 06:48, 27 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Unable to Display List of Category-Pages on a Wiki Page

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Extension:CategoryTree

With extension installed, none of these display the categories:

{{#categorytree mode=parents}} 

{{Special:Categories}}

<categorytree mode=parents>Table of Contents</categorytree>

Is CategoryTree Extension Required, even if there aren't any sub-categories? Johnywhy (talk) 07:25, 27 March 2018 (UTC)

{{#categorytree:category_name|mode=parents}}
{{Special:PrefixIndex/Category:}} wargo (talk) 10:51, 27 March 2018 (UTC)
That's the answer.
CategoryTree extension is not required to simply list all categories. This does it:
{{Special:PrefixIndex/Category:}}
This form shows all parent-categories under the name category:
{{#categorytree:category_name|mode=parents}}
What then is the correct CategoryTree syntax to show all categories (without pages)?
Is it correct to say that, due to the colon in "Category:My Cat", that "Category:" is a Namespace? Johnywhy (talk) 13:49, 27 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

We need your feedback to improve Lua functions

MediaWiki message delivery (talk) 08:55, 27 March 2018 (UTC)

Messenger Extension

I'm searching for an extension, which automatically sends a message to other users, if I change something on their page. 138.232.124.69 (talk) 10:05, 27 March 2018 (UTC)

If by "their page", you mean User talk pages then see Extension:Echo. AhmadF.Cheema (talk) 10:12, 27 March 2018 (UTC)
That's how Watchlist is supposed to work. If you want private messaging, there's Special:Emailuser Ciencia Al Poder (talk) 10:16, 27 March 2018 (UTC)

Remove Category Header?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


i don't want category pages to say:

Pages in category "Category Name"

or "This category contains only the following page."

How to remove? Johnywhy (talk) 15:14, 27 March 2018 (UTC)

In your Wiki's MediaWiki:Category_header and MediaWiki:Category-article-count pages, remove their content.
The line under the heading, however, will remain. AhmadF.Cheema (talk) 17:07, 27 March 2018 (UTC)
great, thx!
i suppose i could also edit a core file to remove the line under the heading, but that would of course break on core update. Johnywhy (talk) 17:24, 27 March 2018 (UTC)
The way to remove the line (and the heading too, without editing MediaWiki:Category_header) would be to use a "display: none;" .CSS rule in MediaWiki:Common.css, but I'm not clear as to which class/div it has to be applied to. AhmadF.Cheema (talk) 17:37, 27 March 2018 (UTC)
[[MediaWiki:Category_header]] and [[MediaWiki:Category-article-count]] pages, remove their content.
They had no content, and did not exist. I created and saved them as blank pages, but the header and counts still remain on category pages. Johnywhy (talk) 17:47, 27 March 2018 (UTC)
Which pages did you look at? I was referring to:
OK, I figured out the class.
Instead of editing MediaWiki:Category_header and MediaWiki:Category-article-count, you can also directly insert the following in your MediaWiki:Common.css:
#mw-content-text > div.mw-category-generated > #mw-pages > h2, p {
	display: none;
}
Although, I can't say for sure whether this wouldn't also make some other unplanned elements to disappear or not. AhmadF.Cheema (talk) 18:45, 27 March 2018 (UTC)
thx! what up with MediaWiki:Category_header and MediaWiki:Category-article-count pages? Johnywhy (talk) 19:36, 27 March 2018 (UTC)
Solved-- i was mistakenly using
https://gunsense.xyz/index.php/gunsense:Category-article-count
instead of
https://gunsense.xyz/index.php/MediaWiki:Category-article-count
Your original fix worked without the CSS. But now i know about MediaWiki:Common.css :) Johnywhy (talk) 19:41, 27 March 2018 (UTC)
The CSS rules will remove the heading line too. AhmadF.Cheema (talk) 20:00, 27 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Apply Protection to All Category Pages?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


How to prevent non-admins from editing all category pages? Johnywhy (talk) 15:44, 27 March 2018 (UTC)

In your LocalSettings.php, the following should work:
$wgNamespaceProtection[NS_CATEGORY] = array( 'editprotected' );
See Manual:Preventing access#Restrict editing of an entire namespace. AhmadF.Cheema (talk) 17:10, 27 March 2018 (UTC)
your config setting also prevented the admin from deleting a category.
Is there a way to ensure admins have all rights, while preventing non-admins from editing or deleting categories?
thx! Johnywhy (talk) 17:31, 27 March 2018 (UTC)
Are you sure? I just tested the rule, and I was still able to delete the category page. AhmadF.Cheema (talk) 20:37, 27 March 2018 (UTC)
When i apply the rule, and refresh, logged-in as WikiSysop, the "More" menu at the top of the category page disappears. Johnywhy (talk) 21:46, 27 March 2018 (UTC)
Update: I tried both these rules:
$wgGroupPermissions['sysop']['Category'] = true;
$wgGroupPermissions['Administrators']['Category-edit'] = true;
Each seems to have the same effect: the sysop is able to delete the category.
Non-sysop cannot delete the category. However, with both rules, non-sysop can move the category, but only with non-delete, and forced redirect.
So that's an improvement.
Now, to find rule to protect moves. This one appears to have no effect:
$wgGroupPermissions['Administrators']['Category-move'] = true;
Johnywhy (talk) 22:46, 27 March 2018 (UTC)
Still can't prevent non-admins from moving a category. Maybe it's impossible to do this? Johnywhy (talk) 00:47, 28 March 2018 (UTC)
See the "move-categorypages" right in Manual:User rights Ciencia Al Poder (talk) 09:10, 28 March 2018 (UTC)
i think i got it:
$wgGroupPermissions['sysop']['Category'] = true;  # blocks users from deleting cats, but can still move cats
$wgGroupPermissions['user']['move-categorypages'] = false;    # blocks users from moving cats
$wgGroupPermissions['user']['delete'] = true;        # allows users to delete standard pages
re the first one:
- i find it weird that applying a specific permission to admins implicitly removes that permission from users. Why? Is it a consistent rule that applying any permission to any group will remove that permission from all "lower" groups?
- why isn't that permission (['Category']) listed here? Johnywhy (talk) 13:47, 28 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

how to forward to email recipient

unable to forward spreadsheet to an email recipient 65.29.100.115 (talk) 17:32, 27 March 2018 (UTC)

Is this related to the MediaWiki software? If not then your query is in the wrong support forum. AhmadF.Cheema (talk) 17:58, 27 March 2018 (UTC)

Can't Delete a Moved Category

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


a deleted (moved) category is still showing up in
{{Special:PrefixIndex/Category:}}
. That's ruining my Table of Contents. The old one is displayed in italics, but i need it gone completely.

apparently i must have created a redirect when i moved (renamed) the category. now i cannot delete the old category, without deleting the new one. after i deleted the old one, the old one remained but the new one is gone.

i recreated the new one, and it's good, but the old one remains. Johnywhy (talk) 17:35, 27 March 2018 (UTC)

Looks like a Jobs backlog issue. Browse to the following page for your Wiki:
https://www.mediawiki.org/w/api.php?action=query&meta=siteinfo&siprop=statistics&format=jsonfm
Are there any "jobs" left? Category pages will not update until its "job" has been completed. If so, see Manual:RunJobs.php. AhmadF.Cheema (talk) 17:51, 27 March 2018 (UTC)
i'm getting:
{
     "batchcomplete": "",
     "query": {
         "statistics": {
             "pages": 29,
             "articles": 1,
             "edits": 272,
             "images": 8,
             "users": 2,
             "activeusers": 0,
             "admins": 1,
             "jobs": 0
         }
     }
 }
i cleared browser cache and reloaded the page. Still seeing the old category in {{Special:PrefixIndex/Category:}}
When i click on the old category, it redirects to the new category page. I see the redirect listed in redirects special-page. Johnywhy (talk) 19:27, 27 March 2018 (UTC)
OK, if I understand you correctly, you want to remove the category Needs Rebuttals page?
Use the following link to delete the page:
https://gunsense.xyz/index.php/Category:Needs_Rebuttals?redirect=no AhmadF.Cheema (talk) 20:05, 27 March 2018 (UTC)
Ah, so the ?redirect=no parameter disables the redirect, right? Thus, i can delete the original, instead of the new one. Johnywhy (talk) 20:23, 27 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Hi, I configured the wiki with simplesamlphp and pluggableauth. I can get my idp and authenticate but then just get stucked at a blank page mywiki.net/saml/module.php/saml/sp/saml2-acs.php/default-sp

I'm seeing a POST as method returning 200 with request cookies but no response cookies.

#SimpleSamlPhp extension:

wfLoadExtension( 'SimpleSAMLphp' );

$wgSimpleSAMLphp_InstallDir = '/var/simplesamlphp';

$wgSimpleSAMLphp_AuthSourceId = 'default-sp';

$wgSimpleSAMLphp_RealNameAttribute = 'cn';

$wgSimpleSAMLphp_EmailAttribute = 'mail';

$wgSimpleSAMLphp_UsernameAttribute = 'uid';

#PluggableAuth extension:

wfLoadExtension( 'PluggableAuth' );

$wgPluggableAuth_EnableAutoLogin = false;

$wgPluggableAuth_EnableLocalLogin = false;

$wgPluggableAuth_Class = "SimpleSAMLphp";

I'm following the wiki for this, but can't make it work and redirects me to the main page after authentication.

Using sql for store.type , "/" for the path of cookies, and phpsession at LocalSettings .

Any ideas?

Thanks! 201.216.192.73 (talk) 20:36, 27 March 2018 (UTC)

Hi, @Cindy.cicaleseSorry to tag you, I've found some helpful replies of you regarding pluggableauth/simplesaml. I can't figure it out, tried many configs, the samldb exists with proper user/pass, I get success at my IDP for the login. But still, the page gets stucked at there. Also, while going to mywiki/saml/module.php/core/authenticate.php got nothing.
I'm on ubuntu xenial, nginx, mediawiki 1.30 and mysql 5.8.
Thanks! 201.216.192.73 (talk) 19:00, 13 April 2018 (UTC)
Since you say, "while going to mywiki/saml/module.php/core/authenticate.php got nothing", it appears that the issue is with the installation of https://simplesamlphp.org/, the PHP library, not the extension. Perhaps you can find help on their mailing lists at https://simplesamlphp.org/lists. I wish I could help, but I'm sure they could do a much better job, as I am not familiar with your environment. Cindy.cicalese (talk) 21:55, 13 April 2018 (UTC)
Thanks! I'll give it a try. I'm thinking there might be something weird at my nginx vhost/php handling the files as well. It's weird that I got success at my IDP but never got the response cookie from there.
If I solved this, will post the solution. 190.245.59.138 (talk) 00:04, 16 April 2018 (UTC)
Thank you! That would be very helpful. Cindy.cicalese (talk) 03:02, 16 April 2018 (UTC)
Set up an apache for testing, pointed it out to wiki's webroot and a simple alias to simplesamlphp folder at apache's vhost and all started to work perfectly. Won't give up on nginx though, but it's pretty tricky. 201.216.192.73 (talk) 20:39, 17 April 2018 (UTC)

I cannot reply or start a new topic

I cannot reply or start a new topic. I have been a member for a few years and stay logged in: 2602:306:3146:6A60:511D:3DA6:ACB6:B7A1 (talk) 21:06, 27 March 2018 (UTC)

Which website is your query related to? AhmadF.Cheema (talk) 21:40, 27 March 2018 (UTC)

Creating Myself As A User in Media Wiki

Hi,

I have recently inherited some old Media Wikis and no one seems to know the Admin password. I can both access the Media Wiki Site on the web server through SSH or HTML/PHP Editors like Dreamweaver and the database through Navicat.

What is the best way to create myself as a user (preferably from command line on web server) and then give myself sysop and bureaucrat permissions so that I could perform administrative functions like tweaking CSS etc.

Any help will be appreciated.

Thanks,

AKbar Akbarehsan (talk) 00:08, 28 March 2018 (UTC)

See Manual:createAndPromote.php script. 星耀晨曦 (talk) 00:33, 28 March 2018 (UTC)
I was able to add myself as a user using createAndPromote.php. But it when I tried to log in I got an error.
Is there a way to create a user first and then Promote.
Thanks. Akbarehsan (talk) 12:56, 28 March 2018 (UTC)
createAndPromote.php can create new user without promote.
For your situation, you should try to solve this error instead of ignoring it. You can put the error log to here. If you got a brief error message, you can try set
$wgShowExceptionDetails = true;
$wgShowDBErrorBacktrace = true;
in your LocalSettings.php. 星耀晨曦 (talk) 15:12, 28 March 2018 (UTC)
Here is the short Error:
A database query error has occurred. This may indicate a bug in the software.
[2e80118d1c8c6855d4f128fb] 2018-03-28 15:21:56: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"
And here is the detailed error:
[d8ca8d3c1a259dd3d7221855] /~vpfaa/saahandbook2/index.php?title=Special:UserLogin&returnto=Main+Page Wikimedia\Rdbms\DBQueryError from line 1149 of /ip/vpfaa/wwws/saahandbook2/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: SELECT ug_user,ug_group,ug_expiry FROM `user_groups` WHERE ug_user = '6'
Function: UserGroupMembership::getMembershipsForUser
Error: 1054 Unknown column 'ug_expiry' in 'field list' (mysql.iu.edu:3532)
Backtrace:
#0 /ip/vpfaa/wwws/saahandbook2/includes/libs/rdbms/database/Database.php(979): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#1 /ip/vpfaa/wwws/saahandbook2/includes/libs/rdbms/database/Database.php(1343): Wikimedia\Rdbms\Database->query(string, string)
#2 /ip/vpfaa/wwws/saahandbook2/includes/user/UserGroupMembership.php(289): Wikimedia\Rdbms\Database->select(string, array, array, string)
#3 /ip/vpfaa/wwws/saahandbook2/includes/user/User.php(1430): UserGroupMembership::getMembershipsForUser(integer, Wikimedia\Rdbms\DatabaseMysqli)
#4 /ip/vpfaa/wwws/saahandbook2/includes/user/User.php(3301): User->loadGroups()
#5 /ip/vpfaa/wwws/saahandbook2/includes/user/User.php(3328): User->getGroups()
#6 /ip/vpfaa/wwws/saahandbook2/includes/password/UserPasswordPolicy.php(141): User->getEffectiveGroups()
#7 /ip/vpfaa/wwws/saahandbook2/includes/password/UserPasswordPolicy.php(74): UserPasswordPolicy->getPoliciesForUser(User)
#8 /ip/vpfaa/wwws/saahandbook2/includes/user/User.php(1069): UserPasswordPolicy->checkUserPassword(User, string)
#9 /ip/vpfaa/wwws/saahandbook2/includes/auth/AbstractPasswordPrimaryAuthenticationProvider.php(104): User->checkPasswordValidity(string)
#10 /ip/vpfaa/wwws/saahandbook2/includes/auth/TemporaryPasswordPrimaryAuthenticationProvider.php(142): MediaWiki\Auth\AbstractPasswordPrimaryAuthenticationProvider->checkPasswordValidity(string, string)
#11 /ip/vpfaa/wwws/saahandbook2/includes/auth/AuthManager.php(452): MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider->beginPrimaryAuthentication(array)
#12 /ip/vpfaa/wwws/saahandbook2/includes/auth/AuthManager.php(382): MediaWiki\Auth\AuthManager->continueAuthentication(array)
#13 /ip/vpfaa/wwws/saahandbook2/includes/specialpage/AuthManagerSpecialPage.php(353): MediaWiki\Auth\AuthManager->beginAuthentication(array, string)
#14 /ip/vpfaa/wwws/saahandbook2/includes/specialpage/AuthManagerSpecialPage.php(482): AuthManagerSpecialPage->performAuthenticationStep(string, array)
#15 /ip/vpfaa/wwws/saahandbook2/includes/htmlform/HTMLForm.php(669): AuthManagerSpecialPage->handleFormSubmit(array, VFormHTMLForm)
#16 /ip/vpfaa/wwws/saahandbook2/includes/specialpage/AuthManagerSpecialPage.php(416): HTMLForm->trySubmit()
#17 /ip/vpfaa/wwws/saahandbook2/includes/specialpage/LoginSignupSpecialPage.php(316): AuthManagerSpecialPage->trySubmit()
#18 /ip/vpfaa/wwws/saahandbook2/includes/specialpage/SpecialPage.php(522): LoginSignupSpecialPage->execute(NULL)
#19 /ip/vpfaa/wwws/saahandbook2/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)
#20 /ip/vpfaa/wwws/saahandbook2/includes/MediaWiki.php(287): SpecialPageFactory::executePath(Title, RequestContext)
#21 /ip/vpfaa/wwws/saahandbook2/includes/MediaWiki.php(851): MediaWiki->performRequest()
#22 /ip/vpfaa/wwws/saahandbook2/includes/MediaWiki.php(523): MediaWiki->main()
#23 /ip/vpfaa/wwws/saahandbook2/index.php(43): MediaWiki->run()
#24 {main} Akbarehsan (talk) 15:24, 28 March 2018 (UTC)

'Huge' Format Not Working

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


https://en.wikipedia.org/wiki/Help:Advanced_text_formatting#Guidelines

The following:

{{huge|→ [[Cheat Sheet|Gun Rebuttal Cheat Sheet ]] ←}}

displays as:

Template:Huge

What am i doing wrong? Johnywhy (talk) 00:50, 28 March 2018 (UTC)

The {{...}} is the syntax used to transclude another page. When a namespace is not provided, then it means the namespace "Template" is being used. So {{huge}} = {{Template:Huge}}.
When you write "{{huge}}" in your own Wiki, MediaWiki looks for the "Template:Huge" page on your Wiki, when it doesn't find one it shows a red link to the page.
See Help:Templates. AhmadF.Cheema (talk) 02:01, 28 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Securing extensions folder

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I'm wondering how secure the extensions folder is (located within my wiki root directory). Should the php files be accessible to web users? I notice that, for example, when I try to access corresponding wikipedia files, I get a message "Invalid file type": <https://en.wikipedia.org/w/extensions/Cite/Cite.php>. Compare this to <https://en.wikipedia.org/w/extensions/Cite/COPYING.txt>, which can be read. Is this a security policy implemented by wikipedia? I would like to similarly secure my installation: how can I do this? VOIstri (talk) 01:42, 28 March 2018 (UTC)

It may depend on what server are you using (nginx, apache...) and how php is executed (mod_php, php-fpm, fcgi...)
The only PHP scripts that should be directly accessed from public are index.php, load.php, api.php, thumb.php, img_auth.php and opensearch_desc.php. Any other script can be restricted. Ciencia Al Poder (talk) 09:09, 28 March 2018 (UTC)
Thank you. That's basically what I needed to know, being ignorant of how the extensions work. I can block access to the php files via a htaccess file and whitelist those ones and not break any of the extensions. Thank you again. VOIstri (talk) 13:41, 28 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

I am having trouble adding and internal link to my local wiki onto my sidebar. I want to add a link to my MediaWiki:Common.css page on my sidebar, but it just isn't working.

Here's what I tried, to no avail:

* Configure
** MediaWiki:Common.css

Then

* Configure
** [MediaWiki:Common.css]

And

* Configure
** [[MediaWiki:Common.css]]

And finally

* Apples Cat
** http://localhost/hepperlepedia/index.php/MediaWiki:Common.css

NOTE: I used "Apples Cat" for the last category in case there was an issue I was unaware of with "Configure" being a reserved word or something

In case it makes a difference, I am developing on Windows 10 in WAMP (localhost).

My Questions

  1. Is there some setting that is preventing me from adding internal links to the sidebar? I was able to add links to "Special:" pages about a month ago. I've run the RunJobs.php script several times.
  2. Is there some issue with this being on localhost?

Any help is appreciated Ehtech2000 (talk) 09:28, 28 March 2018 (UTC)

I think along with the target the link text is necessary is in this context. The following under "navigation" works for me:
** MediaWiki:Common.css|Site CSS
You haven't defined a link text in any of your examples (Manual:Interface/Sidebar#Links). AhmadF.Cheema (talk) 11:17, 28 March 2018 (UTC)
Thanks, Ahmad. I'll try it out and report back. Ehtech2000 (talk) 02:49, 31 March 2018 (UTC)

Bots using templates...?

Hi everyone,

For my project i was wondering if it was possible for a Bot to create a page on my Wiki using existing templates on my Wiki, i couldnt find much literature on the web on it.

If is it possible, the only thing i should do is to pass the variables to my template, in my PHP scripts for the bot, and then send a POST request to my webserver saving it on my wiki as wikitext, am i right? Andrea.bozzano87 (talk) 10:13, 28 March 2018 (UTC)

Have you checked Manual:Pywikibot already? Malyacko (talk) 12:32, 28 March 2018 (UTC)
I'll check better, at least in theory i could find the answer, but i couldnt since now :s Andrea.bozzano87 (talk) 11:50, 4 April 2018 (UTC)

How to Show All Categories in CategoryTree Without a "Root" Category?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Extension:CategoryTree

Seems all syntax requires the admin manually type a "root" category.
{{#categorytree:Foo}}

But my wiki doesn't have a "root" category and subcategories-- it just has a collection of categories.

How to show all categories, without typing a "root" category?

Might be here, unsure: Extension:CategoryTree#Using MediaWiki: namespace pages

This returns nothing:
{{#categorytree:{{root category}}}} 
Johnywhy (talk) 13:03, 28 March 2018 (UTC)
you don't need a specific "root" category. You just need a category for the category tree extension to start at. It can be any category Bawolff (talk) 06:14, 2 April 2018 (UTC)
so, if i want to show, in the TOC, all pages and categories on the entire wiki, then i would a need root category.
correct?
thx Johnywhy (talk) 06:20, 2 April 2018 (UTC)
If you just want to just list all categories in the wiki, you can use {{special:AllPages/Category:}}
Its mathamatically impossible to turn an arbitrary graph into a tree without a starting point. Bawolff (talk) 17:58, 4 April 2018 (UTC)
True. That will show "Category:" prefix next to each category.
You can also do the following, which will not show "Category:" prefix next to each category.
{{Special:PrefixIndex/Category:}}
However, neither of these is concerned with the CategoryTree extension. Neither provides a collapsible tree, neither shows pages. Johnywhy (talk) 18:25, 4 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

DB Query Error

Hi,

I recently upgraded My wiki 1.26 to 1.30 and now I am getting this error:

[3275f45dddb143e8d3886b3c] 2018-03-28 14:28:05: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"

I created a new folder and installed 1.30 Media Wiki in there. Then I copied the LocalSettings.php file from the old folder into the new. And now I get the error above.

https://www.indiana.edu/~vpfaa/academicguide/index.php/Main_Page

That is the original WIKI on version 1.26.

Here is the one I created just now on version 1.30.

https://www.indiana.edu/~vpfaa/academicguide2/index.php/Main_Page

How do I resolve this issue?

Thanks,

Akbar Akbarehsan (talk) 14:33, 28 March 2018 (UTC)

I turned Error reporting on and I get this:
[bee89cc730393522c166e51f] /~vpfaa/academicguide2/index.php/Main_Page Wikimedia\Rdbms\DBQueryError from line 1149 of /ip/vpfaa/wwws/academicguide2/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: SELECT ug_user,ug_group,ug_expiry FROM `user_groups` WHERE ug_user = '1'
Function: UserGroupMembership::getMembershipsForUser
Error: 1054 Unknown column 'ug_expiry' in 'field list' (mysql.iu.edu:3532)
Backtrace:
#0 /ip/vpfaa/wwws/academicguide2/includes/libs/rdbms/database/Database.php(979): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#1 /ip/vpfaa/wwws/academicguide2/includes/libs/rdbms/database/Database.php(1343): Wikimedia\Rdbms\Database->query(string, string)
#2 /ip/vpfaa/wwws/academicguide2/includes/user/UserGroupMembership.php(289): Wikimedia\Rdbms\Database->select(string, array, array, string)
#3 /ip/vpfaa/wwws/academicguide2/includes/user/User.php(1430): UserGroupMembership::getMembershipsForUser(integer, Wikimedia\Rdbms\DatabaseMysqli)
#4 /ip/vpfaa/wwws/academicguide2/includes/user/User.php(497): User->loadGroups()
#5 /ip/vpfaa/wwws/academicguide2/includes/libs/objectcache/WANObjectCache.php(892): User->{closure}(boolean, integer, array, NULL)
#6 /ip/vpfaa/wwws/academicguide2/includes/libs/objectcache/WANObjectCache.php(1012): WANObjectCache->{closure}(boolean, integer, array, NULL)
#7 /ip/vpfaa/wwws/academicguide2/includes/libs/objectcache/WANObjectCache.php(897): WANObjectCache->doGetWithSetCallback(string, integer, Closure, array, NULL)
#8 /ip/vpfaa/wwws/academicguide2/includes/user/User.php(520): WANObjectCache->getWithSetCallback(string, integer, Closure, array)
#9 /ip/vpfaa/wwws/academicguide2/includes/user/User.php(441): User->loadFromCache()
#10 /ip/vpfaa/wwws/academicguide2/includes/user/User.php(405): User->loadFromId(integer)
#11 /ip/vpfaa/wwws/academicguide2/includes/session/UserInfo.php(88): User->load()
#12 /ip/vpfaa/wwws/academicguide2/includes/session/CookieSessionProvider.php(119): MediaWiki\Session\UserInfo::newFromId(string)
#13 /ip/vpfaa/wwws/academicguide2/includes/session/SessionManager.php(487): MediaWiki\Session\CookieSessionProvider->provideSessionInfo(WebRequest)
#14 /ip/vpfaa/wwws/academicguide2/includes/session/SessionManager.php(190): MediaWiki\Session\SessionManager->getSessionInfoForRequest(WebRequest)
#15 /ip/vpfaa/wwws/academicguide2/includes/WebRequest.php(735): MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)
#16 /ip/vpfaa/wwws/academicguide2/includes/session/SessionManager.php(129): WebRequest->getSession()
#17 /ip/vpfaa/wwws/academicguide2/includes/Setup.php(762): MediaWiki\Session\SessionManager::getGlobalSession()
#18 /ip/vpfaa/wwws/academicguide2/includes/WebStart.php(114): require_once(string)
#19 /ip/vpfaa/wwws/academicguide2/index.php(40): require(string)
#20 {main} Akbarehsan (talk) 15:10, 28 March 2018 (UTC)
Try to run update.php, note: backup your database before run it. 星耀晨曦 (talk) 15:15, 28 March 2018 (UTC)
I ran that and now I do not get an error:
https://www.indiana.edu/~vpfaa/academicguide2/index.php/Main_Page
But I still need to get Admin access to edit Common.css file to resolve the left navigation issue.
Any thoughts on changing Admin password?
Thanks,
Akbar Akbarehsan (talk) 16:36, 28 March 2018 (UTC)
See Manual:Resetting passwords. 星耀晨曦 (talk) 16:48, 28 March 2018 (UTC)

Two edit buttons / Publish buttons don't work

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi! I have two edit buttons on my wiki: https://nordhausen-wiki.de/index.php?title=Manfred_Bornemann&action=edit .How I can disable the one near the footer? These button don't work. - Should I disable the WikiEditor? Vincenʈ  15:31, 28 March 2018 (UTC)

In your LocalSettings.php, you might have the following: $wgDefaultUserOptions['wikieditor-publish'] = 1;
Remove or comment it out. This should remove the Publish and Cancel buttons on the top right. AhmadF.Cheema (talk) 15:42, 28 March 2018 (UTC)
I remove it. But the buttons near the footer still don't work. Nothing happens when I click Edit button. Vincenʈ  08:37, 29 March 2018 (UTC)
OK! I deactivate the extension CharInsert. Now it works! Vincenʈ  09:14, 29 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Bug? Extension:CategorySuggest Doesn't Offer Empty Categories

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


i deleted each page in a category. After doing so, that category stopped appearing in the Categories suggestion box in edit-mode on pages. Johnywhy (talk) 17:11, 28 March 2018 (UTC)

The Extension:CategorySuggest page recommends using the extension's GitHub issue tracker to view or report bugs. AhmadF.Cheema (talk) 19:21, 28 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Bug? MobileFrontEnd Fails

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


MobileFrontEnd Version:

REL1_30

2017-09-21T22:13:05

5ecc673

MediaWiki Version:

1.30

https://gunsense.xyz/index.php/Special:Version

Error:
This page isn’t working
gunsense.xyz is currently unable to handle this request.
HTTP ERROR 500
LocalSettings.php:
wfLoadExtension( 'MobileFrontend' )
$wgMFAutodetectMobileView = true;

Site loads fine with MobileFrontEnd disabled.

Conflict with another extension?

Note, index main has redirect to a different namespace. Johnywhy (talk) 23:14, 28 March 2018 (UTC)

HTTP 500 is usually caused by a fatal error generated by PHP code or installed with not meet required, but the error message may be covered by something. See Manual:How to debug. 星耀晨曦 (talk) 00:19, 29 March 2018 (UTC)
You forgot the ; after wfLoadExtension( 'MobileFrontend' ). AhmadF.Cheema (talk) 05:42, 29 March 2018 (UTC)
@AhmadF.Cheema i made it too easy for you :D
\:
thx! Johnywhy (talk) 07:18, 29 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Visual editor curl error:28

I'm running mediawiki site on wamp server, i have installed visual editor, but i get this message when i open it "Error loading data from server: apierror-visualeditor-docserver-http-error: (curl error: 28) Timeout was reached. Would you like to retry?"

Is there any way i can fix that?

P.S. Visual editor is working for new pages, i get that error only when trying to edit pages. Darkwarrior92 (talk) 00:15, 29 March 2018 (UTC)

Total pages in a category is NOT correct.

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


My wiki saying "The following 200 pages are in this category, out of 553 total." but, 553 is NOT correct. 501 is correct.

Help me. Thank you in advance.

my wiki ver is 1.28.0 Libattery (talk) 03:21, 29 March 2018 (UTC)

Looks like a Jobs backlog issue. Browse to the following page for your Wiki:
https://www.mediawiki.org/w/api.php?action=query&meta=siteinfo&siprop=statistics&format=jsonfm
Are there any "jobs" left? Category pages will not update until its "job" has been completed. If so, see Manual:RunJobs.php. AhmadF.Cheema (talk) 05:49, 29 March 2018 (UTC)
Not my case. I know Runjobs. But thanks. Libattery (talk) 16:15, 18 April 2018 (UTC)
Or you may be hitting T18036. If there are no pending jobs and the counts are wrong, you may need to run Manual:recountCategories.php Ciencia Al Poder (talk) 09:16, 29 March 2018 (UTC)
Oh. that's helpful. Thanks a lot! lovely! Libattery (talk) 16:18, 18 April 2018 (UTC)
Oh. that's helpful. Thanks a lot! Libattery (talk) 16:17, 18 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to Show All Categories in CategoryTree Without a "Root" Category?

Extension:CategoryTree

Seems all syntax requires the admin manually type a "root" category. Eg:

{{#categorytree:Foo}}

But my wiki doesn't have a "root" category and subcategories-- it just has a collection of categories.

How to show all categories, without typing a "root" category?

Might be here, unsure: Extension:CategoryTree#Using MediaWiki: namespace pages

This returns nothing:

{{#categorytree:{{root category}}}}

thx!

also posted here and here. Johnywhy (talk) 07:56, 29 March 2018 (UTC)

Does CategoryTree require that i create a root category? Johnywhy (talk) 15:01, 29 March 2018 (UTC)
CategoryTree needs a root category. There's no efficient way to know what are the root categories by traversing each and every category on the wiki and find if it's part of another category. Ciencia Al Poder (talk) 16:17, 29 March 2018 (UTC)
"There's no efficient way to know what are the root categories by traversing each and every category on the wiki and find if it's part of another category."
But that only applies if i'm trying to show sub-categories, correct? Johnywhy (talk) 19:25, 29 March 2018 (UTC)
Yes. If you want to display a plain list of all categories, use {{Special:PrefixIndex/Category:}} Ciencia Al Poder (talk) 09:12, 31 March 2018 (UTC)
Thx, i'm already using that. Need page-titles too. Johnywhy (talk) 14:35, 31 March 2018 (UTC)

Kartographer Map Marker in Wrong Place

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hello everyone. I am attempting to add a map to a page, with a marker on a certain city in Michigan. For whatever reason, though, the coordinates for the city place the marker in Antarctica! Can't see to fix. Here is the code. Any thoughts? Many thanks!

<mapframe text="Ypsilanti" width="300" height="300" zoom="5" latitude="44" longitude="-85">

[

  {

   "type": "ExternalData",

   "service": "geoshape",

   "ids": "Q1166",

   "properties": {

     "stroke": "#A7DDFF",

     "stroke-width": 3,

   }

  },

  {

   "type": "Feature",

   "geometry": { "type": "Point", "coordinates": [42.24277, -83.61833] },

   "properties": {

     "title": "Ypsilanti"

   }

  }

]

</mapframe> Gmlacey (talk) 14:41, 29 March 2018 (UTC)

The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

MediaWiki Javascript Toggle Show Hide

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Like this site: https://openwetware.org/wiki/OpenWetWare:Toggle#Templates

In MW 1.24 working fine. After update to 1.30 not working. The javascript not executed 213.61.254.67 (talk) 15:53, 29 March 2018 (UTC)

The script is being loaded but not executed, right.
From what I see, the "start" of the script is done on the DOMContentLoaded event: https://openwetware.org/wiki/MediaWiki:Common.js
However, due to how scripts load in recent versions of MediaWiki, DOMContentLoaded may be fired already when the script loads. Try to change it to jQuery, as a replacement, since it will fire inmediately when you associate to it, even if the DOMContentLoaded has been fired already. See http://api.jquery.com/jQuery/#jQuery3
On a side note, MediaWiki already ships with collapsible elements. If the included ones already provide the functionality you need, it's recommended to use them, for better maintainability. See Manual:Collapsible elements Ciencia Al Poder (talk) 16:26, 29 March 2018 (UTC)
sorry, I don't understand that problem.
I am only the Administrator of the server.
I use the exact same script like the side, I copied it to my MediaWiki.
I wondering that the script is running in the old MW 1.24 fine and in the new one, there is noting function. With Firefox debugger, I see the javascript function is missing.
Here is my Template: without : <nowiki><includeonly><span class="_togglegroup _toggle_initshow _toggle _toggler toggle-visible" style="display: none;">[Anzeigen]</span><span class="_toggle_inithide _toggle _toggler toggle-hidden" style="display:none;">[Verstecken]</span> <div class="_toggle_inithide _toggle toggle-hidden"> {{{1}}}</div></includeonly><noinclude> 79.206.44.45 (talk) 17:40, 29 March 2018 (UTC)
Here the new MW:

0-9

Here the old one:

0-9 <a class="toggler-link" id="toggler0" href="javascript:toggler(&quot;0&quot;);">[Anzeigen]</a>

79.206.44.45 (talk) 17:44, 29 March 2018 (UTC)
next try, without the nowiki marks.
Here the new MW1.30:
<p>0-9 </p><p><span class="_togglegroup _toggle_initshow _toggle _toggler toggle-visible" style="display:none;">[Anzeigen]</span><span class="_toggle_inithide _toggle _toggler toggle-hidden" style="display:none;">[Verstecken]</span> </p>
Here the old MW1.24:
<p>0-9 <span class="_togglegroup _toggle_initshow _toggle _toggler toggle-visible" style=""><a class="toggler-link" id="toggler0" href="javascript:toggler("");">[Anzeigen]</a></span><span class="_toggle_inithide _toggle _toggler toggle-hidden" style="display:none;"><a class="toggler-link" id="toggler1" href="javascript:toggler("1");">[Verstecken]</a></span> </p> 79.206.44.45 (talk) 17:46, 29 March 2018 (UTC)
this way not working on my site:
helpwiki.evergreen.edu/wiki/index.php?title=Template:Collapsed&action=edit 79.206.44.45 (talk) 18:41, 29 March 2018 (UTC)
they are mit toggle between Show more / Show less
<div class="collapse-pre-one mw-collapsible mw-collapsed"> <div class="mw-collapsible-toggle" style="float: none;"> <span class="down"> show less</span> <span class="up"> show more</span> </div> <div class="mw-collapsible-content"> {{{1}}} </div> </div> 79.206.44.45 (talk) 20:21, 29 March 2018 (UTC)
Looks like it's working now, right? Ciencia Al Poder (talk) 09:15, 31 March 2018 (UTC)
they are not toggle between Show more / Show less
<div class="collapse-pre-one mw-collapsible mw-collapsed"> <div class="mw-collapsible-toggle" style="float: none;"> <span class="down"> show less</span> <span class="up"> show more</span> </div> <div class="mw-collapsible-content"> {{{1}}} </div> </div> 79.206.33.72 (talk) 08:41, 2 April 2018 (UTC)
My wiki is a private site.
I have linked other sites with the same code, like:
helpwiki.evergreen.edu/wiki/index.php?title=Template:Collapsed&action=edit
or my original code:
https://openwetware.org/wiki/OpenWetWare:Toggle#Templates 79.206.33.72 (talk) 08:42, 2 April 2018 (UTC)
No, it not working.
I do not understand, where the problem is and how to fix it.
I am really frustrating, sorry 79.206.33.72 (talk) 11:20, 2 April 2018 (UTC)
I found only examples with collapsible in a table. I need it without a table form. Like a spoiler.
Simple Text Show/Hide toggle status
hided/toggled Text: this is a detailed and long explanation 79.206.33.72 (talk) 11:25, 2 April 2018 (UTC)
See (again) Manual:Collapsible elements. It contains examples. If you have a supported MediaWiki version (1.27 or newer) it will work without the need to add any custom JavaScript. If it doesn't work, there may be a problem with the execution of scripts. Open the developer console of your browser (hit F12) and see if the console displays any script error Ciencia Al Poder (talk) 12:54, 2 April 2018 (UTC)
I found in that Manual only this not nice table Collapsible Elements, where the hide / show is placed on the right side or in a table. I need it without a table and direct on that place directly beside the word and not everywhere.
For me not usable, sorry. I must check every wiki site, that to munch work.
I have this in the F12 -> Console:
JQMIGRATE: Migrate is installed with logging active, version 3.0.1
JQMIGRATE: jQuery.fn.delegate() is deprecated 79.206.33.72 (talk) 14:20, 2 April 2018 (UTC)
And I found this here:
ReferenceError: addOnloadHook is not defined 79.206.33.72 (talk) 14:26, 2 April 2018 (UTC)
I do not understand which functioncall I must change with jQuery(xxx) 79.206.33.72 (talk) 14:28, 2 April 2018 (UTC)
Now, a lot of try&error and a lot of frustrating bullshit...
A little change in MediaWiki:Common.js:
addOnloadHook(toggleInit);
to:
// addOnloadHook(toggleInit);
$( toggleInit );
Thank you Ciencia Al Poder for the help.
Can close 79.206.33.72 (talk) 15:48, 2 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Urgent: Raw HTML in Source Editor

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


In Source Editor, i'm not seeing Wiki code, i'm seeing raw html.

I suspect some extension is the cause, so I'll start by disabling recently-added extensions. Johnywhy (talk) 15:59, 29 March 2018 (UTC)

So far, seems to only have effected one section on one page. I'm guessing i performed an edit on that section while a bad extension was active.
Other sections and pages seem fine-- still showing wiki-codes in source-editor (not raw html).
The bad extension may have been Extension:HeadersFooters (which is different than Extension:Header Footer). Johnywhy (talk) 19:39, 29 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Better than Category as Draft?

I want users to collaboratively improve Draft pages. When page is finished, then "Publish" it to a release-repository. Any user should be able to publish a draft.

My current model is two categories:

  • Draft Category
  • Published Category

I don't like this approach, because then users will have to deal with removing the draft-category of a page, and adding the published-category.

I haven't found a stable, active Draft extension. Is there one?

The Extension:Approved Revs does not seem to have a 'draft' state-- the page is always 'published', correct? "pages that have no approved revision show up as blank"-- but i don't want the page title to be listed in the "Published" directory.

Isn't there a built-in MW system for publishing drafts?

Note, by "publish", i do not mean export-- I just mean, move the page to a "Published" directory. I think a "Published" directory would have to be a category or namespace, right?

thx

@Yaron K. Johnywhy (talk) 20:23, 29 March 2018 (UTC)

That's an interesting question. If that's what you want to do, I'd recommend creating a "Draft" namespace, so then publishing a page would be a matter of renaming "Draft:ABC" to just "ABC". If it's in a separate namespace, you have more control over whether those pages show up in search results, etc. Yaron Koren (talk) 20:43, 29 March 2018 (UTC)
@Yaron K.why was your comment hidden? Is it incorrect? Johnywhy (talk) 01:48, 30 March 2018 (UTC)
No, it was correct. It was randomly hidden with no meaningful reason from anonymous user(s). Tropicalkitty (talk) 03:40, 30 March 2018 (UTC)
According to this article, the Draft namespace was to be included in MW core. But i didn't see it in v1.30. Was it deprecated?
thx
@Yaron Koren Johnywhy (talk) 22:27, 1 April 2018 (UTC)
Here's the ideal scenario:
  • Logged-in and non-logged-in users both can see Draft and Published pages.
  • A "Publish" button on Draft pages.
  • Drafts and Published pages both appear in search results.
  • Extension:Approved Revs features are a desired complement to Draft/Publish features.
'Draft' and 'Published' namespaces seems the correct structure, rather than categories, as intended by MW design. A mod of Extension:Approved Revs might be a great way to go, except some Admins might want this Draft/Publish behavior without Extension:Approved Revs.
ApprovedRevs Mod
  • On first rev approval, move page to "Main" namespace.
  • Done.
New Extension
There are a some abandoned Draft extensions, and i'm wondering what the problems were with them, and why they were abandoned. Anyone know?
I'd be inclined to keep such an extension as simple as possible, to ensure forward-compatibility (and to make it a quick build :)
I think it can be as simple as:
  • Manually create a page in "Draft" namespace.
  • Display "Draft" in header of all Draft pages.
  • a "Publish" button on all "Draft" pages.
  • When clicked, move the page to the "Main" namespace.
Re "Draft" label in headers: I was told by dev of HeadersFooters extension that support for headers and footers is poor in MW. True?
The "Publish" button could be tricky re forward compatibility. Any suggestions?
Thx! Johnywhy (talk) 01:31, 30 March 2018 (UTC)
(removed) Johnywhy (talk) 17:21, 30 March 2018 (UTC)

How to completely remove the "bots" user group?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hello, I would like to completely remove the "bots" user group from my wiki.

I tried setting all bot rights to false using $wgGroupPermissions, but the "bots" group still appears on special pages such as Special:ListGroupRights, Special:UserRights, etc.

There are no users with bot privileges on my wiki. Is it possible to completely remove this user group, also from special pages? Guycn2 (talk) 22:20, 29 March 2018 (UTC)

Just add unset( $wgGroupPermissions['bot'] ); to your LocalSettings.php. 星耀晨曦 (talk) 16:07, 30 March 2018 (UTC)
Thanks, it works!
However, the ConfirmEdit extension made it quite problematic to completely disable bot group. To completely remove the bot group from my wiki, I had to remove some code related to bot rights from $IP\extensions\ConfirmEdit\extension.json; Otherwise, the bot group cannot be completely disabled. Guycn2 (talk) 20:19, 31 March 2018 (UTC)
You can still remove it without modifying the extension by doing
$wgExtensionFunctions[] = function () {
  global $wgGroupPermissions;
  unset( $wgGroupPermissions['bot'] );
};
Bawolff (talk) 06:12, 2 April 2018 (UTC)
Thanks! Guycn2 (talk) 16:46, 2 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Cache on MediaWiki

Hello, I wanna install a cache system due to the slow performance on my site without it, but i can't understand at all the Help Page about it, could someone help me?

My config:

MediaWiki 1.30.0
PHP 7.1.14 (cgi-fcgi)
MySQL 5.5.58
ICU 57.1

187.236.240.132 (talk) 19:08, 30 March 2018 (UTC)

You can enable the most basic cache:
Set
extension=apcu.so
zend_extension=opcache.so
in your php.ini, if you install these PHP extensions. These things can speed up your wiki page loading speed. 星耀晨曦 (talk) 07:58, 31 March 2018 (UTC)
Note, in addition to setting the apcu.so line in php.ini, to make MediaWiki use it, you also have to set $wgMainCacheType = CACHE_ACCEL; in LocalSettings.php to use it. For best results you sometimes have to adjust the apcu.shm_size config variable in php.ini. Bawolff (talk) 06:10, 2 April 2018 (UTC)

How to Exclude Self from Transcluded Namespace-Page List?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I'm using this transclude code to display a list of all Help pages in my Help namespace:

{{Special:PrefixIndex/Help:}}

Works great, but one problem. This transclusion is on my main Help page, which is also in the Help namespace. As a result, the main Help page itself is included in the list of help page listed on the main Help page.

https://gunsense.xyz/index.php/Help:Help

Is there an "exclude self" option? Or a better way to do this?

I could remove the main Help page from the Help namespace, and that would fix it. Except, it's doesn't make sense to remove the main Help page from the Help namespace-- does it?

thx Johnywhy (talk) 23:09, 30 March 2018 (UTC)

Automatic lists are automatic, it doesn't give you the flexibility of adding manual links. Basically, you can't, unless you move the page to a different namespace (like Project:) Ciencia Al Poder (talk) 11:03, 31 March 2018 (UTC)
thx. I was asking about removing, not adding links. but I understand i can't remove or add links to automatic lists.
Question is about how to prevent self-referencing. Johnywhy (talk) 14:37, 31 March 2018 (UTC)
You would need some sort of different system (e.g. extension:DynamicPageList ) Bawolff (talk) 06:06, 2 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Remove Same-Page Preview?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


when i enable side-by-side preview, i still get same-page preview (below edit area).

i don't need both.

how to remove same-page preview?

thx Johnywhy (talk) 23:38, 30 March 2018 (UTC)

MwdiaWiki:Common.css:
#wpPreviewWidget {
   display:none;
}
But remember that the "side-by-side preview" preview is deprecated and will probably soon be removed from newer versions of WikiEditor and if at that time you have this rule enabled, your users will have no preview options available. AhmadF.Cheema (talk) 03:46, 31 March 2018 (UTC)
Thx for css!
Very unfortunate to hear about loss of side-by-side.
It's visual language is easier to understand, because you can compare sub-sections with a quick toggle. Key-stroke would be nice.
2-pane might also be a good idea. The more quickly and conveniently you can compare line-by-line, word-by-word, the more useful is the preview.
For me, the vertical below or above arrangement is the least convenient of all. If you're writing a long page, it's awkward to scroll to it. You can't quickly compare sub-sections.
I hope future versions will be easy to customize.
I wonder how hard it would be to rip out the existing side-by-side code, and serve it up as an extension?
Wysiwyg is of course best. TinyMCE has bugs.
cheers! Johnywhy (talk) 08:40, 31 March 2018 (UTC)
The Preview tab is definitely, for me, the most used feature of the WikiEditor. I almost never use any of the edit buttons or CharInsert, but the preview has always been a must. The full page preview forces a refresh of the page, renders too much content on the page, and the user looses their place on the web-page.
Unfortunately, for whatever reason, the developers have apparently now completely focused on VisulaEditor and its related 2017 wikitext editor, which for a lot of small-scale personal Wiki administrators is too resource intensive to implement. AhmadF.Cheema (talk) 13:21, 31 March 2018 (UTC)
Exactly, everything you said.
I can't even use VisualEditor, because my webhost does not support node.js
What is the process to communicate ourselves to developers?
Re common.css, i dont have `wpPreviewWidget`. Following works on my MW v1.30.
#wikiPreview{
    Display:none;
}
Johnywhy (talk) 14:40, 31 March 2018 (UTC)
Are you sure it isn't a cache issue, with changes showing up late?
I don't think #wikiPreview does anything in this context. AhmadF.Cheema (talk) 16:39, 31 March 2018 (UTC)
i waited some time for CSS to take effect. I'm assuming if i change common.css, and then see a change on the frontend after 10 minutes, it's the most recent change i'm seeing, and not some older edit.
Also, when i test with browser css injector, #wikiPreview works, but #wpPreviewWidget doesn't.
I can see wikiPreview in page source:
https://image.ibb.co/h6nf5S/Screenshot_283.png Johnywhy (talk) 19:48, 31 March 2018 (UTC)
Oh, OK. I thought you wanted to hide the "Show Preview" button that creates the full page preview. Didn't know you wanted to hide the created preview.
For new CSS to take effect, you have to do a hard refresh (Ctrl + R) of the browser. AhmadF.Cheema (talk) 19:53, 31 March 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Can't edit user page

I've just registered an account on OeisWiki (for oeis.org), but I can't update my own biography (user page) because:

"The action you have requested is limited to users in the group: Wiki Users."

How do I proceed? Matta1415 (talk) 15:46, 31 March 2018 (UTC)

Since this website maintains no formal links for maintaining OeisWiki, you will have to ask them to insert you into the group Wiki Users. AhmadF.Cheema (talk) 16:31, 31 March 2018 (UTC)

Bug? Moderation Conflict with ApprovedRevs

Fixed in Extension:ApprovedRevs.

Download the github master, no other, to get the patch.

https://github.com/wikimedia/mediawiki-extensions-ApprovedRevs

To replicate:

  1. Install Extension:ApprovedRevs on MW v1.30  
  2. Perform an edit as User without 'approverevisions' permission. Don't approve it.
  3. Install Extension:Moderation
  4. Login as user without skip-moderation permission. Should be same as User without 'approverevisions' permission, above.
  5. Perform an edit on same page, on next line
  6. Login as moderator, nav to Special:Moderation, and reject the new edit.
  7. Login as user without skip-moderation permission, and re-do same edit on same page, same line.
  8. Login as moderator, nav to Special:Moderation, and approve the new edit.

Expected, Desired Result: approved moderated edit will appear in source-edit, but neither edit, above, should appear in public front-end (because should still be blocked by ApprovedRevs).

Actual, Incorrect Result: both edits performed above now appear in public front-end.

...

@Yaron Koren

@Edward Chernenko

@Edward Chernenko~mediawikiwiki Johnywhy (talk) 16:20, 31 March 2018 (UTC)

Will investigate this shortly. Edward Chernenko (talk) 23:46, 31 March 2018 (UTC)
The problem is not reproduced for me.
After the steps 1-8, I see two edits in RecentChanges:
  • the edit from #2 is present - this is correct, because Moderation is not enabled, so all edits are applied as usual. Note that ApprovedRevs extension itself does NOT stop edits (unlike Moderation).
  • the edit from #7 is present - this is correct, because it was approved.
  • the edit from #5 is not present - this is correct, because it was rejected.
Is there something I'm missing? Edward Chernenko (talk) 00:19, 1 April 2018 (UTC)
Thx for checking.
Plz clarify what you mean by "present". In front-end? Or source-edit?
No edit should appear in front-end until approved with ApprovedRevs. Are you saying that the edits are appearing in front-end or source-edit?
thx Johnywhy (talk) 00:24, 1 April 2018 (UTC)
Am I correct in assuming that by "appears in source-edit" you mean that edit is in RecentChanges/history,
and by "appears in front-end" you mean that the additional approval step of ApprovedRevs was performed?
I haven't checked the latter yet. Edward Chernenko (talk) 00:29, 1 April 2018 (UTC)
No on both:
"appears in source-edit": navigate to public-facing content-page. Click "Edit Source". Is it in the edit-area? (not saying anything about RecentChanges/history)
"appears in front-end" navigate to public-facing content-page. Is it on the page? That's what this bug-report is about (ApprovedRevs was not performed).
thx Johnywhy (talk) 00:33, 1 April 2018 (UTC)
@Edward Chernenko
hi, i revised my OP for clarity. ApprovedRevs approval was not performed.
-thx Johnywhy (talk) 15:53, 1 April 2018 (UTC)
Problem confirmed. This only happens if moderator has "approverevisions" right. Investigating how to fix this. Edward Chernenko (talk) 16:11, 1 April 2018 (UTC)
The cause is ApprovedRevs relying on $wgUser in ApprovedRevs::checkPermission() method.
When User:Admin approves the edit of User:SomeNonAdmin on Special:Moderation, $wgUser variable refers to User:Admin. Since User:Admin has "approverevisions" right, ApproveRevs thinks: "wow, $wgUser has approverevisions right, so let's automatically mark this revision as approved!". Thus the incorrect result.
This should be fixed in ApprovedRevs, because currently ApprovedRevs would show this problem with any extension that does doEditContent() via another user, not just with Moderation. Edward Chernenko (talk) 16:19, 1 April 2018 (UTC)
@Yaron Koren Johnywhy (talk) 16:28, 1 April 2018 (UTC)
@Johnywhy: thanks for reporting the problem, and @Edward Chernenko: thanks for diagnosing it. It's odd for Moderation and Approved Revs to be used together, but still this is a bug that should be fixed. I'll look into it. Yaron Koren (talk) 13:31, 2 April 2018 (UTC)
Using them together makes total sense for our scenario:
We have 3 buckets:
  • Published
  • Collaborative Draft
  • User Draft
These 2 extensions together make that possible. Moderation enables us to keep noise out of the collaborative draft. Makes sense?
There's a Phabricator task for this now: https://phabricator.wikimedia.org/T191175
Cheers!
@Yaron Koren Johnywhy (talk) 15:14, 2 April 2018 (UTC)
No, I don't understand, but it doesn't really matter. Yaron Koren (talk) 17:57, 2 April 2018 (UTC)
@Yaron Koren Edward is correct. We use the wonderful ApprovedRevs so non-registered visitors see only the published version.
We use the awesome Moderation so registered editors won't see vandalism or undesirable edits in the shared draft edits in their editor-screens.
And using the fantastic Extension:ConfirmAccount to filter out bots, vandals, unqualified users, etc.
And we don't allow anonymous edits.
The goal is quality control at the front-end, instead of moderation at the back end. I believe this will reduce overall admin effort to maintain quality users and edits. Johnywhy (talk) 20:54, 2 April 2018 (UTC)
Simpler usecase: Moderation is used against vandalism, ApprovedRevs for quality control.
Imperfect good-intentioned edit (e.g. adding useful text with bad formatting) is allowed by moderator (because other editors can improve this), but not marked as "approved revision" in ApprovedRevs (to not show this to readers yet). Edward Chernenko (talk) 19:19, 2 April 2018 (UTC)
As for the issue itself,
the solution is to pass $user as parameter to checkPermission(), userRevsApprovedAutomatically(), etc.
The hook ApprovedRevsHooks::updateLinksAfterEdit() can use $wikiPage->getUser() to determine correct $user. This doesn't cause an extra SQL query ($wikiPage has cached information about the last doEditContent()). Edward Chernenko (talk) 19:22, 2 April 2018 (UTC)
@Edward Chernenko: yes, I had the same idea. I checked in a change to the Approved Revs code to get rid of most of the global variables - not just $wgUser but also $wgOut, etc., which are all somewhat deprecated. (Although I didn't know about $wikiPage->getUser(), which is apparently the most important one - I made a separate change for that; thanks.)
@Johnywhy: hopefully this works now.
I still don't understand the need for using both extensions - can't Approved Revs be used against vandalism? But again, it's not that relevant. Yaron Koren (talk) 22:11, 2 April 2018 (UTC)
@Yaron Koren it's about keeping bad edits out of the common edit space. I don't think ApprovedRevs can do that, can it?
Thx for update. Should I see it on the extension page? Downloads appear unchanged. Johnywhy (talk) 12:53, 3 April 2018 (UTC)
What's the common edit space? And no new download has been created yet, but the code in the Git repository has been updated. Yaron Koren (talk) 13:35, 3 April 2018 (UTC)
When I tried about 10 hours ago, the readme file in git had same version#.
"common edit space" is how wikis work. Pages are collaboratively edited. Johnywhy (talk) 14:02, 3 April 2018 (UTC)
No, I didn't update the version number.
I think I understand what you're saying about Moderation vs. Approved Revs, but I still don't really see why it makes sense to use both. Anyway, this part of it doesn't seem like a fruitful conversation. Yaron Koren (talk) 14:04, 3 April 2018 (UTC)
@Yaron Koren Your update seems to break my wiki.
Installed this one: https://github.com/wikimedia/mediawiki-extensions-ApprovedRevs/archive/master.tar.gz
i simply deleted the old Extensions/ApprovedRevs folder, and replaced it with contents of your git master.
Now getting the following on wiki homepage:
This page isn’t working 
gunsense.xyz is currently unable to handle this request.
HTTP ERROR 500
Johnywhy (talk) 16:45, 4 April 2018 (UTC)
That's not good... adding the lines here may help show the error:
Manual:Errors and symptoms#You see a Blank Page Yaron Koren (talk) 17:15, 4 April 2018 (UTC)
Fatal error: Uncaught Error: Call to a member function getCheck() on null in /home/gunsywtx/public_html/extensions/ApprovedRevs/includes/ApprovedRevs_body.php:103 Stack trace: #0 /home/gunsywtx/public_html/extensions/ApprovedRevs/includes/ApprovedRevs.hooks.php(34): ApprovedRevs::isDefaultPageRequest(NULL) #1 /home/gunsywtx/public_html/includes/Hooks.php(177): ApprovedRevsHooks::removeRobotsTag(Array, Object(Title), Object(SkinVector)) #2 /home/gunsywtx/public_html/includes/Hooks.php(205): Hooks::callHook('PersonalUrls', Array, Array, NULL) #3 /home/gunsywtx/public_html/includes/skins/SkinTemplate.php(732): Hooks::run('PersonalUrls', Array) #4 /home/gunsywtx/public_html/includes/skins/SkinTemplate.php(475): SkinTemplate->buildPersonalUrls() #5 /home/gunsywtx/public_html/includes/skins/SkinTemplate.php(249): SkinTemplate->prepareQuickTemplate() #6 /home/gunsywtx/public_html/includes/OutputPage.php(2442): SkinTemplate->outputPage() #7 /home/gunsywtx/public_html/includes/exception/MWExceptionRenderer.php(135): OutputPage->ou in /home/gunsywtx/public_html/extensions/ApprovedRevs/includes/ApprovedRevs_body.php on line 103
Johnywhy (talk) 17:20, 4 April 2018 (UTC)
Oops, sorry - I had the same error message on my wiki. I just checked in a fix for this. Yaron Koren (talk) 17:43, 4 April 2018 (UTC)
after running updater, i can view site without logging in.
But if i log in, then i get:
Database error
A database query error has occurred. This may indicate a bug in the software.
[WsUWogpwmf3M1SVULAQUJAAAAVg] /index.php/Main_Page Wikimedia\Rdbms\DBQueryError from line 1149 of /home/gunsywtx/public_html/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: SELECT approver_id FROM `approved_revs` WHERE page_id = '1' LIMIT 1 
Function: Wikimedia\Rdbms\Database::selectField
Error: 1054 Unknown column 'approver_id' in 'field list' (localhost)
Backtrace:
#0 /home/gunsywtx/public_html/includes/libs/rdbms/database/Database.php(979): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#1 /home/gunsywtx/public_html/includes/libs/rdbms/database/Database.php(1343): Wikimedia\Rdbms\Database->query(string, string)
#2 /home/gunsywtx/public_html/includes/libs/rdbms/database/Database.php(1169): Wikimedia\Rdbms\Database->select(string, string, array, string, array, array)
#3 /home/gunsywtx/public_html/extensions/ApprovedRevs/includes/ApprovedRevs_body.php(28): Wikimedia\Rdbms\Database->selectField(string, string, array)
#4 /home/gunsywtx/public_html/extensions/ApprovedRevs/includes/ApprovedRevs.hooks.php(508): ApprovedRevs::getRevApprover(Title)
#5 /home/gunsywtx/public_html/includes/Hooks.php(177): ApprovedRevsHooks::setSubtitle(Article, string)
#6 /home/gunsywtx/public_html/includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL)
#7 /home/gunsywtx/public_html/includes/page/Article.php(1303): Hooks::run(string, array)
#8 /home/gunsywtx/public_html/includes/page/Article.php(556): Article->setOldSubtitle(string)
#9 /home/gunsywtx/public_html/includes/actions/ViewAction.php(68): Article->view()
#10 /home/gunsywtx/public_html/includes/MediaWiki.php(499): ViewAction->show()
#11 /home/gunsywtx/public_html/includes/MediaWiki.php(293): MediaWiki->performAction(Article, Title)
#12 /home/gunsywtx/public_html/includes/MediaWiki.php(851): MediaWiki->performRequest()
#13 /home/gunsywtx/public_html/includes/MediaWiki.php(523): MediaWiki->main()
#14 /home/gunsywtx/public_html/index.php(43): MediaWiki->run()
#15 {main}
Johnywhy (talk) 18:17, 4 April 2018 (UTC)
Yeah, there was a recent change to the Approved Revs DB table - you need to call MediaWiki's update.php script. Yaron Koren (talk) 18:49, 4 April 2018 (UTC)
Hrm, getting Database error. Am i not allowed to use mw-config for this?
i browsed to https://gunsense.xyz/mw-config and executed the updater. After logging in, got:
Database error
A database query error has occurred. ....
Then i tried running update.php at terminal, logged in, and it worked.
I've read the only time not to use the web-based updater is when the wiki has "a lot" of pages.
"If your database is already big and in high production usage, then you should not be using the Web updater"
Manual:Upgrading#Web browser Johnywhy (talk) 03:48, 5 April 2018 (UTC)
After successful update of ApprovedRevs provided by extension-developer, i'm still getting same error as OP.
Steps:
  • Install ApprovedRevs and Moderation.
  • Login as non-moderator User without 'approverevisions' permission, and Perform an edit.
  • Login as moderator with 'approverevisions' permission, go to Special:Moderation, and approve the edit.
  • Logout and view page.
Expected result: Moderator-approved edit will appear in source-editor, but should not appear in public page front-end (because should still be blocked by ApprovedRevs).
Actual, Incorrect Result: The edit now appears in public front-end view of the page.
Could this explain the problem?
-- Since moderator has 'approverevisions' permission, when they approve the edit the edit is applied as if the moderator performed the edit.
  • It should not behave that way-- all edits should remain attributed to their original editors.
  • Looking at the page history, i do see a version by the moderator, but it does not contain the edits performed by the non-moderators.
  • The new version in history does appear to correctly attribute the edits to the non-moderator author.
https://phabricator.wikimedia.org/T191175#4110354 Johnywhy (talk) 04:19, 5 April 2018 (UTC)
I'll investigate this further. Edward Chernenko (talk) 22:47, 5 April 2018 (UTC)
Found the cause, checkPermission() was testing permissions of the current user (i.e. the moderator, not author of edit).
Submitted a fix: https://gerrit.wikimedia.org/r/#/c/424576/ Edward Chernenko (talk) 12:18, 6 April 2018 (UTC)
Thx! Sounds like my theory was close. Should I just download the patch, and overwrite the same files in my current install? Johnywhy (talk) 15:54, 6 April 2018 (UTC)
Please download the latest version of ApprovedRevs (the patch has already been merged into it) and try it out.
In my tests, the problem no longer exists (edits are no longer auto-approved by ApprovedRevs when moderator has "approverevisions" and author doesn't). Edward Chernenko (talk) 16:33, 6 April 2018 (UTC)
From here, correct?
https://github.com/wikimedia/mediawiki-extensions-ApprovedRevs Johnywhy (talk) 17:58, 6 April 2018 (UTC)
Yes. "Clone or download" -> "Download ZIP". Edward Chernenko (talk) 18:45, 6 April 2018 (UTC)
@Edward Chernenko btw, did you update the version number?
Thx! Johnywhy (talk) 18:01, 20 April 2018 (UTC)
@Johnywhy This was fixed on ApprovedRevs side, we didn't change anything in Moderation. Edward Chernenko (talk) 18:43, 20 April 2018 (UTC)
Yes, I meant ApprovedRevs version number. I ask cuz Yaron mentioned that he didn't change the version number in the previous update. Thx. Johnywhy (talk) 19:37, 20 April 2018 (UTC)
I think this is now resolved. Thx @Edward Chernenko and @Yaron Koren for your work on this fix!
I'll try it out for a while before marking this issue as resolved.
Thx!
PS: As to why we are using both: These 2 extensions do different things. They aren't redundant. We are using ApprovedRevs as a Draft-Management tool-- not as a moderation tool. Johnywhy (talk) 19:11, 6 April 2018 (UTC)
Great! Yes, thank you to both of you. Yaron Koren (talk) 20:24, 6 April 2018 (UTC)

LocalisationUpdate doesn't work

I don't manage to update my wiki's system messages using the LocalisationUpdate extension.

My wiki is stored on my PC, it's not on the web. I run it via XAMPP.

When I open the shell and run the php extensions/LocalisationUpdate/update.php command, I get an error message:

Could not open input file: extensions/LocalisationUpdate/update.php

To see a video illustrating my issue, please watch this.

Thanks in advance. Guycn2 (talk) 21:02, 31 March 2018 (UTC)

First guess would be that your current working directory is not the mediawiki directory. Bawolff (talk) 06:04, 2 April 2018 (UTC)
@Bawolff Thank you. I navigated to the mediawiki directory and ran the php extensions/LocalisationUpdate/update.php command. Nothing appeared on the screen for about half an hour, and then it said: "Found no new translations". However, I am sure that there are new translations, because I see many outdated system messages on my wiki that were changed on translatewiki.net a few weeks ago and already appear on Wikimedia wikis. I did not modify any of these messages by editing the "MediaWiki:" namespace on my wiki, so I don't understand why it says that there are no new translations... Guycn2 (talk) 16:47, 2 April 2018 (UTC)
It might be a windows thing. I believe that particular extension is tested almost exclusively on linux, so it may have bugs on windows.
Another possibility is maybe it has trouble accessing translatewiki (if for example the curl php extension is not installed or a firewall is blocking it)
These are just wild guesses. I don't know that much about the extension. Bawolff (talk) 05:31, 3 April 2018 (UTC)
Ok, thanks... So there's no way I can get the most recent messages without upgrading to a new version..? The problem is that I already have the most updated one (1.30)... Guycn2 (talk) 19:08, 3 April 2018 (UTC)
You can download an experimental alpha version of MediaWiki at https://tools.wmflabs.org/snapshots/#!/mediawiki-core/master . You may not want to use that version directly, but you could copy the directory languages/i18n from the experimental version into your version, which should update the language files. (Doing this is not "officially" supported, but should work and should be fairly safe). Bawolff (talk) 17:15, 4 April 2018 (UTC)
Thanks, it works. However, it only updates the core messages. I have lots of extensions installed, and I guess I should also do it for the he.json file of each extension to update their messages as well. Also, maybe it's pretty petty, but I'd be happy to update all languages, not only my wiki's default one (Hebrew), so that those who changed their preferences to different language can also see the updated messages. But your solution is also very good, at least until I figure out how to do it with LocalisationUpdate. Maybe there is somebody you know that might also be able to try helping me with this? Guycn2 (talk) 07:36, 7 April 2018 (UTC)
Also, according to Extension:LocalisationUpdate#Installation, the server must have permissions to write on the cache folder. Maybe this is my problem? How can I check if the server can write on this folder? Guycn2 (talk) 07:49, 7 April 2018 (UTC)
For Windows users, just make sure to run CMD as an administrator. 星耀晨曦 (talk) 08:29, 7 April 2018 (UTC)

After picture upload - picture can't be displayed

Hello,

today I installed the newest version of MediaWiki on my server.

MySql 5.5

PHP 7.2

I tried to upload a picture. The upload worked (I can see the picture on the ftp server), but the link on every page shows up as broken. When I try to open the file from the wiki this error shows up:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, admin and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Wether the picture nor the thumbnail shows up.

What's the matter here? What went wrong during the installation?

Regards

J 81.217.15.90 (talk) 21:20, 31 March 2018 (UTC)

Something is misconfigured with your webserver. Check your webserver's error log. Bawolff (talk) 06:02, 2 April 2018 (UTC)

Bug? Patroller Error

Extension:Patroller gives error, on browsing to Special:Patroller .

Reported here and here.

MW v1.30

[WsAfET-@jcqxiKxPT0bRjQAAAUk] /index.php/Special:Patroller Wikimedia\Rdbms\DBUnexpectedError from line 2479 of /home/my_username/public_html/includes/libs/rdbms/database/Database.php: Invalid non-numeric limit passed to limitResult()
Backtrace:

#0 /home/my_username/public_html/includes/libs/rdbms/database/Database.php(1395): Wikimedia\Rdbms\Database->limitResult(string, string, boolean)
#1 /home/my_username/public_html/includes/libs/rdbms/database/Database.php(1341): Wikimedia\Rdbms\Database->selectSQLText(array, string, string, string, array, array)
#2 /home/my_username/public_html/extensions/Patroller/SpecialPatroller.php(246): Wikimedia\Rdbms\Database->select(array, string, array, string, array, array)
#3 /home/my_username/public_html/extensions/Patroller/SpecialPatroller.php(97): SpecialPatroller->fetchChange(User)
#4 /home/my_username/public_html/includes/specialpage/SpecialPage.php(522): SpecialPatroller->execute(NULL)
#5 /home/my_username/public_html/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)
#6 /home/my_username/public_html/includes/MediaWiki.php(287): SpecialPageFactory::executePath(Title, RequestContext)
#7 /home/my_username/public_html/includes/MediaWiki.php(851): MediaWiki->performRequest()
#8 /home/my_username/public_html/includes/MediaWiki.php(523): MediaWiki->main()
#9 /home/my_username/public_html/index.php(43): MediaWiki->run()
#10 {main}

PS, i noticed my username appears in this error message, visible in this error message (obscured above). Might that be a security vulnerability?

thx Johnywhy (talk) 23:56, 31 March 2018 (UTC)

Same problem, I do have same error, Try using Extension:PageTriage. I think it is better than Patroller Reezanahamed (talk) 05:42, 2 April 2018 (UTC)
>PS, i noticed my username appears in this error message, visible in this error message (obscured above). Might that be a security vulnerability?
That's why we generally reccomend people don't enable detailed error reports on production wikis (That said, its not really a vulnerability per se) Bawolff (talk) 06:01, 2 April 2018 (UTC)
not a production site yet :)
it's my ftp username, so that seems a bit unsafe. Johnywhy (talk) 06:11, 2 April 2018 (UTC)
This is supposed to be fixed according to phab:T232985 AKlapper (WMF) (talk) 13:55, 16 September 2019 (UTC)