Hi,

Very useful module! Are they any plans for upgrade for D7 ?

CommentFileSizeAuthor
#3 googleajaxsearch-7.x-1.1.zip110.02 KBsidharthap

Comments

basicmagic.net’s picture

subscribe

kaztur’s picture

subsc

sidharthap’s picture

StatusFileSize
new110.02 KB

Here i am attaching the D7 version of the module. Please post me for any issue. I am happy to help.
Enjoy..........

mac_perlinski’s picture

Hello there,

well we thought people switched to Drupal <-> Solr solution and the need for update to D7 is not really needed.
If there is no issue for @sidharthap port of D7 we can attach it as D7 version.

sidharthap’s picture

yes please.

kaztur’s picture

Issue summary: View changes

@sidharthap, great thank You for 7-x version!

I have an error in my dblog after hosting changed:
Warning: Illegal string offset 'keywords' in gas_add_settings() (line 524 in /sites/all/modules/googleajaxsearch/googleajaxsearch.inc).

Line 524 and it's nearest lines are below:

 foreach ($settings['gas'] as $key => $value) {
    $settings['gas']['current_block'] = $delta;
    $settings['gas'][$key]['keywords'] = gas_get_plugin_keywords($key);
  }
  drupal_add_js($settings, 'setting');
}
sidharthap’s picture

Thank you @kaztur for using this module.
I suspect your PHP version is changed after changing the hosting.
Please remove line no 524 from (sites/all/modules/googleajaxsearch/googleajaxsearch.inc) and add below two lines there.
$keywords = gas_get_plugin_keywords($key);
$settings['gas'][$key] = array('keywords' => $keywords);

Please keep posted if I can help you further.

Thank You

kaztur’s picture

@sidharthap, great thank You for help and sorry for so too long answer!

After changing according to Your post errors has gone away. Now my code is such:

foreach ($settings['gas'] as $key => $value) {
    $settings['gas']['current_block'] = $delta;
    $keywords = gas_get_plugin_keywords($key);
	$settings['gas'][$key] = array('keywords' => $keywords);
  }
  drupal_add_js($settings, 'setting');

Is it correct?

P.S. My php-version is 5.5.9-1ubuntu4.5

kaztur’s picture

UPD
@sidharthap, and now there's no search in search block - just always 'Loading...' message in that block.
And an error in javascript in console:
Uncaught TypeError: Cannot read property 'web_search' of undefined in line 271. Here is 271 line:

//If setting is on, turn on appropriate searcher type
//Set searcher type:
//      Set settings for searcher type Web
// This is 271 line        if(blockSettings.search_options.web_search != 0) {
            var Web = new google.search.WebSearch();
            setLanguageAndDuplicateContent(blockSettings, Web);
            searchSetSiteRestriction(blockSettings, Web, "web");
            searchControls[delta].addSearcher(Web, searcherOptions[delta]);
        }
sidharthap’s picture

@kaztur i will have look at the change you post here. I will update you soon.