Fixed $thread.getTypeHandler() might not return correct handler

Kirby

Well-known member
Affected version
2.3.0
When calling $thread.getTypeHandler() from template thread_type_fields_article the returned handler might not be ArticleHandler but the default handler of the forum (if the forum allows multiple types).

This is pretty confusing and also unfortunate if specific handler methods need to be accessed.

One possible solution could be to pass $this as handler to the template so it can be accessed without calling getHandler().
Another approach could be to make sure the thread actually has discussion_type article before rendering the tempate.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.1).

Change log:
Pass handler in params when rendering thread edit extra data templates
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom