• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Replicating the Inbox & Alerts ajax call


Active member
This one really has me pulling out my hair and any help is *GREATLY* appreciated!


I am attempting to replicate the Xenforo functionality of the inbox & alerts ajax when you hover over these items in the top navbar on the right hand side.

My goal is to use this behavior in my CMS so my users will be able to use the same functionality on the cms as in the forum.

I have copied the source html to a new page and verified the ajax calls still work.

I then pared down all the non-essential html code in this test html file and then ensured the ajax calls still work.

Then I duplicated this behavior in my CMS, using the correct variables such as user_id, time, day of week, time at midnight, & csrf_token from Xenforo.

My new implementation does not work and give the following error:

The following error occurred:
Security error occurred. Please press back, refresh the page, and try again.

To help debug I copied my cms generated output and the output of the test html I created (that does work) and the only difference is the csrf_token. (I'm assuming this is different on each call).

To further help debug I copied the exact csrf_token from the forum and used that to generate the CMS code and I still get the same error (but at least the csrf_token has been eliminated).

What else could I be missing?