Everything works as it should, but when sending messages, I get this warning:

Warning: Missing argument 4 for entity_property_verbatim_get(), called in /home/ftp/sites/all/modules/entity/includes/entity.property.inc on line 589 and defined in entity_property_verbatim_get() (Zeile 372 von /home/ftp/sites/all/modules/entity/includes/entity.property.inc).

Warning: Missing argument 5 for entity_property_verbatim_get(), called in /home/ftp/sites/all/modules/entity/includes/entity.property.inc on line 589 and defined in entity_property_verbatim_get() (Zeile 372 von /home/ftp/sites/all/modules/entity/includes/entity.property.inc).

Entity API is on 7.x-1.0-rc2.

Messages are getting sent correctly. Does anybody have an idea what the problem is?

Thanks in advance!

Files: 
CommentFileSizeAuthor
#5 privatemsg-update-deprecated-entity-api-calls-1557626-5.patch1.31 KBptmkenny
PASSED: [[SimpleTest]]: [MySQL] 4,878 pass(es).
[ View ]

Comments

Shnapoo’s picture

Version:7.x-1.2» 7.x-1.x-dev
Component:Miscellaneous» Code
Priority:Normal» Major
Status:Active» Needs work

I tracked it a bit down and really spent some time with no significant success. All I can do is provide what I found:

Entity-API has changed. entity_metadata_verbatim_get() is depricated. Privatemsg should use entity_property_verbatim_get() instead. Same for entity_metadata_verbatim_set(). See privatemsg.module @ 2989

Just replacing the callbacks doesn't seem to work.

And a fix might require the latest Drupal version, since there was a bug in entity info caching.

chikipi’s picture

you have to empty your cache after replacing the callback.

ptmkenny’s picture

Priority:Major» Normal
Status:Needs work» Closed (cannot reproduce)

I'm unable to reproduce this using the latest version of Privatemsg and Entity 1.1. The error no longer appears, but the function calls are still deprecated.

ptmkenny’s picture

Status:Closed (cannot reproduce)» Active
ptmkenny’s picture

Assigned:Berdir» Unassigned
StatusFileSize
new1.31 KB
PASSED: [[SimpleTest]]: [MySQL] 4,878 pass(es).
[ View ]

Adding patch that replaces the callbacks as per #1. As reported in #2, after clearing the cache, things seem to work. All credit goes to Shnapoo.

ptmkenny’s picture

Version:7.x-1.x-dev» 7.x-2.x-dev
Assigned:Unassigned» Berdir
Status:Active» Needs review
ptmkenny’s picture

Title:Warning appears when sending a message» Replace deprecated Entity API functions with current functions
Assigned:Unassigned» Berdir
Berdir’s picture

Status:Needs review» Fixed

Committed and pushed to 7.x-2.x and 7.x-1.x, thanks!

Status:Fixed» Closed (fixed)

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

Anonymous’s picture

Issue summary:View changes

.