Log: Recoverable fatal error: Method DatabaseCondition::__toString() must return a string value in privatemsg_realname_query_privatemsg_autocomplete_alter() (line 60 of sites/all/modules/privatemsg/privatemsg_realname/privatemsg_realname.module).
That cause AJAX error on Autocomplete Username when writing a new private message on IE or Chrome (Firefox is OK) in
function privatemsg_realname_query_privatemsg_autocomplete_alter(SelectQueryInterface $query) {}
if ($condition['field'] == 'u.name') {

should be change to

 if (isset($condition['field']) && is_string($condition['field'])
                && $condition['field'] == 'u.name') {

to fix this Error.

Files: 
CommentFileSizeAuthor
#3 privatemsg-ajax-autocomplete-error-1956038-3.patch801 bytesptmkenny
PASSED: [[SimpleTest]]: [MySQL] 3,125 pass(es). View

Comments

Johann Wagner’s picture

I got this bug on Firefox too.

Thank you.

ptmkenny’s picture

Marking http://drupal.org/node/1911138 as duplicate although there is another workaround suggested there.

ptmkenny’s picture

Status: Active » Needs review
FileSize
801 bytes
PASSED: [[SimpleTest]]: [MySQL] 3,125 pass(es). View

Attaching a patch. All credit goes to memberall.

Status: Needs review » Needs work

The last submitted patch, privatemsg-ajax-autocomplete-error-1956038-3.patch, failed testing.

ptmkenny’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, privatemsg-ajax-autocomplete-error-1956038-3.patch, failed testing.

ptmkenny’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
ptmkenny’s picture

Status: Needs work » Needs review
ptmkenny’s picture

There's a comment here: https://drupal.org/node/1911138#comment-7502500 that states this patch fixes the problem in IE.

ptmkenny’s picture

Marked https://drupal.org/node/2007058 as a duplicate, although there is another patch there to fix this issue.

Berdir’s picture

Status: Needs review » Fixed

Committed and pushed.

Status: Fixed » Closed (fixed)

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