ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Google Custom Search (using iframe version) returns invalid URI

February 28, 2010 8:13pm

Subscribe [3]
  • #1 / Feb 28, 2010 8:13pm

    Tony Oravet

    6 posts

    This question may be related to a resolved thread.

    I am trying to use the Google Custom Search tool (iframe version) and I keep getting an Invalid URI error when it tries to go to the results page. Anyone else having this issue?

    I noticed where the above topic had something to do with an NB:1, which I am not aware of, but I didn’t have that in my code to begin with, so I am hoping someone can help.

    Could it be something to do with the way that EE writes URL’s? Or could it be something that EE is blocking?

    Moved to HowTo by Moderator

  • #2 / Mar 01, 2010 2:21am

    John Henry Donovan

    12339 posts

    Tony,

    What version and build of EE are you using?
    Are you using a htaccess to remove index.php?
    Can you show us the code you used?

  • #3 / Mar 01, 2010 10:28am

    Tony Oravet

    6 posts

    John,

    Thanks for the reply. The client is using version 1.6.0 and we are not using a htaccess to remove index.php at this time. The code I am using is

    SEARCH BAR CODE

    <!-- Google CSE Search Box Begins  -->
    <!-- Use of this code assumes agreement with the Google Custom Search Terms of Service. -->
    <!-- The terms of service are available at <a href="http://www.google.com/cse/docs/tos.html">http://www.google.com/cse/docs/tos.html</a> -->
    <form id="cref_iframe" action="http://www.maggiesstationery.com/index.php?/site/searchResults/">
      <input type="hidden" name="cref" value="http://www.maggiesstationery.com/cse.xml" />
      <input type="hidden" name="cof" value="FORID:9;NB:1" />
      <input type="text" name="q" size="30" />
      <input type="submit" name="sa" value="Search" />
    </form>
    [removed][removed]
    <!-- Google CSE Search Box Ends -->
    
    
    RESULTS PAGE
    <div id="cse-search-results"></div>
    [removed]
      var googleSearchIframeName = "cse-search-results";
      var googleSearchFormName = "cse-search-box";
      var googleSearchFrameWidth = 600;
      var googleSearchDomain = "www.google.com";
      var googleSearchPath = "/cse";
    [removed]
    [removed][removed]

    Hope the source will show up in this forum for ya.

    Thanks for any help you may be able to give. I am thinking that it might be hanging on the index.php? part of the URL so if you could provide some help on what the htaccess should look like for this situation, that would be great!

    Tony

  • #4 / Mar 01, 2010 10:35am

    Sue Crocker

    26054 posts

    Hi, Tony. We don’t provide direct support for the removal of index.php? from the url. There are plenty of threads in the HowTo forum and in the Wiki that do.

    Moving to HowTo for additional community support.

    Gentle reminder, you might want to consider upgrading to 1.6.8, there have been a number of fixes since 1.6.0.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases