While I’m still waiting on a response from Automattic the development wheels here, are not standing still.
Zack Tollman had some further insights on the matter and a few tweaks have been made to further ‘harden’ AdRotate.
Downloads here.
While I’m still waiting on a response from Automattic the development wheels here, are not standing still.
Zack Tollman had some further insights on the matter and a few tweaks have been made to further ‘harden’ AdRotate.
Downloads here.
In response to a report yesterday morning that AdRotate was at risk I have made a number of changes to the plugin to ensure your websites safety.
Additionally several small issues that have been reported before have been fixed as well.
[fix] Division by 0 error on some stats reports
[fix] Removed slashes when editing block wrapper
[fix] Advertiser Emails now populated with user info
[fix] Potential flaw to renew ads that aren’t yours
[change] Improved data sanitation
[change] Improved variable use on some functions
[change] Improved ad state cache
If you want to try out the patches and do not wish to wait for Automattic to finally allow AdRotate back into the repository please download the RC below.
Release Candidate, as you might know, means it’s past Beta and ready for release if no bugs are found.
I’ve made some changes to the installer and upgrade script. But more importantly the schedules should now rely completely on WordPress times making ad selection and time restrictions more reliable.
This change in usage of time is a result of various reports that newly created adverts would not display. These changes likely resolve these issues but it needs to be tested on more websites than just my 3 servers to be sure.
The way AdRotate works is that this issue likely has been in existence since the very first version of AdRotate, 4 years ago, but never became really visible because the start and end dates were based on full days instead of to-the-minute precision. Therefor downgrading to older versions will not actually resolve the issue but merely mask it.
Additionally; re-installing the same version, removing all ads and starting over will NOT solve the issue. A larger margin on start and end dates will temporarily make ads work. For instance, If you want an advert to start to display on July 25th, set the schedule for the 24th. While inaccurate, the advert will show on the 25th with an overlap to the 24th. Apply the same rule to the end date, except have it stop a day later than intended.
You can skip the rest of this post as it only explains my findings and where i think the issue lies with the websites AdRotate is installed on.
Over the past days I’ve discovered that the server (Apache, Nginx, etc.), PHP and WordPress each use their own measure of time.
WordPress relies on PHP and your timezone settings from what I could find.
PHP relies on settings made by the admins and the reported time by the OS.
Apache (or whatever webserver you use) relies on the system clock or OS time.
A lot of links in a chain that shouldn’t be necessary at all. In my opinion everything should rely on the same source. Either a system clock or other central source. But that’s not important right now.
Important is that AdRotate uses WordPress features for certain time notations, for example the translation of month names and am/pm settings.
For other more invisible functions, such as ad selection, AdRotate relies on the PHP times using functions like mktime() (gmmktime()) and date(‘U’).
apparently these times differ in some cases causing the schedules to work unreliable for some people. Even when applying timezone rules vs. using WordPress’ current_time() function the dates can be off by several hours. Even if the system time, PHP time AND WordPress time are in the same timezone.
For example; My development server which stands right here next to me is off by 14 minutes even though ALL reported times throughout the entire machine are exactly the same as my iMac and an analog clock. Both machines are on the same physical desk and internet connection synchronizing to the same time servers. Using the same times and file sharing between the 2 DOES report the right time. This means that PHP is wrong somehow. WordPress is right and the OS is right too, as far as i can tell.
Over the past days I’ve been reading up on all this mumbo jumbo and found all this kind of confusing. Therefor I decided to drop using PHP and System time entirely and have WordPress figure that part out. This will require some trial and error and some rewriting of routines. But at least AdRotate will be in “sync” with WordPress so there can be no conflict there.
I think I’ve covered most of it in this beta3 and this should lead to a more reliable AdRotate where time makes sense again.
Minor update to allow and improve on the variable height in blocks.
In this version you can set “auto” for the height of ads in a block. Please report your experience using this option if you need it. Because the blocks height is now a dynamic value it could cause some issues with the generated HTML. I need to know these issues.
On my test site it works ok, good enough to be a feature. But that’s only tested on the default theme.
Download - http://blog.adrotateplugin.com/beta/
Following the flurry of posts with vague often indecipherable outcries for help I have updated the schedule filter a bit and this needs testing. Additionally you can now set a float for the entire block. For those needing it.
Please provide feedback via the form on the AdRotate dashboard!
Remember, this is a beta! After installing this you can not downgrade due to the new float setting!
If you want the option to downgrade make a backup of the AdRotate blocks table first. If you don’t know how to do this, do not use beta versions!
Changelog:
[fix] Schedules not counting period stats correctly preventing ads from displaying
[new] Float setting for blocks
Download:
From the beta page!
Read the page carefully! I have this version on my blog and it seems fine but you are encouraged to make a backup first! And use at your own risk.
Available now! rc9 – fixing some sillyness from rc8.
[fix] New ads can now be saved again (bug in rc8)
[fix] Error reporting works reliable now (bug in rc8)
[fix] Adverts are now correctly injected into categories posts (bug in rc8)
Download here.
After a long night of coding i came up with a better routine for post injection. The earlier method was broken in some weird way and worked quite inefficient. Both have been fixed and improved.
Important: For those who received an early copy of rc8 before the weekend, this ‘final’ version does contain a few fixes your version does not have. It is therefor advise you download and use this version instead.
i18n: I even updated the translation file (Yes usually i forget).
Changelog for rc8 (compared to rc7):
[fix] New wp-cron schedules are now correctly removed when disabling or uninstalling the plugin
[fix] Argument count on adrotate_evalutate_ad function when saving/creating ads
[fix] Optimized post injection
[fix] Various small bugs and inaccuracies with post injection(rc8)
[fix] Removed left over code from a beta function from AdRotate 3.6 involving Block schedules
[fix] Dashboard notifications for adstates now updates properly when saving an ad
[change] Checks for ads correctness and expiry date every hour instead of every pageload (speed increase, dashboard)
[change] Multi-select dropdown menu for groups’ page injection
[change] Multi-select dropdown menu for groups’ category injection
[change] Email notifications now include ads with errors
You can find the full changelog here.
And the download sits on the beta page.
Now available, Rc7. This version includes various fixes when managing and monitoring ads. And a fix where user roles are not always working as expected.
Which has the following fixes:
[fix] Updated user capabilities management
[fix] Expiration notices on dashboard
[fix] No longer tells you about expired ads that are disabled
[fix] Blocks now correctly allow a margin and padding of 0px
[fix] Blocks dynamically resize to the amount of ads if it’s less than the specified amount without distorting the site
[change] Role capability advertiser_report has been renamed to advertiser
Download; here.
Feedback:
Keep sending feedback, comments and your ideas/opinions on the new features guys.
I think if this RC7 works of for you version 3.7 will be available soon.
Over the past days i’ve been reading through a heap of feedback from various people. Quite a few were about missing notifications and being told ads were broken while they weren’t. Fret no more! AdRotate was broken. The 3.7rc5 and 6 that is.
If you have found more quirks or oddities, let me know. Stable or RC doesn’t matter. If you think you have a great idea or found a bug. Let me know!
Currently i’ve fixed the following for rc7:
[fix] Updated user capabilities management
[fix] Expiration notices on dashboard
[fix] No longer tells you about expired ads that are disabled
[fix] Blocks now correctly allow a margin and padding of 0px
[fix] Blocks dynamically resize to the amount of ads if it’s less than the specified amount without distorting the site
[change] Role capability advertiser_report has been renamed to advertiser
For the capability change you might need to reset the role assignment but the upgrade script should take care of it for you.
I’ve had one report of missing database fields after the upgrade to RC6. Apparently the “timeframe” field was not added in the automatic upgrade. If anyone else noticed this please let me know. I was unable to reproduce this on 3 servers.
Everybody who sent in their comments and complaints, thanks! You helped solve bugs, as listed above!
AdRotate 3.7rc7 should be available shortly after i wrap up some loose ends. I expect this to be early next week.
Release Candidate 6 is now available. Improving the interface and internationalization for blocks. Another small update that the dashboard should look a little bit more polished and aligned. And of course there is the fancy color picker.
Download:
Changes:
Improved interface for adding and editing blocks
Small tweaks to dashboard
Feedback:
Keep sending that feedback using the feedback form or by sending messages to feedback@adrotateplugin.com. Thanks!