I have created and used external php functions to be used with the custom fields module for some time now. This time, I created a function and forgot the php code "include('myarray.php')". When I saved or updated my view, I got the error message below. I have been able to trace the code to the following function in views_customfield_handler_field_phpcode.inc.
Here is the function:
function eval_phpcode($code, &$static, $data) {
ob_start();
print eval('?>'. $code); -----> if I remove this line, I can get the site to work but the custom field doesn't work
return ob_get_clean();
}
return ob_get_clean();
}
I have been looking at the database for the place where the phpcode is stored but I have not been able to locate the tables. Can you help me by identifying the table(s) this module uses to store the php code for the view. I am hoping to remove the function from the database table.
Fatal error: Call to undefined function format_event_date() in blablabla/sites/all/modules/views_customfield/includes/views_customfield_handler_field_phpcode.inc(116) : eval()'d code on line 2
Comments
Comment #1
casey commentedviews_view.view_php or views_display.display_options (BLOB fields).
But I don't get it, can't you just remove the field using the views ui?
Comment #2
gwlangie commentedIt killed the website. Even the home page would not load. The View was a block included in the entire site so that may have had a lot to do with it killing the entire site.
I knew the name of the function so I ended up using str_replace to remove the function from $code. After that, I added my include and solved the problem.
Comment #3
casey commented