This is just a suggestion, as this line of code was clogging my error logs with notices (yah, i have notices turned on).
index.php line 256, perhaps wrap this:
if ($token = get_option('WordCents_oauth_token'.$current_user->ID) || (isset($_GET['code']) && isset($_GET['auth_plugin']) && $_GET['auth_plugin'] == 'wordcents') || isset($apiAuthCredentials[$apiAuthCredentialTypes[$_POST['WordCents_account_id']]])) {
$auth = new AdSenseAuth();
$auth->authenticate($current_user->ID);
if (isset($_GET['code']) && isset($_GET['auth_plugin']) && $_GET['auth_plugin'] == 'wordcents') header('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']);//REQUEST_URI (without code)
}
with this:
if( isset($_POST['WordCents_account_id']) ) {
....
}
$_POST['WordCents_account_id']
has to be checked if its set or not before you can check if $apiAuthCredentialTypes[$_POST['WordCents_account_id']]
is set.
Anyway, it would be great to see this in future releases so that my local fixes don’t get blasted away on update. Thanks
]]>Hi,
After using your fantastic dashboard widget for months, it has suddenly errored without warning. i have tried to apply a new key but the dashboard widget is still showing the same error (I have removed my secure key code from the error and replaced with xxxxx):
Error calling GET https://www.googleapis.com/adsense/v1.1/adclients?key=xxxxxxxxxxxx: (404) Not Found
]]>Is there a way or have any future plans on the widget also accepting PHP code?
]]>I have setup the widget on a custom widget area plugin is below my header
but is only showing in one page the other pages are actually categories and when I click on “Enter category specific code here” I get the message
“You did not select an item for editing.” what should I do?
please help
my site url is https://www.clasemedia.org
]]>I placed my ad on my web site with the widget but it scrolls with the page when scrolling down.i chose the option to “Use custom positioned DIVs” but then it puts it within my page but it’s not where i want and i can’t move it. is there a way to make the ad stay put where i want on my page?
]]>My adsense ads are all over the place -I have tried to adjust the alignemnet and position of the ads, but it doesn’t’ really change much.
Mu site is this https://www.guldforum.dk/
Stefan
]]>Hi,
I am trying to get the dashboard widget setup, and allow the widget to go to google and get the authorisation Id (have also tried it manually) but once I save the widget, I get the following error:
Error calling GET https://www.googleapis.com/adsense/v1.1/adclients?key=************************* (403) Users account has been disapproved.
(key hidden)
]]>I had problems with Jetpack and deactivated Jetpack.
Then I reactive Jetpack and authorize, but was not possible.
The error message comes from Wordcents:
Fatal error: Uncaught exception ‘apiAuthException’ with message ‘Error fetching OAuth2 access token, message: ‘invalid_grant” in /home/geoorgge/public_html/wp-content/plugins/wordcents/src/auth/apiOAuth2.php:105 Stack trace: #0 /home/geoorgge/public_html/wp-content/plugins/wordcents/src/apiClient.php(132): apiOAuth2->authenticate(Array) #1 /home/geoorgge/public_html/wp-content/plugins/wordcents/AdSenseAuth.php(42): apiClient->authenticate() #2 /home/geoorgge/public_html/wp-content/plugins/wordcents/index.php(217): AdSenseAuth->authenticate(4) #3 /home/geoorgge/public_html/wp-includes/plugin.php(403): WordCents_admin_init(”) #4 /home/geoorgge/public_html/wp-admin/admin.php(111): do_action(‘WordCents_admin…’, Array) #5 {main} thrown in /home/geoorgge/public_html/wp-content/plugins/wordcents/src/auth/apiOAuth2.php on line 105
]]>I started this plugin to display Google adSense ads on my blog. It’s simple and easy to use. It features pop-out option for fixed positioning. Just drop the widget on your sidebar and paste in your Google adSense code (or any other code).
I plan on adding more features and easy integration with more ad sources soon.
Please leave feedback on how to improve it.
Thanks, Eli
]]>