XF 2.2 AJAX functionality isn't working (HTML response instead of JSON?)


New member
Currently I am watching the video series "Building with XenForo 2"
The videos are really well done and easy to follow. However, I now have a problem. The things that have to do with AJAX requests don't work.
Specifically, for me it's adding notes or opening the note editor in the overlay. For both actions I get "Oops! We ran into some problems.".
The response to the AJAX requests is HTML (with no indication of errors). Is it possible that the response to the requests should actually be JSON?
The AJAX requests themselves all seem to work fine. Only the response to them is HTML and the result is an error message.

Does anyone have any idea what could be the cause of this? I have the feeling that I have forgotten a little detail somewhere.
I'll be happy to post more details as well. However, I am not quite sure what could be useful to solve the problem.
I have found my mistake. I had accidentally imported "XF\Api\Controller\AbstractController" instead of "XF\Pub\Controller\AbstractController".
Top Bottom