Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In the same test as #1049072: Lack of faces.inc in test enviroment I'm getting also this error afterwards
Fatal error: Call to undefined function entity_get_property_info() in sites/all/modules/entity/includes/entity.wrapper.inc on line 550
I've tried to solve it the same way as the other, including the entity.property.inc in the info file:
files[] = includes/entity.property.inc
But it keeps failing
Comment | File | Size | Author |
---|---|---|---|
#37 | error-entity_get_property_info-1049104-37.patch | 360 bytes | mirondi |
#34 | mystery.undefined.entity.patch | 460 bytes | Oliver Huynh |
#29 | issue 1049104 fatal error entity_get_property_info undefined.jpg | 83.76 KB | texas-bronius |
#14 | Entity Drupal Issue 1049104.pdf | 98.35 KB | kenorb |
Comments
Comment #1
pcambraThis was an unrelated problem.
Comment #2
mikeryan@pcambra - can you explain what the unrelated problem was? I've been having similar issues with FacesExtendable, and now I'm getting the entity_get_property_info() error, so I seem to be going down the same road you did...
Thanks.
Comment #3
Liliplanet CreditAttribution: Liliplanet commentedsubscribe thx!
had the FacesExtendable and now site unavailable with Fatal error: Call to undefined function profile2_type_access() in /home/public_html/sites/all/modules/entity/entity.module on line 418
looking forward to any reply and thank you.
somehow go fixed by disabling rules, privatemsg, profile2 and entity in phpmyadmin.
Comment #4
fagothis should be fixed with the recent rules module, please re-open if problems persist.
Comment #6
dernetzjaeger CreditAttribution: dernetzjaeger commentedI have the same message.
Fatal error: Call to undefined function entity_get_property_info() in sites/all/modules/entity/includes/entity.wrapper.inc on line 595
When running the following PHP- Code:
Comment #7
pcambraHave you tried $profileid = $order_wrapper->commerce_customer_billing->value();?
Comment #8
Ogredude CreditAttribution: Ogredude commentedI'm having the same issue.
Note that this error happens ONLY within a Simpletest test case, and ONLY when the Rule in question has a "page redirect" action on it.
With the page redirect in place, I can have the rule fire and everything behaves properly. When Simpletest runs, it fails the redirect assertion, and the verbatim includes this error message.
When I remove the page redirect, the error goes away (but of course the redirect assertion still fails)
Using the 7.x-2.x-dev version of Rules and 7.x-1.x-dev version of Entity API.
Comment #9
fago> 0.0082 2265440 6. variable_initialize() /Users/ogredude/Sites/myproj.dev/includes/bootstrap.inc:2328
You've somehow stored a drupal wrapper in your variables what is the cause of this. Please try updating rules to the latest dev version, and re-open for rules if that doesn't help.
Comment #11
mojzis CreditAttribution: mojzis commentedI am afraid this still is a problem, i just happened to run in a similar situation :
in a form_submit i created an entity, wrapped it and assigned some values to it.
then i did dpm($entity).
Since the form in question is set to redirect , on the next page i ended up with a
Fatal error: Call to undefined function entity_get_property_info()
the only way was to truncate table sessions (otherwise i was getting this on every page while logged as this user)
its probably stupid to dpm entity before redirect (i dont understand if it should work or not) , but the outcome was rather painful :).
I understand there is quite a few modules connected in this and dont know if this is the right queue, but i think it should be better to solve it ?
thanks anyway, entities are great fun :)
modules involved :
entity 7.x-1.0-rc1+46-dev
eck 7.x-2.0-alpha1+23-dev
devel 7.x-1.2
Comment #12
JurriaanRoelofs CreditAttribution: JurriaanRoelofs commentedI had the same thing as mojzis, getting fatal error on every page. If he didn't tell about the session table trick I would probably be at loss.
Trouble was started by dsm() on a wrapped order in hook_commerce_checkout_complete
Comment #13
kenorb CreditAttribution: kenorb commentedThe same here.
This error happened when writing the test with Simpletest.
Comment #14
kenorb CreditAttribution: kenorb commentedSee the attachment for error with backtrace.
I'm not sure which module/code written Entity Wrapper into cache, not mine.
In my case this happens somewhere between the following code using Simpletest test:
when testing multipage CTools form.
Comment #15
jeremymcminn CreditAttribution: jeremymcminn commentedI am getting the same error
PHP Fatal error: Call to undefined function entity_get_property_info() in /var/www/vhosts/verdureapp.com/httpdocs/sites/all/modules/entity/includes/entity.wrapper.inc on line 596
This occurred when I created a new domain (Domain Access) and user through a rules based on a new node creation. I have deleted all nodes, domains and user via PHPMyadmin but still cant seem to login back into my site, that is the error 500 i get. I can view any page as long as I am not logged in.
Any help to get back into my site would be appreciated!!!
Comment #16
mojzis CreditAttribution: mojzis commented@jonnyfiasco : truncate table sessions
Comment #17
jeremymcminn CreditAttribution: jeremymcminn commentedYes I had already tried that, emptied cache tables, sessions, cleared my browser. Nothing was working so I ended up restoring a backup.
Comment #18
elnico CreditAttribution: elnico commentedHad the same problem and as #9 said I had stored a drupal wrapper into the variables table. I just cleared the variable and worked again.
Comment #19
mitchell CreditAttribution: mitchell commentedSee also #1714372: entity_get_property_info('site') has a bug and #1713644: entity_get_property_info does not support hook_field_extra_fields very well.
Comment #20
j0rd CreditAttribution: j0rd commentedSame problem.
I ran into mine after saving an entity in a custom form. Something was most likely not set correctly, and then either rules or the rules which create my messages are messed up.
Had to log out, then log back in to solve the problem.
Could also be due to a dpm.
Comment #21
jamix CreditAttribution: jamix commentedIn my case, the cause of the problem was also an instance of the
EntityDrupalWrapper
class serialized in thevariable
database table. Here are the SQL commands I used to find the offending variable and remove it:My site is now back up.
Comment #22
jdleonarddrupal_test_email_collector was the culprit for me too. It's used by the TestingMailSystem that ships with Drupal core. For me, it looks like something got serialized there as part of using the Message (or Message Notify) modules. Clearing that variable and setting the mail_system variable to something other than TestingMailSystem solved the problem and kept it from coming back.
Comment #22.0
jdleonardfixing end tag
Comment #23
vijaycs85This issue definitely present and occurring for certain situation. here is my error trace.
Comment #24
rjacobs CreditAttribution: rjacobs commentedI'm thankful for this thread, as without it we would have burned many hours on this very very non-intuitive issue. The root cause for us was also the drupal_test_email_collector variable. That variable's value did not contain the specific string referenced in #21 ("EntityDrupalWrapper"), but clearing it still resolved this problem immediately. I suppose this means that the TestingMailSystem class is somehow incompatible with entity-based message data that we are processing (via message_notify and message_subscribe modules). I'm wondering if this means a specific issue needs to be raised elsewhere, such are core? Honestly, I've not yet wrapped my head around all the specifics of how this problem is being triggered, but it will be nice to ensure it cannot resurface.
Comment #25
guy_schneerson CreditAttribution: guy_schneerson commentedHad the same problem on a site and got the error on every page on the site.
#21 didn't work for me (no records returned)
I ended up adding the following lines of code just above the call to the entity_get_property_info in entity.wrapper.inc protected function setUp() (595 on my version).
This allowed me to refresh the page, once I got the page back I removed the extra lines and the problem disappeared
Comment #26
dkane CreditAttribution: dkane commentedThanks Jamix! You saved my bacon. I have learned my lesson, I will no longer use the drupal testing mail system!
Comment #27
arthur_drupal CreditAttribution: arthur_drupal commentedThanks Jamix ! You saved my problem to ! In my case, this happened when i used variale_set instead of variable_set so it caused a fatal error (that is normal) but when i corrected to variable_set, i had still the 500, "Call to undefined function".
I think this is caused by Rules only because this happened when i install the module and when a 500 occured during a Rules processing.
Comment #28
texas-bronius CreditAttribution: texas-bronius commentedGood leads here, folks, thanks! My experience appears to have come from a session-stored custom object whose properties I changed while developing. At least that's what I suspect.. Anyhow, manually deleting the test user's session from sessions (drush sqlq "truncate sessions;") seems to have done the trick.
@jamix' comment explained why variables (and $_SESSION variables) would be affected by this for whatever root cause: the Entity API relies on its __sleep() and __wake() magic methods which are invoked at serialize()/unserialize() (which are used when Drupal stores objects in the db for variables and sessions).
I don't entirely get why the cause, but I feel good about why the fix :) And in my case, at least, it was temporary, due entirely to session-stored entity-wrapping custom objects stored in $_SESSION and nothing to do with Entity API or testing.
Comment #29
texas-bronius CreditAttribution: texas-bronius commentedI was a bit hasty in closing the issue having seen two independent cases, each with its own workaround and the linked issue also marked as closed. However, it's fitting enough to consider that it might be a bug that waking from session breaks in this manner:
When an object having:
and the entiy_metadata_wrapper $data variable ($run_as_uid here) is NULL, and an instance is stored in a $_SESSION variable, then on all subsequent page loads (when bootstrap conjures up session variables as part of the things it does), Entity API::__wakeup() -> EntityDrupalWrapper::setUp() -> entity_get_property_info() fails. Normally, passing a NULL is not an issue, and the thing just loads an empty entity metadata wrapper.
The fix, in this case, turns out to be to test for NULL for the variable:
and I first manually delete the borked session from the sessions table in order to successfully complete bootstrap.
Hope this helps.. Maybe it's not a bug but something on my end..?
Comment #30
a.kovrigin CreditAttribution: a.kovrigin commentedThanks texas-bronius, «truncate sessions» from #28 worked for me!
Comment #31
alex.skrypnykFor those of us who encountered this problem while running Simpletest tests (or any other kind of tests that rely on mail collector) for email sent via Rules: this problem is related to the fact that Rules populates $message['params']['context']['action'] and $message['params']['context']['state'] with objects that trigger serialization after being stored to the DB (into mail collector variable) and then read from the database by variable_get().
The solution is to unset these parameters in your hook_mail_alter(), but only when tests are running.
Comment #32
Oliver Huynh CreditAttribution: Oliver Huynh as a volunteer and at Jufist commented8 years passed but this mystery bug is still happening. I've used the latest versions of entity and rules. I also tried using latest dev versions of these modules but the issue is still.
This is just a dirty fix but this will solve the issue right away.
Comment #34
Oliver Huynh CreditAttribution: Oliver Huynh as a volunteer and at Jufist commentedComment #36
kerasai CreditAttribution: kerasai as a volunteer commentedSimilar to #31, for emails sent by via messages unset the following data to avoid serializing these breaking entities into the test email system collector variable.
Comment #37
mirondi CreditAttribution: mirondi commentedCorrect patch to execute from the module root directory
Comment #38
ravi.shankar CreditAttribution: ravi.shankar at OpenSense Labs commented