Pass ThreadFieldValue entity to BB-Code PHP callback when it called from Custom Fields

Painbaker

Well-known member
As described here in "BB-Code PHP callback not contain entity tag option when called from custom fields" thread, $options['entity'] value is empty, when it called from Custom Fields. But is assumed that there should be related to rendarable content entity.

This behavior unexpected for my add-on and it seems to solve this problem i need to override XF\CustomField\Definition::getFormattedValue($value) method (and others, because that also not contain ThreadFieldValue entity 😭 ) and create potential area of incompatibility with other add-ons which also will try to to pass entity to BB-Code PHP callback.

I hope this will be solved on XF side to avoid these hacks and for more compatibility...
 
Last edited:
Upvote 2
Top