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.
I will refer to the screenshots provided.
1. shows the code i used on the Value and Output fields
2. shows the options on the VBO page
3. shows the rendered Output fields
and 4 shows the Value field is empty
Comments
Comment #1
webservant316 CreditAttribution: webservant316 commentedI think you forgot to upload your screen shots.
I am having the same problem. The $value field is empty after a return from the value code.
Help!
Comment #2
webservant316 CreditAttribution: webservant316 commentedNot only is the $value empty when referenced in the output code, but $row->php is also empty when referenced from a second php field in either the value or output code. I can reference $data->nid, I think. The only variable that seems to receive an assignment is $static.
This module appears to be broken.
Here is the value code for my first php field
return node_access( 'view', node_load( $data->nid ) );
Here is the output code for my first php field
<?php echo "value=" . $value; ?>
Here is the output code for my second php field
<?php echo "value=" . $row->php; ?>
With this code the display for my first and second php field is an empty 'value='.
Comment #3
webservant316 CreditAttribution: webservant316 commentedok, so it seems that assignments are not properly made to row->php so I just put all my code in the output code section and it works that way.
Comment #4
webservant316 CreditAttribution: webservant316 commentedI got view_php to work in part, but in the end back pedaled to views_customfield to get what I needed.
Comment #5
Liam MorlandDrupal 6 is no longer supported. If this applies to a later version, please re-open and update the version.