Skip to main content
Topic: Scripts not working? (Read 1757 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Scripts not working?

(Hi, sick of me yet? :P) So some update I did somewhere seems to have broken some of the scripts on the site. The CAPTCHA isn't working, nor is the quick edit on posts. When clicking "mark all read" on the forum index it marks them read and leaves the little banner at the top that we have to manually close. I'm not sure what the source of this would be so that I can look into it and verify that everything is as it should be. It appears to me, that there must be something going on with the index.template.php file to cause this - am I assuming correctly? Is this the sort of thing I can post here and have someone review for me?

Re: Scripts not working?

Reply #1

Quote from: MangeCur – So some update I did somewhere seems to have broken some of the scripts on the site.
Since guessing is a waste of time, without knowing what you have changed I can only say that from the behaviour you described, it seems the xml responses are broken due to something sent out along with the xml.
Inspect the responses to the requests and see if you can get more details.
Bugs creator.
Features destroyer.
Template killer.

Re: Scripts not working?

Reply #2

I'd bet emanuele is right about that. 

All of those actions work via Ajax which communicate back and forth to the server with XML responses (well for the most part) ... if any extra data (template output like an error or debug line) is output then the response will fail and nothing will work.

You will need to look at your browser console to see what error is being returned in the response.  In chrome for example you open the developer tools (F12) then select Network at the top, then XHR in the menu below that.  Perform the action you want, like quick edit.  You will see two requests in the window, the outbound and return.  Select the return one, and expand it to see what is in it.

Re: Scripts not working?

Reply #3

Hi there! Sorry I've been super busy this last week. There was an errant character in index.template.php that had to be removed and everything is functioning normally now. I found it while I was updating the affiliate websites in the footer. Thank you for your help!