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.
Logs are filled with this:
Notice: Undefined property: stdClass::$id in data_entity_views_handler_field_edit_link->render() (line 28 of /sites/all/modules/data/data_entity/views/data_entity_views_handler_field_edit_link.inc).
This is coming from http://mysite.com/admin/content/data/view/
Additionally, in the display, the first couple of rows are empty. I double checked my data and I do not have any empty rows, or rows with data missing from any of the columns.
Comments
Comment #1
joachim CreditAttribution: joachim commentedCould you debug the output at that point in the handler class and see why it's not finding that property?
Comment #2
tms8707056 CreditAttribution: tms8707056 commentedI am also receiving a slightly different version of this error message.
Notice: Undefined property: stdClass::$sid in data_entity_views_handler_field_edit_link->render() (line 28 of /Library/WebServer/Documents/beta.mysushiapp.com/sites/all/modules/data/data_entity/views/data_entity_views_handler_field_edit_link.inc).
I can provide the values of the variables in the render function that are available (from debugger). Other than that, I'm not really sure what to troubleshoot for this issue. Would love to help figure this out.
Comment #3
joachim CreditAttribution: joachim commentedCould you check you're on the latest version please? My line 28 of that file is:
Comment #4
tms8707056 CreditAttribution: tms8707056 commentedThe error seems to be resolved with the latest dev release.
Comment #5
joachim CreditAttribution: joachim commentedHurrah!!
Thanks for reporting back.
Comment #6
oddgeir_ CreditAttribution: oddgeir_ commentedHello,
I still get this error message, even after updating to the dev version.
I get one line of error message for each submission in the webform.
Notice: Undefined property: stdClass::$sid in data_entity_views_handler_field_edit_link->render() (line 28 of /sites/all/modules/data/data_entity/views/data_entity_views_handler_field_edit_link.inc).
EDIT: I can't edit this, but it turns out I was just being a stupid one. I did not add relationships in views correct, but after following this guide http://vimeo.com/nodeone/review/18701843/75419fef42 I managed to get it right. I leave this for others like me that aren't skilled enough to figure it out on their own, and hopes for a solution by googling it.
Comment #7
jamesdixon CreditAttribution: jamesdixon commentedThe people who are still getting this error probably have column names that have upper case.
I changed line 25 of data/data_entity/views/data_entity_views_handler_field_edit_link.inc
from:
$base_field = $this->view->base_field;
to:
$base_field = strtolower($this->view->base_field);
And the error went away.
I'd whip up a patch, but I embarassingly haven't learned how with git on drupal.org yet.
Comment #8
jamesdixon CreditAttribution: jamesdixon commentedI also noticed that for tables I created joins on, this error is appearing. The edit link is having a hard time finding the $base_field because instead of it being:
$base_field = "fieldname";
it's actually including the tablename ahead of the field name when there is a join
$base_field = "tablename_fieldname";
I'm not sure how we'd deal with this. Check for joins in the schema, and add the tablename if there is a join?
Comment #8.0
jamesdixon CreditAttribution: jamesdixon commentedRemoved full server path
Comment #9
TheoRichel CreditAttribution: TheoRichel commentedI had this 'Undefined property' notice too but it disappeared after I added 'strtolower' (#7). When I click Edit item in the view I now get an edit form. It however does not contain the data of that record, it is empty. On top is however a reference to the correct item number. But as said: no data.
This is the url when I click edit link of the first record:
http://theorichel.nl/admin/content/data/entity/foodnews/1?destination=admin/content/data/view/foodnews
I do not understand the part after the 1 (?destina....)
I jhave continued this in a new thread: https://www.drupal.org/node/2824573
Comment #10
sankarsvks88 CreditAttribution: sankarsvks88 commentedYes. I did with the Lowercase letter to create ID as id and it worked fine.
Thanks #jamesdixon