When I create a post, WP autosaves the post right after the title was set.
Unfortunately it doesnt use WP_Ajax_Response for the response, since it doesnt return text/xml!
“Normal” autosave each minute works good. Only the first autosave after entering the title the first time, seems to use another autosave function?!
The problem is, that my free hosting provider adds an advertising code to html files .. means, the webserver appends the ad-code to everything what is sent as text/html. So it does to the autosave response from the “enter-title-first-time-autosave”.
The resulting html for the page is destroyed. Parts of my hosters ad-codes were written to the forms hidden field for _wpnonce and to the preview link. I cant save the new post anymore. It ends up in an error: “Your attempt to edit this post: “test” has failed.”
Please, can you tell me, where to change the codes, that it gives a response as text/xml?
A lot of free hosters use a technology to append ad-codes to the final HTML pages. In that case, the result is always messed up by the ad-codes, when an AJAX script returns text/html.
- The topic ‘First time autosave Ajax problem, Developer Question’ is closed to new replies.