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.
Hello,
when I save the view I become the following error message:
Notice: Undefined property: stdClass::$views_php_4 in views_php_handler_field->render() (line 223 of /www/htdocs/xxx/wer/sites/all/modules/views_php/plugins/views/views_php_handler_field.inc).
can you help me to solve this? I use the latest dev version from february.
kind regards
André
Comments
Comment #1
bharata CreditAttribution: bharata commentedAny resolution for this André?
I get the same error when I have any php entered in the field. Except that my error says "views_php_2" instead of 4...
Thanks!
Comment #2
bharata CreditAttribution: bharata commentedMy problem was that I was entering the php code into the wrong field.
Try scrolling down to enter your code into the SECOND FIELD... Remember to use php tags there too.
Good luck!!
Comment #3
DevDaveUK CreditAttribution: DevDaveUK commentedConfirm @bharata comments. My error was caused by having PHP code in the value field rather than the Output field. This was partly due to a work around for a different bug. The Value box was used to access the Value of Variables such as $row->myCustomField. However this would keep returning the nid/id and not the actual value so using $data-> and drilling down to the value and assigning it to a PHP variable was causing an error until this task was moved to the output box leaving Value box blank.
Comment #4
fizk CreditAttribution: fizk commented