<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: Fails when certain URLs used for data</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/fails-when-certain-urls-used-for-data</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/bugs/fails-when-certain-urls-used-for-data/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>markw65 on Fails when certain URLs used for data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/fails-when-certain-urls-used-for-data#p11870</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/fails-when-certain-urls-used-for-data#p11870</guid>
        	        	<description><![CDATA[<blockquote>
<p>It&#39;s still odd that visiting the page /advertisers loads correctly, just not the AJAX (JSON) request to the same URL. Interesting.</p>
</blockquote>
<p>A couple of possibilities...</p>
<p>I /think/ you said that it /did/ get blocked, if you just put "/advert..." in the browser&#39;s address bar, but not when you used the fully qualified url. So perhaps that particular pattern only matches domain-less paths.</p>
</p>
<p>Another possibility is that since its basically trying to block ads on the pages you visit, it may only block xhr and iframe (and perhaps popup) requests.</p>
</p>
<p>But this has made me realize that I need to choose my server-side filenames and paths very carefully - the adblock blacklist that I found had a /huge/ list of things it would block. I should probably install it just to make sure Im not violating any of them...</p>
</p>
<p>Mark</p>
]]></description>
        	        	<pubDate>Thu, 12 Nov 2009 15:44:54 +0200</pubDate>
        </item>
        <item>
        	<title>markeric on Fails when certain URLs used for data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/fails-when-certain-urls-used-for-data#p11817</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/fails-when-certain-urls-used-for-data#p11817</guid>
        	        	<description><![CDATA[<blockquote>
<p>markw65 said:</p>
<p>I&#39;m betting you have Adblock (or Adblock Pro) installed&#8230;</p>
<pre>Mark
</pre>
</blockquote>
<hr />
<p>You are absolutely right. I disabled Adblock Plus for the page and it works correctly. It makes complete sense now. Thanks for catching that.</p>
<p>Now I have to keep URL names in mind so they don&#39;t get blocked like that.</p>
<p>It&#39;s still odd that visiting the page /advertisers loads correctly, just not the AJAX (JSON) request to the same URL. Interesting.</p>
<p>I really appreciate your help!</p>
<p>-Mark E.</p>
]]></description>
        	        	<pubDate>Wed, 11 Nov 2009 17:09:58 +0200</pubDate>
        </item>
        <item>
        	<title>markw65 on Fails when certain URLs used for data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/fails-when-certain-urls-used-for-data#p11816</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/fails-when-certain-urls-used-for-data#p11816</guid>
        	        	<description><![CDATA[<blockquote>
<p>markeric said:</p>
<p>Ok. I believe I have a nice reproducible test for demonstrating this. I&#39;ve tested this running in a Ruby on Rails WEBrick server on Windows and now in Ubuntu Apache (using PHP) and the same problem occurs.</p>
<p>Here is what I did&#8230;</p>
<ol>
<li>Downloaded the &#8220;Demo Files (3.6)&#8221;. Actually contains 3.5, more on that in a sec (<a rel="nofollow" href="http://www.trirand.com/blog/?page_id=6" target="_blank">http://www.trirand.com/blog/?page_id=6</a>)</li>
<li>Downloaded the latest 3.6 jqGrid source. </li>
<li>Updated the demo files to have the latest source.</li>
<li>Setup the demo files in my Ubuntu machine in the apache folders, setup the database, verified working.</li>
<li>Copied &#8220;server.php&#8221; to create &#8220;advertisers.php&#8221; and &#8220;adver.php&#8221;. All the internal contents are unchanged.</li>
<li>Modified jsonex.js to change the URL that it fetches the data from. </li>
<li>Ran jqgrid.html in a Firefox browser. Using Firebug to watch Net requests too.</li>
<li>Selected &#8220;Loading Data&#8221; &#62; JSON Data</li>
</ol>
<p>What I found is that when the grid is pulling data from server.php and adver.php it works correctly. This shows that the adver.php file copy change works too. But when I request from advertisers.php the grid freezes and the request for the page doesn&#39;t show up in the Firebug &#62; Net tab. The grid appears to never finish initializing as there is no &#8220;reload&#8221; or search icons in the bottom left corner.</p>
<p>I can zip it all up and email it to someone if needed.</p>
<p>Thanks,</p>
<p>-Mark E.</p>
</blockquote>
<hr />
<p>I&#39;m betting you have Adblock (or Adblock Pro) installed...</p>
<pre><br />Mark<br /><br /></pre>
]]></description>
        	        	<pubDate>Wed, 11 Nov 2009 17:00:31 +0200</pubDate>
        </item>
        <item>
        	<title>markeric on Fails when certain URLs used for data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/fails-when-certain-urls-used-for-data#p11814</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/fails-when-certain-urls-used-for-data#p11814</guid>
        	        	<description><![CDATA[<p>Ok. I believe I have a nice reproducible test for demonstrating this. I&#39;ve tested this running in a Ruby on Rails WEBrick server on Windows and now in Ubuntu Apache (using PHP) and the same problem occurs.</p>
<p>Here is what I did...</p>
<ol>
<li>Downloaded the "Demo Files (3.6)". Actually contains 3.5, more on that in a sec (<a href="http://www.trirand.com/blog/?page_id=6" rel="nofollow" target="_blank">http://www.trirand.com/blog/?page_id=6</a>)</li>
<li>Downloaded the latest 3.6 jqGrid source. </li>
<li>Updated the demo files to have the latest source.</li>
<li>Setup the demo files in my Ubuntu machine in the apache folders, setup the database, verified working.</li>
<li>Copied "server.php" to create "advertisers.php" and "adver.php". All the internal contents are unchanged.</li>
<li>Modified jsonex.js to change the URL that it fetches the data from. </li>
<li>Ran jqgrid.html in a Firefox browser. Using Firebug to watch Net requests too.</li>
<li>Selected "Loading Data" &#62; JSON Data</li>
</ol>
<p>What I found is that when the grid is pulling data from server.php and adver.php it works correctly. This shows that the adver.php file copy change works too. But when I request from advertisers.php the grid freezes and the request for the page doesn&#39;t show up in the Firebug &#62; Net tab. The grid appears to never finish initializing as there is no "reload" or search icons in the bottom left corner.</p>
<p>I can zip it all up and email it to someone if needed.</p>
<p>Thanks,</p>
<p>-Mark E.</p>
]]></description>
        	        	<pubDate>Wed, 11 Nov 2009 15:34:19 +0200</pubDate>
        </item>
        <item>
        	<title>markeric on Fails when certain URLs used for data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/fails-when-certain-urls-used-for-data#p11808</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/fails-when-certain-urls-used-for-data#p11808</guid>
        	        	<description><![CDATA[<p>Thanks for the suggestion. When I use the "/advertisers" in the URL it never responds. No error and nothing in the log. When I change it to "/dvertisers" (removing the "a"), it returns an error page from the server about missing params. This works the same when I directly enter the url like this "http://localhost:3000/dvertisers.json". When I add some of the expected params it correctly returns the JSON results.</p>
<p>However, using Firebug, I set breakpoints in the javascript on the "complete" and it never completes when the url is "/advertisers". When it is "/dvertisers" or something completely invalid like "/abc" it will at least complete. I have another URL "/markets" that is setup the same way and works correctly.</p>
<p>Thanks,</p>
<p>-Mark E.</p>
]]></description>
        	        	<pubDate>Wed, 11 Nov 2009 14:01:21 +0200</pubDate>
        </item>
        <item>
        	<title>markw65 on Fails when certain URLs used for data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/fails-when-certain-urls-used-for-data#p11803</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/fails-when-certain-urls-used-for-data#p11803</guid>
        	        	<description><![CDATA[<blockquote>
<p>Using Fiddler (on Windows) I can verify that the AJAX request is never made so it can&#39;t be a blocking issue.</p>
</blockquote>
<hr />
<p>I think it /must/ be a blocking issue of some kind - because the url is passed direct to $.ajax, which (I&#39;ve checked the source code) doesnt do any url checking before making the xhr request.</p>
</p>
<p>But if the request isnt even being sent, it would have to be on the client side... could it be your firewall/antispyware/add-blocking software? What browsers have you tried?</p>
</p>
<p>Also, I guess you put a full url into the browser - have you tried doing that for the grid url parameter?</p>
</p>
<p>Mark</p>
]]></description>
        	        	<pubDate>Wed, 11 Nov 2009 10:22:46 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Fails when certain URLs used for data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/fails-when-certain-urls-used-for-data#p11769</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/fails-when-certain-urls-used-for-data#p11769</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Could you please try with pure ajax and see the result. What you set as url is passed in grid (you can see this in the code) in ajax function. I mean:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9159' value='Select Code' data-codeid='sfcode9159' /></p>
<div class='sfcode' id='sfcode9159'>
<p>$.ajax({</p>
<p>url : &#39;/advertisers?nd=&#39;+new Date().getTime(),</p>
<p>dataType: &#39;json&#39;,</p>
<p>complete: function(&#8230;) {</p>
<p>&#8230;</p>
<p>}</p>
<p>});</p>
</p>
</div>
<p>See the result.</p>
<p>Regards</p>
<p>Tony</p></p>
]]></description>
        	        	<pubDate>Wed, 11 Nov 2009 02:39:59 +0200</pubDate>
        </item>
        <item>
        	<title>markeric on Fails when certain URLs used for data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/fails-when-certain-urls-used-for-data#p11753</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/fails-when-certain-urls-used-for-data#p11753</guid>
        	        	<description><![CDATA[<blockquote>
<p>I had a similar issue (with different urls, though). It turned out to be mod_security running on my server. It basically checks the url for certain patterns, and rejects them if they match. I had a long battle with my service provider to get them to drop it&#8230;</p>
<p>[...]</p>
<p>One way to test this is to just type the url into the address bar &#8211; if it fails, you know where the problem is&#8230;</p>
</blockquote>
<p>Thanks for the suggestion. Unfortunately, that isn&#39;t the case here. I&#39;m running it on my local machine against a Rails WEBrick server. There are no errors in the log as the request never gets there. The URL pulls up fine in a browser. I can hand-code the URL for a JSON response and it works. Using Fiddler (on Windows) I can verify that the AJAX request is never made so it can&#39;t be a blocking issue.</p>
<p>Thanks for sharing that information though.</p>
<p>-Mark E.</p>
]]></description>
        	        	<pubDate>Tue, 10 Nov 2009 13:43:07 +0200</pubDate>
        </item>
        <item>
        	<title>markw65 on Fails when certain URLs used for data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/fails-when-certain-urls-used-for-data#p11752</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/fails-when-certain-urls-used-for-data#p11752</guid>
        	        	<description><![CDATA[<p>I had a similar issue (with different urls, though). It turned out to be mod_security running on my server. It basically checks the url for certain patterns, and rejects them if they match. I had a long battle with my service provider to get them to drop it...</p>
</p>
<p>Since Im almost certain there&#39;s nothing on the client side that cares about the url, I&#39;d guess you have the same issue.</p>
</p>
<p>One way to test this is to just type the url into the address bar - if it fails, you know where the problem is...</p>
</p>
<p>Also, if you have access to your server logs, you should be able to find the errors in there...</p>
</p>
<p>Mark</p>
]]></description>
        	        	<pubDate>Tue, 10 Nov 2009 13:31:54 +0200</pubDate>
        </item>
        <item>
        	<title>markeric on Fails when certain URLs used for data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/fails-when-certain-urls-used-for-data#p11746</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/fails-when-certain-urls-used-for-data#p11746</guid>
        	        	<description><![CDATA[<p>I wrote a quick Ruby on Rails application to try out the grid. I had problems getting it to work with a list of "Advertisers". It works with "Markets" and other examples. I kept stripping the code down to find the problem and eventually discovered that a certain URL given for the data fetch causes the problem. The problem shows up as the "Loading..." never leaving, the data is never fetched, the call to hide the toolbar never gets called. And the AJAX call to fetch the data never fires on the server.</p>
<p>Again, changing the URL text with the same code works.</p>
<p>Sample code:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9415' value='Select Code' data-codeid='sfcode9415' /></p>
<div class='sfcode' id='sfcode9415'>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;script type="text/javascript"&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; var lastsel;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery(document).ready(function(){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery("#advertiser-list").jqGrid({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // adding ?nd=&#39;+new Date().getTime() prevent IE caching<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; url:&#39;/advertisers?nd=&#39;+new Date().getTime(),<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; editurl:&#39;&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: "json",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames:[&#39;ID&#39;,&#39;Name&#39;,&#39;Address&#39;,&#39;City&#39;,&#39;State&#39;],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colModel:[{name:&#39;id&#39;, index:&#39;id&#39;,resizable:false,width:35},{name:&#39;name&#39;, index:&#39;name&#39;},{name:&#39;address1&#39;, index:&#39;address1&#39;},{name:&#39;city&#39;, index:&#39;city&#39;},{name:&#39;state&#39;, index:&#39;state&#39;}],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; pager: jQuery(&#39;#advertiser-list_pager&#39;),<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowNum:10,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowList:[10,25,50,100],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; imgpath: &#39;/images/themes/lightness/images&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortname: &#39;id&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; viewrecords: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; toolbar : [true,"top"],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortorder: &#39;asc&#39;,</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; caption: "Advertisers"<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery("#t_advertiser-list").height(25).hide().filterGrid("advertiser-list",{gridModel:true,gridToolbar:true});</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery("#advertiser-list").navGrid(&#39;#advertiser-list_pager&#39;,{edit:false,add:false,del:false,search:false,refresh:true})<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; .navButtonAdd("#advertiser-list_pager",{caption:"Search",title:"Toggle Search",buttonimg:&#39;/images/jqgrid/search.png&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; onClickButton:function(){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if(jQuery("#t_advertiser-list").css("display")=="none") {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; jQuery("#t_advertiser-list").css("display","");<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; } else {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; jQuery("#t_advertiser-list").css("display","none");<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;/script&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;table id="advertiser-list" class="scroll" cellpadding="0" cellspacing="0"&#62;&#60;/table&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;div id="advertiser-list_pager" class="scroll" style="text-align:center;"&#62;&#60;/div&#62;</p>
</p>
</div>
<p>I experimented with the URL and found that it works with "dvertisers" but not "advertisers". I played until I found that "advert" was all that was needed to break it. It doesn&#39;t break with "adver" though.</p>
<p>I really have no idea why this would be. I&#39;m not any javascript guru so I don&#39;t really know how to step in and diagnose it internally.</p>
<p>Any help would be appreciated.</p>
<p>-Mark E.</p>
]]></description>
        	        	<pubDate>Tue, 10 Nov 2009 12:02:50 +0200</pubDate>
        </item>
</channel>
</rss>