warning: Division by zero in /var/www/WORKSPACE_DRUPAL/seo_drupal/sites/all/modules/kwresearch/kwresearch.module on line 983.

i did a keyword export from google kw research for bike.

division by zero is because somehow 100 * $values['_searches'] / $values['_meta']['searches_max'] has 0, i printed it via devel.

Comments

marcoka’s picture

another addition:

using german kewords fails at the import.

dskulina’s picture

Same problem here... Looks like a great tool - anything in the pipeline to fix or should I abandon?

jamatulli’s picture

Having the same problem. Unfortunately my php skills are not great and I don't have time today to fix this but it is a pretty simple fix. A workaround needs someone that knows how to right an if...then statement and preferably put it in a patch.

Line 983 reads:

$output .= '  <div class="searches-indicator-bar" style="width: ' . (100 * $values['_searches'] / $values['_meta']['searches_max']) . '%;" title="' .$

I tried doing this with only the Goolge Adwords import and no Wordtracker/Wordstream/Scribe SEO API keys and I believe this may be the problem.

The $values['_meta']['searches_max'] is returning 0 (zero) and so a check to see
if $values['_meta']['searches_max'] >0 then
use line 983
else
write different line that gives correct html for this section

bgilhome’s picture

Google Adwords' Keyword Tool only lists 4 columns by default: Keyword, Competition, Global Monthly Searches and Local Monthly Searches. To import a CSV file downloaded from Google's tool using these columns, change line 137 of kwresearch_google.module to read:

list($keyword, $competition, $global_monthly, $local_monthly) = explode("\t", $data);

jscm’s picture

I have the same problem!!!
is this problem solved Installing the dev release?
... when will arrive the official release that fix the problem?

I introduced this change:
list($keyword, $competition, $global_monthly, $local_monthly) = explode("\t", $data);

Now I see data from goole. BUT I can't see the Competition and Bid value. They are alway ZERO or NULL. I don't know why.

technologywon’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Drupal 6 is no longer supported