Hi,

I'm running 4.7.0-beta-3 and have installed privatemsg.module 1.50.

The module works fine when you go directly to the relevant pages and send / receive messages between users but the 'write to author' links don't appear on any of the nodes or comments. Could someone point me in the right direction?

Also, I've customised the user profile page using the listed PHP page snippet. The page that appears when the link is clicked from a user profile leaves the To: field blank although the path looks fine (/privatemsg/msgto/1, for example).

Again, any ideas, anyone?

CommentFileSizeAuthor
#3 privatemsg_link_47.patch1.43 KBmindless

Comments

Patrick Nelson’s picture

Category: support » bug
Priority: Normal » Critical

In the latest CVS version of 4.7, enabling the Write to author link creates another problem. See the issue posted at http://drupal.org/node/50629 for explanation.

This needs fixing because it makes the module unusable and that's why I'm changing the status to critical / bug report.

MrEricSir’s picture

I'm having this very same problem. Anyone know a fix?

I got the links to show up for all users by commenting out user_access('access private messages', $arg) in privatemsg_link(). But that's clearly not ideal.

mindless’s picture

Status: Active » Needs review
StatusFileSize
new1.43 KB

The privatemsg_link function uses the 2nd parameter incorrectly.. under 4.6.x this worked by luck, as the user_access function didn't use any fields of $arg except $arg->uid, so passing a node instead of a user actually worked. 4.7 user_access uses another field the node doesn't have. The attached patch loads the user object and passes that instead, also caches that lookup by userid to avoid repeats.

mindless’s picture

Assigned: Unassigned » mindless

I have included this change in 67612.

mindless’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)