AI Assistant
Notifications
Clear all

[Solved] Adding Adsense code to Ads Manager

16 Posts
4 Users
0 Reactions
5,696 Views
Posts: 7
Customer
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@daniel-lutton)
Member
Joined: 6 years ago
[#6068]

Hi, I am trying to add my adsense code to Ads Manager but will always recieve an error - Ad adding error.  

I have tried.

* Removing line breaks from code

* Tried numerous different codes that work fine on website.

* I am adding as Text

Thanks

AdManager

 


15 Replies
Astghik
Posts: 6645
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@astgh)
Illustrious Member
Joined: 8 years ago

@daniel-lutton,

Please let us know the code you're using. 


Reply
3 Replies
Customer
(@daniel-lutton)
Joined: 6 years ago

Member
Posts: 7
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

Hi Astghik,

code as follows

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- ForumAd -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-6855355411049399"
     data-ad-slot="8309797028"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>

Reply
Astghik
Admin
(@astgh)
Joined: 8 years ago

Illustrious Member
Posts: 6645
Astghik
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

ok @daniel-lutton, thank you.

We'll check it and back to you asap. 


Reply
Elvina
(@elvina)
Joined: 7 years ago

Support
Posts: 1403
Astghik
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@astghik,

We've just checked and don't find such an issue. Please make sure the "Text" mode is enabled. See the screenshot below:

add manager

If the issue still exist could you please deactivate the plugins one by one and check after each deactivation. 


Reply
Posts: 7
Customer
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@daniel-lutton)
Member
Joined: 6 years ago

Thanks for your reply.  Unfortunately, I am still receiving this error.  I have unwillingly deactivated most of my plugins.  I have even deactivated Ads Manager and activated again.  I have tried numerous Adsense codes. I can confirm that I am inserting as Text mode.


Reply
2 Replies
 Tom
Admin
(@tomson)
Joined: 11 years ago

Famed Member
Posts: 4245
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@daniel-lutton

Please make sure you use the latest wpForo and wpForo Ads Manager addon versions only.

Also please make sure the wp_wpforo_ads table exists in database. Use Hosting Service cPanel > phpMyAdmin database manager tool. If this table doesn't exist, please execute this SQL:

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
CREATE TABLE `wp_wpforo_ads` (
`adid` bigint(20) UNSIGNED NOT NULL,
`title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`code` text COLLATE utf8mb4_unicode_ci,
`body` longtext COLLATE utf8mb4_unicode_ci,
`start_date` datetime DEFAULT '0000-00-00 00:00:00',
`end_date` datetime DEFAULT '0000-00-00 00:00:00',
`forumids` longtext COLLATE utf8mb4_unicode_ci,
`hide_for_groupids` longtext NOT NULL DEFAULT '',
`tpllocs` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`status` tinyint(1) UNSIGNED NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

ALTER TABLE `wp_wpforo_ads`
ADD PRIMARY KEY (`adid`),
ADD KEY `start_date` (`start_date`),
ADD KEY `end_date` (`end_date`),
ADD KEY `tpllocs` (`tpllocs`(191)),
ADD KEY `status` (`status`);

ALTER TABLE `wp_wpforo_ads`
MODIFY `adid` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

If your database table prefix is not wp_ please change it.


Reply
 Tom
Admin
(@tomson)
Joined: 11 years ago

Famed Member
Posts: 4245
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@daniel-lutton

Once table is create, test it. if the code is not working I recommend remove all line breaks and HTML comments from your code and use it as a one line in the text editor:

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-6855355411049399" data-ad-slot="8309797028" data-ad-format="auto" data-full-width-responsive="true"></ins><script> (adsbygoogle = window.adsbygoogle || []).push({});</script>

Then delete all kind of caches (cache, cdn, minify, optimize)


Reply
Posts: 7
Customer
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@daniel-lutton)
Member
Joined: 6 years ago

Hi, I still require assistance with this.  This table does not exist.  My tables begin with the prefix of wpbd. I have added the table as instructed above with both prefixes.  I still get same error message.

Capture

 


Reply
1 Reply
Elvina
(@elvina)
Joined: 7 years ago

Support
Posts: 1403
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@daniel-lutton,

I have added the table as instructed above with both prefixes.

Please keep the table with the wpbd_ prefix, and delete the second one with the  wp_ prefix and check again. 


Reply
Posts: 7
Customer
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@daniel-lutton)
Member
Joined: 6 years ago

Still no luck.  I have deleted the table as requested and still get this error.  Can I confirm that the code you have given me earlier to enter the table is correct?  I really need this resolved.

Capture

 


Reply
1 Reply
 Tom
Admin
(@tomson)
Joined: 11 years ago

Famed Member
Posts: 4245
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@daniel-lutton,

The code is correct, just remove the last COMMIT; phrase and execute it. You should make sure the table exists.


Reply
Page 1 / 2
Share:
Scroll to top