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.
when i install this module and refresh the homepage,then give me the message:
Fatal error: Call to a member function entityType() on a non-object in /sites/all/modules/eck/eck.entity.inc on line 348
version = "7.x-2.0-rc3+15-dev"
the code:
// Property Widget Handling through property_info by entity api.
$property_info = entity_get_property_info($entity->entityType());
$properties = array();
$found_widget = FALSE;
foreach ($property_info['properties'] as $pname => $pi) {
if (array_key_exists('widget', $pi)) {
$widget_callback = $pi['widget'];
$widget = $widget_callback($entity);
$properties[$pname] = $widget_callback;
$form[$pname] = $widget_callback($entity);
$found_widget = TRUE;
}
}
but the backend of the site is narmal.her are some screnshorts.
Comment | File | Size | Author |
---|---|---|---|
wuhanyouthpalace.drupal.test.com_.png | 913.53 KB | Jochen.Zhang |
Comments
Comment #1
Jochen.Zhang CreditAttribution: Jochen.Zhang commentedif i modify the code in /sites/all/modules/eck/eck.entity.inc on line 341,i add "&" before the $entity.
function eck__entity__form($form, &$form_state, &$entity) {
and the is give me the error:
Comment #2
fmizzell CreditAttribution: fmizzell commentedI have not seen this error before.. I am not sure when entityType() was introduced in the entity module, but I would first check your version of the entity module to make sure it is up to date.
Comment #3
mrsinguyen CreditAttribution: mrsinguyen commentedI tested on ECK 7.x-2.0-rc7, got error below:
PHP version PHP Version 5.5.20
Comment #4
fmizzell CreditAttribution: fmizzell commented@mrsinguyen, can you give a little more context on what you were doing when the error came up?
Comment #5
eric.napier CreditAttribution: eric.napier at CivicActions commentedIs this still an issue? Can someone provide steps for reproducing this issue with a clean install of Drupal 7 and eck 7.x-2.x-dev? I have tried but cannot reproduce the issue, will need more info.
Comment #6
Kristen PolClosing this since there has been no activity in many years. Please re-open if it's still relevant.