<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Techy Things &#187; ajax</title>
	<atom:link href="http://tech.yipp.ca/category/ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech.yipp.ca</link>
	<description>Just another Yipp.ca Blogs site</description>
	<lastBuildDate>Thu, 01 May 2025 18:06:28 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.38</generator>
	<item>
		<title>Debug backbone collection fetch fails with no models loaded</title>
		<link>http://tech.yipp.ca/ajax/debug-backbone-collection-fetch-fails-models-loaded/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=debug-backbone-collection-fetch-fails-models-loaded</link>
		<comments>http://tech.yipp.ca/ajax/debug-backbone-collection-fetch-fails-models-loaded/#comments</comments>
		<pubDate>Tue, 03 Mar 2015 17:07:55 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[backbone]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=1562</guid>
		<description><![CDATA[<p>This situation happened to be from time to time over the last few years and I still struggle with it every time so I decided to write down my troubleshooting steps and solutions &#160;&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="http://tech.yipp.ca/ajax/debug-backbone-collection-fetch-fails-models-loaded/">Debug backbone collection fetch fails with no models loaded</a> appeared first on <a rel="nofollow" href="http://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>This situation happened to be from time to time over the last few years and I still struggle with it every time so I decided to write down my troubleshooting steps and solutions</p>
<p>&nbsp;</p>
<p>Step 1 - See what is the HTTP error code. If it is not 200 or 2XX, then you know already what is wrong, the answer should be a HTTP success code.</p>
<p>Step 2 - If your HTTP response code is success but you still get no data loaded, make sure you have a error handler to your fetch() function. Like this :</p>
<p>&nbsp;</p>
<p>Step 3 - Make sure your Content-Type matches your jquery response handling. For example Content-Type: application/json would result in jquery automatically parsing the request. If your Content-Type is text/plain, then you are responsible for parsing the JSON. If your Content-Type is applicaton/json, make sure you dont get a "parsererror".</p>
<p>Step 4 - Verify that your JSON returned has a valid syntax. This could result in a silent error. One method is to paste your json in a JSON validator like http://jsonlint.com. Another way to verify is to put a breakpoint at</p>
<p><strong>jquery.js </strong><br />
ajax: function( url, options ) {<br />
(...)<br />
isSuccess = ajaxConvert( s, response );<br />
statusText = isSuccess.state;</p>
<p>An invalid JSON syntax would result in isSuccess being set to false.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="http://tech.yipp.ca/ajax/debug-backbone-collection-fetch-fails-models-loaded/">Debug backbone collection fetch fails with no models loaded</a> appeared first on <a rel="nofollow" href="http://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.yipp.ca/ajax/debug-backbone-collection-fetch-fails-models-loaded/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
