Would it be possible to have a setting somewhere that keeps CCK from evaluating the "Default value PHP code" and "Allowed values PHP code" when editing a field?
If the user (ie, me) makes a mistake in one of those two fields and saves the change, if the mistake is bad enough, you can no longer edit the field. This generally seems to happen to me around PHP code that includes db calls, but the mistake can be very minor. The error logs shows:
Notice: Undefined index: args in DatabaseLog->findCaller() (line 154 of /opt/lampp/htdocs/includes/database/log.inc).
The only way to resolve the issue is to delete the field and start from scratch.
I understand the caveat emptor nature of using these fields, but even the best developers are going to make mistakes on occasion. I also understand that the code is being called to show a preview of what the output will look like.
However, I think having some way to get back into the field without having to delete it would save a ton of time.
Comments
Comment #1
salvisThe D8 core patch in #1739808-2: Notice: Undefined index: file in Drupal\Core\Database\Log->findCaller() may need to be ported to D7 to fix this notice, once it's accepted into D8.
Comment #2
salvisIf you have any interest in getting this fixed in D7 core then please review/test the D7 patch at #1739808-24: Notice: Undefined index: file in Drupal\Core\Database\Log->findCaller().
Comment #3
jmoyles commentedOn it