Hi,

Recently the search result does not display the results anymore.... Instead it displays the landing page of the Google CSE. Please see attached image for reference.

Thanks a lot.

Regards...

CommentFileSizeAuthor
#13 5.x_cse.diff551 byteswarmnoise
google_cse.jpg80.94 KBjohnrosswvsu

Comments

alexkb’s picture

I'm also having the same issue with a site we maintain, johnross.c.

When you submit your search via the second search box that gets displayed, it seems to work ok - but the URL of the page doesn't change, so it looks like its using javascript to get the results back from google.

Does anyone know if these changes have effected normal google custom search engine website integrations or just the google_cse module implementation.

Thanks.

mfb’s picture

It looks like Google Custom Search stopped accepting the "query" parameter as a substitute for the "q" parameter (the "q" parameter is already used by Drupal and therefore not compatible). Unless someone comes up with a workaround, you'll just have to complain to Google about this.. I don't have any solution yet.

Cornell Jake’s picture

Version: 5.x-1.6 » 6.x-1.2

I have also the same issue, thinking Google is stopping to support the query parameter..
Also in 6.x - 1.2

comrad’s picture

Same problem here, stopped working and shows the welcome page instead (Module-Version 6.x-1.2).

RJW1975’s picture

same problem here, it was all working perfectly. I only noticed it today but it seems to be affecting various sites based on Drupal that I know of. Why does Google have to change things :o(, would be great if anyone knows a workaround for this as naturally for many people I can imagine this is going to cause them pain.

Will be contacting google to see what's happening but don't expect to get very far...

chadd’s picture

same issue here.
quite annoying that they would change this basic functionality without any notice (at least i can't find any).

hopefully someone finds a workaround because this is the worst possible time for our site search to be down as we just launched a new drupal site 2 days ago, so the search was being used heavily to find content...

warmnoise’s picture

Also seeing this issue. Just to clarify on this issue a bit, it is occurring when the results are displayed through JS overlay on the site. Parameter carries through correctly when set to display the results on google's site.

Same behavior on 5.x-1.6

dakku’s picture

subscribing ++

pdrake’s picture

The fix for this is to add the following in google_cse_results.tpl.php:

var googleSearchQueryString = 'query';

Patch:

@@ -22,6 +22,7 @@
     var googleSearchFrameborder = 0;
     var googleSearchDomain = Drupal.settings.googleCSE.domain;
     var googleSearchPath = '/cse';
+    var googleSearchQueryString = 'query';
   //]]>
 </script>
paoloteo’s picture

Version: 6.x-1.2 » 5.x-1.6

Confirming same issue on 5.x-1.6

chadd’s picture

Version: 5.x-1.6 » 6.x-1.2

@pdrake: that worked, thanks!

jrbeeman’s picture

I'm using an older version of the 5.x module, but was able to fix the issue by adding:

var googleSearchQueryString = "query";

to roughly line 237 of google_cse.module, at the end of the CDATA block.

warmnoise’s picture

StatusFileSize
new551 bytes

Pdrake is right on the money here. It was the missing queryString. Here's the same patch for the 5.x version. google_cse.module is affected.

ronald_istos’s picture

can confirm that this works

RJW1975’s picture

nice one pdrake, you are the greatest :o), works like a charm, many many thanks

mfb’s picture

Status: Active » Fixed

fixed in CVS

alexis’s picture

Thanks jrbeeman(#12), that line fixed our problem in Drupal 5.x.

LindsayC-1’s picture

If you were previously using the as_q work around, you can use the same line of code mentioned here, but define the query string as "as_q" instead of "query." See below:

var googleSearchQueryString = "as_q";

alexkb’s picture

Did google fix things already? I haven't had to apply pdrake's changes yet, and its started working as expected again. Thank's anyway though!

comrad’s picture

Working!! :-D

johnrosswvsu’s picture

It works..... YAY!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.