Hello,
I'm getting the following error:
Too few arguments to function entity_property_verbatim_get(), 3 passed in /usr/share/nginx/html/drupal/sites/all/modules/entity/includes/entity.property.inc on line 600 and exactly 5 expected in entity_property_verbatim_get() (line 376 of /usr/share/nginx/html/drupal/sites/all/modules/entity/includes/entity.property.inc)
System is Ubuntu 18.04
php 7.2
DB MAriaDB
Drupal 7.61
entity mod. 7.x-1.9
I've recently updated the system to Ubuntu 18.04 and php7.2. After a quick check, except some warning, I didn't note anything wrong, but today an user told me that he wasn't able to see his new created posts, and then I found out that as administrator, I can't delete any content created by others. I've rebuilt the permissions, cleared the cache but nothing. When I try to delete a content, I get "The website encountered an unexpected error. Please try again later." I can add that I've the rules module installed: when I delete a post, a rule is fired with success, but the content is still there!
Since the above error about entity is the only serious one, I suppose it could be the cause of my problem, but I'm not sure and I don't have any clue about how to solve it...
Thank you
Kinmen
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 3023044-8-entity-metadata-verbatim-get.patch | 536 bytes | tr |
| #4 | entity-3023044-4.patch | 535 bytes | daiwik.addweb |
Comments
Comment #2
kinmen commentedI've found out it is probably related to another module.
Comment #3
kscheirerThis should probably get fixed anyway.
Comment #4
daiwik.addweb commented@kinmen, Please find the updated patch, to resolve I've added required arguments on entity_property_verbatim_get function. Hope this will helps.
Thanks
Comment #5
kinmen commentedHello Roshnipatel.addweb. Thank you very much for spending your time to look at my issue. Today I've spent some time in testing your patch, and I can tell you that it works, I just had to clear the cache a couple of times after applying it. Finally the posts of my web site are shown again to everybody, users and visitors!! I therefore could complete the switch from php 7.0 to php 7.2. Hurrah!! I really don't know how to thank you, I've waited so long for a proper solution, wondering why nobody else seemed to experience my same issue... I'll keep an eye in the next days to be sure that everything runs fine.
This is to thank you:) 🌹
Kinmen
Comment #6
kscheirerBased on #5.
Comment #7
joelpittetAdjusting tags, seems worth a bump too ;)
Comment #8
tr commentedentity_metadata_verbatim_get()has been deprecated for more than 10 years but still exists as a wrapper aroundentity_property_verbatim_get()so that anyone still calling the old function will actually be running the new function. Drupal's policy on API changes states we shouldn't make an API change between minor point releases, so removingentity_metadata_verbatim_get()entirely during the D7 lifecycle is not an option.The problem is that the replacement function
entity_property_verbatim_get()has two additional required parameters which the wrapper doesn't know about. More modern versions of PHP will complain that the wrapper is callingentity_property_verbatim_get()with the wrong number of parameters, and that is a valid complaint. We want to be able to use Entity API on more modern versions of PHP, and we want to maintain backwards compatibility as much as possible for the many existing sites that might be calling the old deprecated function.The patch does this:
While this DOES provide the correct number of parameters to
entity_property_verbatim_get(), the last two parameters,$typeand$info, are undefined variables so this patch will ALSO generate complaints. Because these are required parameters, I think it's better to pass actual values -NULLinstead of$typeandarray()instead of$info. These are both valid values/types for those parameters, and will not cause any change in operation toentity_property_verbatim_get()orentity_property_verbatim_get().Comment #9
joseph.olstadya, last two params, pass NULL and array() should be ok.
Comment #11
tr commentedCommitted #8.