I am unable to access messages/new with admin (uid 1). I'm testing with garland theme.
Has there been any recent changes to 6.x-2.x-dev that may have caused this?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir’s picture

Status: Active » Postponed (maintainer needs more info)

Have you disabled private messages in your profile for uid 1?

robby.smith’s picture

Status: Postponed (maintainer needs more info) » Active

wow, I didn't even know such an option existed.
Is there any way of preventing uid 1 and all users from turning this option off?
Thanks!

Privatemsg settings
[ ]Enable Private Messaging

Berdir’s picture

Title: uid 1 cannot access messages/new » Add permission to allow disabling privatemsg and display notice when disabled
Category: bug » feature

See title, I think we can and should two things to improve UX and DX (fancy words):

- Add a permission which allows users to control this setting
- Display a notice on all /messages pages informing the user that he has disabled privatemsg and is not allowed to create messagings, including a link to his profile where he can enable it again.

robby.smith’s picture

I believe the above two would be a great check to have!

"Display a notice on all /messages pages informing the user that he has disabled privatemsg and is not allowed to create messagings, including a link to his profile where he can enable it again."
Can the above be an option that the admin can choose in the settings? Also, for the benefit of themers it would be nice to allow checking for this variable in a template file and if/if not existing to do as they please (for example show specific text or an image etc)?

Thanks!

Berdir’s picture

Status: Active » Needs review
FileSize
3.9 KB

Try the patch. Adds a permission and displays a warning message. The warning message can be disabled.

Also, for the benefit of themers it would be nice to allow checking for this variable in a template file and if/if not existing to do as they please (for example show specific text or an image etc)?

Uhm. You could simply call privatemsg_is_disabled($account) for that, is it really necessary to have a variable?

Status: Needs review » Needs work

The last submitted patch, privatemsg_allow_disabling_setting.patch, failed testing.

robby.smith’s picture

"Adds a permission and displays a warning message. The warning message can be disabled."
This sounds great!

If it is possible to do it without a variable then I agree it isn't necessary. Could you please share how to "call privatemsg_is_disabled($account)" can be used in a template file (ie node.tpl.php or a view template file). Would it just be like (would this call be available in any template file):

 if privatemsg_is_disabled($account) {

}

Also, it looks like the patch failed testing above. Should I still try applying myself?
Thanks!!

YK85’s picture

subscribing

Berdir’s picture

Status: Needs work » Needs review
FileSize
5.45 KB

Fixed the tests...

Yes, you can use it like that in every template (the () are missing from your if, though...)

Berdir’s picture

Status: Needs review » Fixed

Commited to 6.x-2.x-dev and 7.x-1.x-dev. We need to clean up the admin settings UI a bit, opening a new issue for that.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.