I came along with another issue on Live Agent this morning:
Now when I test the button, it loads the proper page but I came along a new message stating something like: "Chat window can be run only through the button – You do not have direct access to it." I got the code from the default chat window by doing a "code inspection" with Safari because I wanted to keep the translations in polish that Salesforce generated. I just copied it to the custom page I created and off course it doesn't work 🙁
This is the screenshot of the error:
Of course, I did not wanted that Salesforce layout and I guess it's not going to show up when the error will be fixed.
This is the code from the page:
https://drive.google.com/file/d/0BzDrP_xkkm29eUhsMEZiTkFoRXc/view?usp=sharing
This second code works but same layout issue:
https://drive.google.com/file/d/0BzDrP_xkkm29Z2d1NGNtOEFtYWM/view?usp=sharing
Thanks for your help!
Niko.
Best Answer
It seems like you are trying to call the chat window page directly, this is not allowed.
You need to create a custom chat window page as per the instructions in the Live Agent Developer guide, once you have created that page, go to:
Setup > Live Agent > Chat Buttons > Yourbutton (Edit) > Custom Chat Page (Select your new page here) > Save
Then launch the start as usual using the button code.
Sample Page: