Hi,
I run a website based on Mediawiki. After I have upgraded from 1.5 to 1.7.1, users on my wiki can no longer talk on the pages!
Local settings have the following
$wgGroupPermissions['*' ]['read'] = true; $wgGroupPermissions['*' ]['edit'] = false; $wgGroupPermissions['*' ]['talk'] = true; $wgGroupPermissions['user' ]['edit'] = false; $wgGroupPermissions['user' ]['move'] = false; $wgGroupPermissions['user' ]['talk'] = true; $wgGroupPermissions['sysop']['edit'] = true; # // Implicit group for all visitors $wgGroupPermissions['*' ]['createaccount'] = true;
$wgDisableAnonTalk = true;
# and also
$wgEmailAuthentication = true;
I know this is very limited information. If somebody can at least point in the right direction for checking for what is causing this ....
Thanks in advance
asselarain-mediawikil@yahoo.com wrote:
I run a website based on Mediawiki. After I have upgraded from 1.5 to 1.7.1, users on my wiki can no longer talk on the pages!
[snip]
$wgGroupPermissions['*' ]['edit'] = false;
[snip]
$wgGroupPermissions['user' ]['edit'] = false;
That would appear to be your problem.
-- brion vibber (brion @ pobox.com)
Hm...doesn't these two lines mean that "Users (logged in or not) can't edit PAGES"? I want that to be like that -- users should not edit pages since this is a web page, but they should be able to participate by contributing to 'talk' pages.
----- Original Message ---- From: Brion Vibber brion@pobox.com To: MediaWiki announcements and site admin list mediawiki-l@Wikimedia.org Sent: Wednesday, September 13, 2006 11:31:39 PM Subject: Re: [Mediawiki-l] Users can not 'talk'
asselarain-mediawikil@yahoo.com wrote:
I run a website based on Mediawiki. After I have upgraded from 1.5 to 1.7.1, users on my wiki can no longer talk on the pages!
[snip]
$wgGroupPermissions['*' ]['edit'] = false;
[snip]
$wgGroupPermissions['user' ]['edit'] = false;
That would appear to be your problem.
-- brion vibber (brion @ pobox.com)
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
asselarain-mediawikil@yahoo.com wrote:
Hm...doesn't these two lines mean that "Users (logged in or not) can't edit PAGES"? I want that to be like that -- users should not edit pages since this is a web page, but they should be able to participate by contributing to 'talk' pages.
Talk pages are pages. You are aware this is a wiki system, right?
-- brion vibber (brion @ pobox.com)
asselarain-mediawikil-/E1597aS9LQAvxtiuMwx3w@public.gmane.org a écrit :
Hm...doesn't these two lines mean that "Users (logged in or not) can't edit PAGES"? I want that to be like that -- users should not edit pages since this is a web page, but they should be able to participate by contributing to 'talk' pages.
I think the 'talk' right doesn't exist in mediawiki default installation, you need to create it by changing a little bit the *isAllowed()* function in "includes/User.php " folder.
A few months ago, I found this on mediawiki.org (but I can't remember on which page) :
(it's for 1.5.8, but it shouldn't be too difficult to adapt it to 1.7.1)
change this :
function isAllowed($action='') { $this->loadFromDatabase(); return in_array( $action , $this->mRights ); }
into this
function isAllowed($action='', $title = NULL) { if( $title == NULL ) { global $wgTitle; $title = $wgTitle; }
$this->loadFromDatabase();
if( in_array( $action , $this->mRights ) ) { return true; }
// If user wants to edit a talk page and has the talk right, and the subject page exists, allow him to do so... if( $action == 'edit' && $title->isTalkPage() && in_array('talk', $this->mRights)) { $subject_page = $title->getSubjectPage(); if ($subject_page->exists()) { return true; } }
return false; }
Alexis
A few months ago, I found this on mediawiki.org (but I can't remember on which page) :
I found it on meta for 1.6.5 (and, most likely, it works with 1.7.1):
http://meta.wikimedia.org/wiki/Help:User_rights#Questions
function isAllowed($action='') { if ( $action === '' ) // In the spirit of DWIM return true;
/* Special Cases */ global $wgTitle; //Allow them to edit talk pages if ($wgTitle->isTalkPage() && strcmp("edit", $action) == 0) return true;
//No special cases relevant. Use established rules stored in DB. $this->loadFromDatabase(); return in_array( $action , $this->mRights ); }
I don't know which one of $action == 'edit' (see previous post) or strcmp("edit", $action) == 0 is the most secure, sounds like both might be unsafe.
Anyway, I would, at least, change the code above to :
$this->loadFromDatabase();
if ($wgTitle->isTalkPage() && strcmp("edit", $action) == 0 && in_array('talk', $this->mRights)) return true;
return in_array( $action , $this->mRights );
*If I were you, I would wait for most competent advices than mine about the safety of this kind of modification*
Alexis
I think this is it! What had happened is, long time back I had this mod done in my code and when it was upgraded, obviously the mod was wiped away! Thanks a lot for the valuable advice.
----- Original Message ---- From: Alexis Moinet alexis.moinet@fpms.ac.be To: MediaWiki announcements and site admin list mediawiki-l@Wikimedia.org Sent: Thursday, September 14, 2006 4:44:06 PM Subject: Re: [Mediawiki-l] Users can not 'talk'
A few months ago, I found this on mediawiki.org (but I can't remember on which page) :
I found it on meta for 1.6.5 (and, most likely, it works with 1.7.1):
http://meta.wikimedia.org/wiki/Help:User_rights#Questions
function isAllowed($action='') { if ( $action === '' ) // In the spirit of DWIM return true;
/* Special Cases */ global $wgTitle; //Allow them to edit talk pages if ($wgTitle->isTalkPage() && strcmp("edit", $action) == 0) return true;
//No special cases relevant. Use established rules stored in DB. $this->loadFromDatabase(); return in_array( $action , $this->mRights ); }
I don't know which one of $action == 'edit' (see previous post) or strcmp("edit", $action) == 0 is the most secure, sounds like both might be unsafe.
Anyway, I would, at least, change the code above to :
$this->loadFromDatabase();
if ($wgTitle->isTalkPage() && strcmp("edit", $action) == 0 && in_array('talk', $this->mRights)) return true;
return in_array( $action , $this->mRights );
*If I were you, I would wait for most competent advices than mine about the safety of this kind of modification*
Alexis
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
If one just use <pre> </pre> tags (or indentation implying the same!) between list elements, the list continuity is lost. (e.g. Numbered list will be broken here and will start at 1. in the next item!). There used to be a work around for this: # one # two <nowiki> </nowiki><pre><nowiki> TMP </nowiki></pre> # three
Until recently this worked flowlessly. But not any more in > 1.7.1 versions!! Does anybody know why? I have been using this construct a lot and now things suddenly look ugly!
Is this a known bug?
Have a look at : http://meta.wikimedia.org/wiki/Help:Editing_FAQ#Q:_Can_I_put_preformatted_te... before commenting please!
I've got MediaWiki 1.82 working on my Apache server; I've got image upload enabled. What do I need to do to get SVGs rendered to PNG using InkScape - where do I change it in LocalSettings.php
Bekki
-------------------------------------------------------------------- Get your free email address at http://www.merseymail.com/
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Alexis Moinet wrote:
asselarain-mediawikil-/E1597aS9LQAvxtiuMwx3w@public.gmane.org a écrit :
Hm...doesn't these two lines mean that "Users (logged in or not) can't edit PAGES"? I want that to be like that -- users should not edit pages since this is a web page, but they should be able to participate by contributing to 'talk' pages.
I think the 'talk' right doesn't exist in mediawiki default installation, you need to create it by changing a little bit the *isAllowed()* function in "includes/User.php " folder.
You should not handle the talk pages editing in User::isAllowed ? it's a general function for *all* the permissions, and editing talk pages is not a "special case"! The right way would be to add the restrictions to Title::userCan via the hook userCan. Something like that in LocalSettings.php may work (I didn't check it), and will not be removed in upgrades:
# Set group edit restrictions $wgGroupPermissions['*']['editpage'] = false; $wgGroupPermissions['user']['editpage'] = true; $wgGruopPermissions['*']['edittalk'] = true;
# Set userCan hook $wgHooks['userCan'][] = 'wfSetEditRestrictions';
# Edit restrictions function wfSetEditRestrictions( &$title, &$user, $action, &$result ) { if( $action != 'edit' ) { return; } if( $title->isTalkPage() && !$user->isAllowed( 'edittalk' ) || !$title->isTalkPage() && !$user->isAllowed( 'editpage' ) { return false; } else { return true; } }
When the configuration is set to require email verification when creating an account by setting $wgEmailConfirmToEdit=true, is there a way to restrict account verification to spscific mail addresses such as "mymailserver.com" addresses. So for example, a user using the email address "joe@mymailserver.com" could successfully create an email verified wiki account while joe@msn.com would be denied? All I found in the archives is that this might require a modification of PHP code. Any ideas welcome.
-Jim
Ok Heres my problem.
I've been in contact with my hosting service and ImageMagik is installed and as far as they can see everything should be working. I've been into the local settings and set it so its should be on here's what LocalSettings.php is set as at the moment:
## To enable image uploads, make sure the 'images' directory ## is writable, then set this to true: $wgEnableUploads = true; $wgUseImageResize = true; $wgUseImageMagick = true; $wgImageMagickConvertCommand = '/usr/bin/convert';
## If you want to use image uploads under safe mode, ## create the directories images/archive, images/thumb and ## images/temp, and make them all writable. Then uncomment ## this, if it's not already uncommented: $wgHashedUploadDirectory = false;
Now they say thats completly right as far as they no. And because it isnt working I should contact the script author. And As I dont know who that is I thought I'd come back to you guys.
Now I go into the Gallery of New files on my wiki (www.startrekprotection.com/wiki) as its the easiest way to check if its working or not and for each image it cant re-size it comes up with this error message.
Warning: shell_exec(): Cannot execute using backquotes in Safe Mode in /home/Jono/domains/startrekprotection.com/public_html/wiki/includes/GlobalFu nctions.php on line 1615
Now I've been into GlobalFunctions but for the life of me can't figure out what it is I have to do to make it work..
Anyone know how to help me?
Jono
Obviously usercan is a very much better way of handling restrictions compared with custom modifications to User.php (My experience with losing the mods @ upgrade is good evidence).
Sadly, though, usercan seems NOT to work with 1.7.1 ! (I have attached my LocalSettings.php part below:
// No anonymous editing allowed - $wgGroupPermissions['*' ]['read'] = true; $wgGroupPermissions['*' ]['edit'] = false; $wgGroupPermissions['*' ]['talk'] = false; $wgGroupPermissions['user' ]['edit'] = false; $wgGroupPermissions['user' ]['move'] = false; $wgGroupPermissions['user' ]['talk'] = true;
# Edit restrictions function wfSetEditRestrictions( &$title, &$user, $action, &$result ) { if( $action != 'edit' ) { return; } if( ( $title->isTalkPage() && !$user->isAllowed( 'talk' )) || (!$title->isTalkPage() && !$user->isAllowed( 'edit' )) ) { return false; } else { return true; } } # Set userCan hook $wgHooks['userCan'][] = 'wfSetEditRestrictions';
----- Original Message ---- From: Rotem Liss rotemliss_net@fastmail.fm To: MediaWiki announcements and site admin list mediawiki-l@Wikimedia.org Sent: Friday, September 15, 2006 2:25:20 AM Subject: Re: [Mediawiki-l] Users can not 'talk'
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Alexis Moinet wrote:
asselarain-mediawikil-/E1597aS9LQAvxtiuMwx3w@public.gmane.org a écrit :
Hm...doesn't these two lines mean that "Users (logged in or not) can't edit PAGES"? I want that to be like that -- users should not edit pages since this is a web page, but they should be able to participate by contributing to 'talk' pages.
I think the 'talk' right doesn't exist in mediawiki default installation, you need to create it by changing a little bit the *isAllowed()* function in "includes/User.php " folder.
You should not handle the talk pages editing in User::isAllowed ? it's a general function for *all* the permissions, and editing talk pages is not a "special case"! The right way would be to add the restrictions to Title::userCan via the hook userCan. Something like that in LocalSettings.php may work (I didn't check it), and will not be removed in upgrades:
# Set group edit restrictions $wgGroupPermissions['*']['editpage'] = false; $wgGroupPermissions['user']['editpage'] = true; $wgGruopPermissions['*']['edittalk'] = true;
# Set userCan hook $wgHooks['userCan'][] = 'wfSetEditRestrictions';
# Edit restrictions function wfSetEditRestrictions( &$title, &$user, $action, &$result ) { if( $action != 'edit' ) { return; } if( $title->isTalkPage() && !$user->isAllowed( 'edittalk' ) || !$title->isTalkPage() && !$user->isAllowed( 'editpage' ) { return false; } else { return true; } }
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
asselarain-mediawikil@yahoo.com wrote:
Obviously usercan is a very much better way of handling restrictions compared with custom modifications to User.php (My experience with losing the mods @ upgrade is good evidence).
Sadly, though, usercan seems NOT to work with 1.7.1 ! (I have attached my LocalSettings.php part below:
Use the following code instead:
# Set group edit restrictions $wgGroupPermissions['*']['editpage'] = false; $wgGroupPermissions['user']['editpage'] = true; $wgGroupPermissions['*']['edittalk'] = true;
# Set userCan hook $wgHooks['userCan'][] = 'wfSetEditRestrictions';
# Edit restrictions function wfSetEditRestrictions( &$title, &$user, $action, &$result ) { if( $action != 'edit' ) { return; } if( $title->isTalkPage() && !$user->isAllowed( 'edittalk' ) || !$title->isTalkPage() && !$user->isAllowed( 'editpage' ) ) { $result = false; } else { $result = true; } }
(I found a few errors in the code I posted earlier, however now the code is tested and working also in 1.7.1.)
// No anonymous editing allowed - $wgGroupPermissions['*' ]['read'] = true; $wgGroupPermissions['*' ]['edit'] = false; $wgGroupPermissions['*' ]['talk'] = false; $wgGroupPermissions['user' ]['edit'] = false; $wgGroupPermissions['user' ]['move'] = false; $wgGroupPermissions['user' ]['talk'] = true;
You have to use the permissions "editpage" and "edittalk" instead of "edit" and "talk", else it doesn't work.
mediawiki-l@lists.wikimedia.org