The forthcoming SWF Tools 6.x-3.x release has quite a lot of changes in the underlying code as a result of fixing some bugs, and optimising other aspects of the code.

Previous upgrades could simply be installed over the existing one, but this time round there are a few more steps. Please make sure to follow each of the numbered steps below for a smooth upgrade.

Note that all input filters and calls to the swf() function should be unaffected by the changes!

The upgrade steps are:

  1. Move your existing support files from sites/all/modules/swftools/shared to sites/all/libraries, in accordance with #535592: Better place to store players and libraries, where file locations are described in this comment.
  2. Disable all SWF Tools modules from Administer > Site building > Modules
  3. Delete the contents of the sites/all/modules/swftools directory, and all its sub-directories.
  4. Install the new SWF Tools package to sites/all/modules/swftools as normal.
  5. Refresh your modules list by reloading Administer > Site building > Modules
  6. Re-enable SWF Tools core module and supporting modules as required.
  7. Run the update process at update.php to execute some required upgrades to your configuration.
  8. Clear your browser cache to make sure you get the new scripts that are used.
  9. Use SWF Tools as normal!

Note the requirement to run update.php. You will experience error messages if you don't do this as the way SWF Tools stores some of its player settings has been changed. Running update.php will preserve your current settings and migrate them to the new format.

If you don't run update.php, or you experience errors after the upgrade please file an issue so the updater can be fixed. You should be able to clear the error by going to the adminstration page for the affected module and resetting it to its defaults. This will clear the issue, but remember to make a note of your settings before doing this.

For developers

If you call SWF Tools from PHP via swf() then things should carry on as normal. While this function could be improved that will wait until Drupal 7.0 to keep things simple. However, some of the underlying SWF Tools functions have been changed, and some have been removed, as part of code improvements. This is unlikely to affect most people, but if you have been calling directly in to other parts of SWF Tools there's a slim chance your function may have been removed. If that's the case it's because the way of doing whatever that function did is no longer needed, or it is handled elsewhere in the code.

Issues?

I'm still testing the module and developing the next release, but it is starting to be stable now. If you experience errors with the upgrade process, or the new module, please post as a new thread. Please post on #745050: Create upgrade instructions for 6.x-2.x to 6.x-3.x if the upgrade instuctions given above are wrong!

Why is this upgrade more complex than usual?

SWF Tools is nearly three years old, and in that time Drupal has come a long way. CCK has become the preferred way of embedding code, and people use more media on their sites. It's also nearly a year since the last release of SWF Tools was made (it's been a busy year away from Drupal). The break away from the module has been good - in the last few weeks lots of opportunities to tweak the code have come up and it's had something of a purge. For example, there is now a lot more caching of data to improve the performance of media heavy pages, and some repetitive code sections have been stripped out.

Overhaul SWF Tools is starting to look a little more lean inside. Part of the reason for getting this done is to prepare for Drupal 7. Now the code is a bit more manageable that might not be such a challenge...

Cleaning out the code also paves the way to get some of the other new features put in place as the structure is a bit more logical.