[RSS Feed/News] Default template parameters not available in API requests

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
Some API requests render templates, for example, /nodes endpoint renders the content of Page nodes. If these pages happen to use variables otherwise available in templates, e.g. $xf.visitor the variables are not available and may also log an error if a method is called, e.g. $xf.visitor.canStartConversation().

To reproduce the issue create any Page node with the following content:

Code:

Hello {$xf.visitor.user_id}!

The expected outcome is "Hello 0!", the...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom