Blog

The Top 6 Gotchas When Upgrading ExpressionEngine

April 30, 2012

With tax season over, We’re now back to just one constant in life: Issues come up when upgrading ExpressionEngine.  Many problems turn out to be a case of skipping a step in the documentation, but sometimes things go awry for other odd reasons. Here are my top 6 ExpressionEngine upgrade Gotchas: Things I have learned go wrong, the hard way.

1. Zero-Byte Transfer Ghost

I have run into this problem several times when transferring the latest Expression Engine upgrade files to the server.  I usually use Transmit on a Mac to FTP files to our server.  Every once in a while, a file will randomly transfer “correctly” but empty—with 0 bytes in the file.  The upgrade works, but later, I’ll receive an error message somewhere inside EE and I’ll have to dig deep to find out that it is just a file transfer gone badly, wasting much time that could be spent doing anything else and having much more fun.

Solution: I now transfer the files in a compressed archive and uncompress them on the server side.  I know that if the archive uncompressed properly, then all the files are there in full. 

2. Active Database Deletion

I manage 50+ different ExpressionEngine sites on many different hosting platforms and servers, and I always set up (at least) two databases: eedb, and eedb_bak. When it’s time to upgrade, I copy the eedb to eedb_bak, then run the upgrade, so rolling back (when necessary) is a snap.  Once, though, a new client had an existing EE install that was set up just like that… except the current database was the one called eedb_bak. Hilariousness ensued… not really.

Solution: Now I *always* double check the config.php file to make sure that I’m backing up the current database to the right place.  Rush calls to get a database backup restored are not fun.

3.  So Many Details

The most time consuming and tedious part of the upgrade is making sure that all of your third-party add-ons (Modules, Plugins, Extensions, Fieldtypes, Accessories and themes) are transferred and functioning properly.  It is a little easier in EE 2.x since it you’ve got a single third_party folder in system and in themes, and most add-ons are now updated to use these; plus, you can move these folders now.  But it’s still a significant part of the process, with lots of room for mistakes.

Solution: For now, just keep good track of add-ons. In the future, perhaps EllisLab will integrate more functionality into EE and make some common add-ons unnecessary.

4.  Database Too Large

In upgrading from EE 1.x to EE 2.x, you may run into an edge case where your database changes are too large to be handled via the browser.  If this happens, you may have to use ssh and run the upgrade on the server with command-line scripts.  This leads to possible issues with file permissions, and is a detour that, while it works, takes you off-roading and slows you down considerably.

Solution: This *is* the official (and functional) EllisLab solution to a timing-out problem, it’s just a tricky, that’s all.

5.  Upgrade Blindness

This happens when you go through an upgrade process for a client, run into errors along the way and then have to rollback, troubleshoot and repeat the upgrade again.  This might happen a few times, depending on when the upgrade fails and how far you make it each time.  Eventually, you stumble because you forget to reset something that needs to be done, or you skip a step because you think you’ve done it already (and you have, just no this time.) This might include forgetting to reset the database, the config.php file, resetting the file permissions, re-syncing the file manager directories…

Solution: Document carefully each step, and tick them off as you go backwards and forwards. Sometimes it’s the simple solutions that work best.

6.  Turning the Site Back On

Last, and perhaps even least, is a tiny little oversight that I must sadly admit has happened more than once over the years—specifically on very small, simple sites.  You turn off the site in the control panel early in the upgrade process, and then you run through your upgrade.  Perhaps the upgrade runs into problems and takes longer than expected but you figure everything out and it goes overall quite effortlessly. At last, it’s all working perfectly on your end. You wipe your hands and tell the client it’s done.  The client replies that the site is still down.  Horrors! Suddenly, you remember that as a superadmin, you see the site regardless of whether it’s turned off or on, and you did all your testing while logged in.

Solution: Turn the site back on, dummy!

I hope this helps save you a spot of trouble, and I’d be interested in hearing what “gotchas” you’ve encountered!

Posted by Curt Heywood at 11:52 AMTracker Pixel for Entry


Hop Studios on a Short Holiday

April 5, 2012

With so many U.S. and Canadian clients, there are few holidays that we truly can enjoy, but tomorrow, Good Friday, is one of them.

See you all on Monday!

Posted by Travis Smith at 6:39 PMTracker Pixel for Entry


One Way to Improve EE’s Performance

March 19, 2012

I was working with a client’s ExpressionEngine site this week, one that was having troubles with traffic growth, large traffic spikes, and the database server going down frequently at peak times.

I came up with a partial solution that seems to have helped quite a bit, and might be appropriate for your situation, especially if you have a LOT of entries.

All “entries” on an EE site (articles, sale items, blog entries, etc.), use the channel module when they display data. The channel modules fetches data from the database with a very big MySQL request that also fetches categories, author data, related stories, and more.  Even with careful use of the “disable” parameter, this query is often big.

If the database server could cache that query, it could be much more efficient at handing out that data. And it does try to cache those queries, and MySQL is pretty good at figuring out what to cache and how to cache it. But part of every channel query (unless you turn off dynamic queries, which is rarely possible) is a portion that checks the entry dates, so that future entries AREN’T published, and expired entries AREN’T published. And this time stamp is changed every second, so the query changes every second, and so MySQL can’t cache it.

