Error on SRP when anonymous | Community
Skip to main content

Error on SRP when anonymous

  • October 29, 2024
  • 3 replies
  • 0 views

Chris92

With  {{generative_answers}} added to the SRP, I get this error when not logged in (anonymous).

Uncaught (in promise) Error: Cannot find module './undefined.json'

Any insight as to what is behind this? It works with logged-in users without any errors.

3 replies

Tetiana12
  • October 29, 2024

Hi @chris92! We don't support generative search for anonymous users in the EAP. 


Chris92
  • Author
  • October 29, 2024

Please re-read what I wrote – I know you don't support anonymous.

Why is {{generative_answers}} causing an error when users aren't logged in? Am I the only one that gets this error or are others? I can remove {{generative_answers}} and the error goes away.


Chris92
  • Author
  • October 29, 2024

Here's how I solved it

 

{{#is user.role 'anonymous'}}
               {{! do nothing }}
           {{else}}
                  {{generative_answers}}
           {{/is}}