Default template parameters not available in API requests

A

AddonsLab

Guest
Member
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
 
BlackSpigot General Chat
Rules Help Users
    U @ unapatatax: hola ?
    Top