markeric

Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • in reply to: Fails when certain URLs used for data #90571
    markeric
    Participant

    markw65 said:

    I'm betting you have Adblock (or Adblock Pro) installed…


    You are absolutely right. I disabled Adblock Plus for the page and it works correctly. It makes complete sense now. Thanks for catching that.

    Now I have to keep URL names in mind so they don't get blocked like that.

    It's still odd that visiting the page /advertisers loads correctly, just not the AJAX (JSON) request to the same URL. Interesting.

    I really appreciate your help!

    -Mark E.

    in reply to: Fails when certain URLs used for data #90568
    markeric
    Participant

    Ok. I believe I have a nice reproducible test for demonstrating this. I'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.

    Here is what I did…

    1. Downloaded the “Demo Files (3.6)”. Actually contains 3.5, more on that in a sec (http://www.trirand.com/blog/?page_id=6)
    2. Downloaded the latest 3.6 jqGrid source.
    3. Updated the demo files to have the latest source.
    4. Setup the demo files in my Ubuntu machine in the apache folders, setup the database, verified working.
    5. Copied “server.php” to create “advertisers.php” and “adver.php”. All the internal contents are unchanged.
    6. Modified jsonex.js to change the URL that it fetches the data from.
    7. Ran jqgrid.html in a Firefox browser. Using Firebug to watch Net requests too.
    8. Selected “Loading Data” > JSON Data

    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't show up in the Firebug > Net tab. The grid appears to never finish initializing as there is no “reload” or search icons in the bottom left corner.

    I can zip it all up and email it to someone if needed.

    Thanks,

    -Mark E.

    in reply to: Fails when certain URLs used for data #90564
    markeric
    Participant

    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.

    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.

    Thanks,

    -Mark E.

    in reply to: Fails when certain URLs used for data #90524
    markeric
    Participant

    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…

    […]

    One way to test this is to just type the url into the address bar – if it fails, you know where the problem is…

    Thanks for the suggestion. Unfortunately, that isn't the case here. I'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't be a blocking issue.

    Thanks for sharing that information though.

    -Mark E.

Viewing 4 replies - 1 through 4 (of 4 total)

Stay connected with us in your favorite flavor!