New permissive custom field scrubbing code breaks text custom fields?

The “Scrub permissively for non-ticket related custom field values” change in RT 5.0.4 seems to have broken Text custom fields for us: Any text custom field with data in it now throws [error]: RT::ObjectCustomFieldValue::_ContentIsPermissive Unimplemented in HTML::Mason::Commands. (/opt/rt/share/html/Elements/ShowCustomFieldText line 50)

Looks like we’re supposed to be getting _ContentIsPermissive from RT’s CustomField object but for some reason $Object ain’t that when the elements execute.

I quick-and-dirty fixed this by having the CustomFieldText elements just do Permissive => 1 instead of checking $Object->_ContentIsPermissive but is anyone else seeing the same behavior?

We haven’t gotten any reports of this that I’m aware of. Do you have any extensions installed that might interact with custom fields? I would expect $Object to be an RT::CustomField, not RT::ObjectCustomFieldValue, so that’s one clue.

AHA! It didn’t click until you mentioned that it’s not the underlying object you’d expect to see, but indeed we do! It’s not an extension but an overridden version of ObjectCustomFieldValue.pm (adding a CustomRaw placeholder for unescaped field data in template URLs).

The script that patches that on upgrade didn’t fire so we had the 5.0.3 file hanging around causing breakage.
Script fixed, file patched, problem solved! (And at some point I have to fix this into an overlay so it stays solved…)