08:30 AM: Noticed that since the plugin upgrades last night, the advertisements on this blog are appearing on the bottom three posts on the main page, and not the top three as before. However, my other two blogs do not display this problem. Investigating.
09:20 AM: Tried uninstalling and reinstalling the AddSense Integrator plugin. The display problem persists.
09:30 AM: Tried restoring the site software for the Tom’s Diary blog from last weekend’s backups. This had the effect of downgrading the plugins which I upgraded last night. However, surprisingly, this did not fix the issue either. Even with the old versions of all plugins, the ads still appear at the bottem of the main page instead of at the top. Apparently, something has changed in the database itself. However, I’m reluctant to restore it to last night’s backup, as I’ve made several posts and post edits since then that would be lost. So I’ll need to find another solution. Stand by.
10:15 AM: Discovered approximately 20 blank ad records in the AddSense Integrator setup page on the Tom’s Diary blog, that are not present in the other two, correctly functioning blogs. So, I deleted these. This seems to have partially fixed the trouble. Now, the first of the three ads indeed displays at the bottom of the first post. This post is located at the top of the page. However, the other two ads still appear on the bottom two posts on the main page. So, I’ll keep digging.
10:40 AM: Tried deleting all add records and then re creating the ones I need. But the display issue still persists. I’d like to have all ads close to the top of the main pages, because there, they’ll be more likely to be spotted, and clicked.
11:00 AM: Looked for where the AddSense Integrator plugin is storing the data about the ads it displays. First, I checked each table in the blog database. Didn’t see anything resembling these data there. Then, I looked in the software directories for the blog, but could not find any recently-modified files there. However, I didn’t check every possible place on the file system. But I think I will now.
11:30 AM: Scrutenized the AddSense Integrator’s PHP code file for clues. Nothing useful discovered so far.
01:20 PM: Looks like the AdSense Integrator stores the persistent data for the ads in the WordPress database wp-options table. These options begin with abs_int_ .
01:30 PM: Discovered that even when the AdSense Integrator plugin is removed, it leaves old data in the wp_options table. So I’m going to remove these rows, reinstall the plugin, and see if the ads display where they’re supposed to.
01:35 PM: Removing the old options data from the database, and then reinstalling the AdSense Integrator plugin did not solve the issue. Looking further.
01:50 PM: There’s an AddSense Integrator option checkbox that appears on the post editing screen, which allows the editor to stop ads from displaying at the bottom of the post he’s working on. In version 1.5.4 of this software, which I’d been using prior to the upgrade to 1.5.7 last night, the default value for this checkbox was UNCHECKED. That is: Ads would display by default on all posts, unless the editor specifically checked this checkbox before saving the post. However, now the behavior is reversed. The box is checked even though the data in the database for the post indicates that it should not be. So whenever the editor either creates a new post, or saves an existing one, this checkbox comes up as CHECKED, and unless he specifically unchecks it before saving the post, the post is saved with the display of ads turned off, even though it was turned on before the save. This would seem to qualify as a bug in the AddSense Integrator plugin.
Further in this latest version (1.5.7) of the AddSense Integrator, the ads still display as before, as long as you do not either add new posts, or modify existing ones. This is why my other blogs seemed to be unaffected by the plugin upgrade, as I’ve not added or changed any posts on those since last night. So, I pulled one post from Tom’s Love Quest into the editor, and then re-saved it. Then, I went to the blog home page, and sure enough, ads no longer appeared on that particular post. So then, I edited the document again and unchecked the “Check to disable ads on this post.” check-box, and again, re saved the post. Proper ad display then returned.
02:15 PM: So, I’m investigating the possibility of changing the default state of this checkbox from CHECKED to UNCHECKED.
04:20 PM: Modified line 251 in the AddSense Integrator PHP file from this:
<input type=”checkbox” name=”ads_int_disable” <?php if ($ads_int_disable) echo “checked”; ?>/>
to this:
<input type=”checkbox” name=”ads_int_disable” <?php if ($ads_int_disable) echo “unchecked”; ?>/>
However, a problem still exists that this checkbox is not correctly set from the post’s meta data. This is a bug for the plugin’s developers to address. But this work-around I’ve devised above will keep the box unchecked at all times, and stop the automatic setting of this flag when the post is saved. No troubles with this here, because I prevent none of my posts from showing advertisements.
04:30 PM: Deleted all the ads_int_disable records from the post_meta table in the database (six posts had been marked here as advertisement-disabled). This should re enable display of ads on all posts in this blog.
Tom Hesley
Related Posts