After installing updating adsense module (+Rev. Sharing) all channel are gone.
page source shows :

google_ad_channel = "";

Comments

kbahey’s picture

Please paste the following SQL in phpmyadmin or mysql and post the output here (you can mask your google client ID if you like)

SELECT * FROM variable WHERE name LIKE 'adsense%';

povinho’s picture

The same! All channels gone. No identify number.

Custom Channels

Custom Channel ID:
Custom Channel ID:
Custom Channel ID:
Custom Channel ID:
Custom Channel ID:

The identifing number are gone and like "ataasgari" wrote an the code I also get:
google_ad_channel = "";

povinho’s picture

The SQL result you asked:

adsense_access_pages 	s:0:"";
adsense_ad_channel_1 	s:10:"1756245583";
adsense_ad_channel_2 	s:10:"7193756801";
adsense_ad_channel_3 	s:10:"9648065022";
adsense_ad_channel_4 	s:0:"";
adsense_ad_channel_5 	s:0:"";
adsense_ad_type_1 	s:1:"2";
adsense_ad_type_2 	s:1:"2";
adsense_ad_type_3 	s:1:"2";
adsense_alt_1 	s:1:"1";
adsense_alt_2 	s:1:"1";
adsense_alt_3 	s:1:"1";
adsense_alt_info_1 	s:40:"http://mydomainMasked.com/ban/ban486x60.htm";
adsense_alt_info_2 	s:41:"http://mydomainMasked.com/ban/ban120x600.htm";
adsense_alt_info_3 	s:45:"http://mydomainMasked.com/ban/ban300x250.ht...
adsense_client_id 	s:20:"Masked!!!!!";
adsense_color_bg_1 	s:6:"FFFFFF";
adsense_color_bg_2 	s:6:"E4E4E4";
adsense_color_bg_3 	s:6:"FFFFFF";
adsense_color_border_1 	s:6:"FBC636";
adsense_color_border_2 	s:6:"E4E4E4";
adsense_color_border_3 	s:6:"FBC636";
adsense_color_link_1 	s:6:"804000";
adsense_color_link_2 	s:6:"804000";
adsense_color_link_3 	s:6:"804000";
adsense_color_text_1 	s:6:"000000";
adsense_color_text_2 	s:6:"000000";
adsense_color_text_3 	s:6:"000000";
adsense_color_url_1 	s:6:"008000";
adsense_color_url_2 	s:6:"008000";
adsense_color_url_3  	s:6:"008000";
adsense_disable 	s:1:"0";
adsense_node_type_blog 	s:1:"0";
adsense_node_type_forum 	s:1:"0";
adsense_node_type_image 	s:1:"0";
adsense_node_type_page 	s:1:"0";
adsense_node_type_poll 	s:1:"0";
adsense_node_type_simplenews 	s:1:"0";
adsense_node_type_story 	s:1:"0";
adsense_page_ad_limit 	s:1:"3";
adsense_percentage 	s:1:"0";
adsense_placeholder 	s:1:"0";
adsense_placeholder_text 	s:36:"Empty";
adsense_revenue_enable 	s:1:"0";
adsense_section_targeting 	s:1:"0";
adsense_visibility 	s:1:"0";
kbahey’s picture

Change the following line:

  $channel = variable_get(ADSENSE_CHANNEL . _adsense_validate_channel($channel), '');

To

  $channel = variable_get(ADSENSE_AD_CHANNEL . _adsense_validate_channel($channel), '');

See if that does it

povinho’s picture

Ok!

That solved the most importante part! Now I get the Chanel ID back on the Page Source.

But the admin interface still doesn't number the "Custom Channel ID:".

Regards,

kbahey’s picture

Change this line:

    $output .= form_textfield(t('Custom Channel ID'), ADSENSE_AD_CHANNEL . $channel,

To this:

    $output .= form_textfield(t('Custom Channel ID') . $channel, ADSENSE_AD_CHANNEL . $channel,

Let me know if it fixed it.

povinho’s picture

Problems Solved!

You are the best! Keep up the good work :)

I'm just moving now to the Feature Request page to ask you to add the 300x250 format to the module.

I've chage the code to add that but. Each time a new release get out I've to add it again! I'll add the code there in a minute..

One more time thank you for your time. This has been a very usefull module in my site.

Regards,

kbahey’s picture

Status: Active » Fixed

Fixed.

povinho’s picture

Priority: Critical » Normal
Status: Fixed » Active

Hi!

I've just have notice that I get all adsence ads with the same chanel number. The Channel 1 number.

google_ad_channel = "1756245583";

Regards,

povinho’s picture

Status: Active » Needs review

Hi! I've found the bug:

At:

function _adsense_validate_channel($channel = 1) {
  if ($group < 1 || $group > ADSENSE_MAX_GROUPS) 
    // Default to 1 if an invalid channel is supplied
    return 1;
  }
  return $channel;
}

Change:
if ($group < 1 || $group > ADSENSE_MAX_GROUPS) {

To:
if ($channel < 1 || $channel > ADSENSE_MAX_CHANNELS) {

Regards,

povinho’s picture

Sorry I made a mistake:

Should be like this:

Change:
if ($group < 1 || $group > ADSENSE_MAX_CHANNELS) {

To:
if ($channel < 1 || $channel > ADSENSE_MAX_CHANNELS) {

Regards,

kbahey’s picture

Status: Needs review » Fixed

Fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)