So what I did, is I modified the timestamp code to be rounded to the nearest 100 seconds. In other words, the channel query for any given page (or portion of a page) will look the same to the database server for a full 100 seconds, instead of changing each second, so it’ll be able to respond with the pre-fetched data much more quickly.  The code looks like this:

$timestamp = (round ($timestamp 100)) * 100

Now, there’s already caching IN expressionengine, and this won’t affect that. So that’s good.

How MySQL deals with it when the exp_channel (or any related) table changes, is that it dumps the in-database cache, so you won’t end up with any sort of delay when editing existing entries; they’ll change immediately and that’ll display immediately (because otherwise, editing would be much more difficult because you wouldn’t be able to look at the results of your edit very well).

Also, if you do this, you probably won’t have any sort of delay when posting new entries, because it takes at least a minute to write and publish an entry, and the entry date of an entry is set from when you load the New Entry form, so the query, even if rounded, will likely always return any newly published entry.

And this rounding doesn’t happen at all in the control panel, because entry dates and expiration dates aren’t used to modify what appears in the edit list.

Lastly, I just wanted to say that this solution came about because of feedback and expertise from the folks at Nexcess.net, our preferred Web host, and it makes me feel even more confident recommending them for ExpressionEngine sites.

This is a core code modification, so you’ll have to reapply it when you upgrade.  If you try it, please let me know if you notice any improvement in site performance.  My next step is to make it into an extension that you can add to your site; if you would you be interested in that, let me know.

Posted by Travis Smith at 11:28 AMTracker Pixel for Entry


Upgrading from ExpressionEngine 1.x to 2.x

February 10, 2012

I have upgraded six client sites from EE 1.7.1 to 2.3 or 2.4 in the few months, and in all cases we have had to rewrite code (EE or PHP), remove or change existing functionality, or have had to work with the folks at EllisLab to get the upgrades to complete. The good news is—we’re pretty good at this now!

If you have been running an ExpressionEngine site for a long time, then you already know the upgrade process for an EE site can be a challenge at the best of times.  Though it seems straightforward, when your site includes third party modules, plug-ins and extensions that don’t always integrate smoothly, or a large database that doesn’t always upgrade without “bonking”, the upgrade process is not always a quick and easy job.

A “normal” EE upgrade say, 2.2 to 2.3, takes from one to two hours when all goes well, but in our experience, the upgrade from EE1 to EE2 (depending on the complexity of your site) could take 5 to 10 times as long. If your basic site doesn’t use any add-ons, then your upgrade should go fairly smoothly but if you do and there isn’t an EE 2.x version of that addon then the challenge begins.  Do you rewrite the code yourself, find an alternate functioning EE2 addon, wait until the EE2 version is written or modify your site not to use that addon?  Not all of these options are acceptable to your client.

Does your site have customized forums? Does it use any PHP code in its templates? Does it have left-over code from EE 1.3 or earlier? Are you using Solspace’s Tracker? Or the original Snippets plugin? Or the photo gallery module? Do you know how to deal with the URLs on your site changing slightly (they will no longer end with a slash…) Did you use Mark Huot’s File extension, or nGen’s File extension? Will you miss having Gypsy? Do you use Pixel and Tonic’s Matrix? Are you upgrading to the latest version of Playa? Did you remember to re-sync the File Manager directories? Are you running MSM? What about any stand-alone entry forms? For goodness sake, you didn’t try to do a UTF-8 site in EE 1.x did you? Have spammers been dancing all over your member registration form?

In some instances, we have postponed upgrades until the Expression Engine addon is released because the modules offer such excellent functionality, but then we are working with beta or X.0 versions, and that is its own set of exciting challenges.

With each upgrade the process is getting refined and with each separate client there is a different gotcha.  But the clients that we have moved to EE2 find that it’s worth the effort—in order to harness the newest developments in the add-on community, in order to have easier site development, and a control panel that makes more sense.  The new entry form functionality is especially appreciated, and when EE 1.x support ends soon, there will be even more reason to take the plunge.

So far, we’ve done Filmradar, The Greater Good, ourselves (no small job!),  Sam Harris, Stanford Social Innovation Review, and the University of British Columbia School of Journalism. Add in the sites we’ve built directly in 2.x, and we think we’re getting pretty good at this. If you’re thinking of updating a site and have questions, we’d be happy to help even just with friendly advice!

Posted by Curt Heywood at 10:23 AMTracker Pixel for Entry


Rose’s Heavenly Cakes, One of the First Kindle eBooks to Have Interactive Media

February 9, 2012

A few days ago, whilst reviewing a video that our favorite client, Rose Levy Beranbaum (realbakingwithrose.com) had put up on her YouTube channel, I found out that her book “Rose’s Heavenly Cakes” was the first Kindle ebook published with embedded media. Exclusively on iOS devices, Rose’s book enables the users to watch built-in video clips of how-to’s and tips for baking. (And yes, it’s ironic that this Kindle book is best experienced on an iPad!)

Here’s the interview where Rose mentions her eBook, around 7 minutes and 52 seconds in (or Click here to skip directly to the part of the clip about the book):

This interactive version of the book, I think, is the ultimate version of the book, especially for a hands-on resource like this one. It is always lovely to see our clients on the cutting edge of technology.

Posted by Timothy Garcia at 3:31 PMTracker Pixel for Entry


From the Blog

  • Click to fill out the Hop Studios Quote Request Form



 

Recent Blog Posts

RSS Feed


Archives