Oct 222013
 

I see the dis­cus­sion about how best to struc­ture your HTML+CSS to be both appeal­ing to the read­er and easy to main­tain is con­tinu­ing; see The Semant­ic CSS Debate for some of it and links to more. What par­tic­u­larly struck me was this sentence: 

I now find myself act­ively advoc­at­ing against lib­rar­ies like boot­strap due to the long term main­tain­ab­il­ity issues their approach to CSS causes.

On the sur­face, this appears to be one issue that tem­plat­ing sys­tems can help solve. Wheth­er you use XSLT to gen­er­ate a web site from Word doc­u­ments or XML, or some­thing like Jekyll (which I use for the Tex­tu­al­ity web site), or a data­base-driv­en sys­tem, to gen­er­ate the site, you should be able use both a frame­work such as boot­strap and your semant­ic con­tent. You do have to be pre­pared to put in an inter­me­di­ate step, that of gen­er­at­ing the out­put from the input and plan in advance for the fact that you may wish to switch from format a to format b.

This seems to me to be a logic­al way of doing things, or maybe it’s simply because I’m steeped in the idea of cre­at­ing the data in a format that can be trans­formed to an appro­pri­ate out­put format. This idea does make the choice of out­put format (in this case pre­cisely which HTML + CSS frame­work to use) some­what less daunt­ing, or rather, the cost of chan­ging it later some­what less (although not neg­li­gible since the trans­form­a­tion sys­tem needs to be changed).

Dis­claim­er: yes, I do write my blog posts using pointy brack­ets. Word­Press provides a tem­plat­ing sys­tem which enables chan­ging styles fairly read­ily; all I write by hand is the con­tent with­in the main con­tent block.

Oct 142013
 

I’m on my third Android phone now, and appar­ently there is no way to delete the pre­vi­ous phone(s) from my Google Account. The Android Device Man­ager sup­port page tells you how to find the phone and wipe it, but I wiped them before passing them on to new homes. And I don’t care about their cur­rent loc­a­tions. You can hide a device from the list, but not delete it, and I’m puzzled as to why. Do they need a list of all pre­vi­ous own­ers of any device? Why?

And, the page to revoke access to Google accounts from these old devices still looks some­thing like this:

Google account revoke access page

and does­n’t tell you which device or account is meant by ‘Android Login Ser­vice — Full Account Access’. I guess I could turn off each one in turn and see which I need to turn back on, but it should be pos­sible for Google to put some identi­fy­ing inform­a­tion there to help with the pro­cess, even if it’s only the date on which access was requested. 

Oct 092013
 

One of my web­site cli­ents has a Drupal site, and it was time to upgrade from Drupal 6 to 7. Drupal is one of those vastly com­plic­ated, able-to-do-any­thing plat­forms that is part blog­ging soft­ware, part CMS, and part play­ground for PHP developers, with the inev­it­able res­ult that Drupal 7 is a worth­while upgrade over Drupal 6, but requires more than a little time to fig­ure out what needs doing. Thanks to Shane at Left Right Minds who poin­ted me in the right dir­ec­tion on sev­er­al occa­sions. With power comes com­plex­ity and there are many ways to get things wrong.

As always, the basics are clear: use a devel­op­ment site for the upgrade to get all the issues out of the way while not affect­ing the pro­duc­tion site. Allow more time than you think you will need. Ensure an adequate sup­ply of chocol­ate and/or cof­fee. Take breaks as needed.

Copy the files on the pro­duc­tion site to the devel­op­ment site (which I’m call­ing {yourdevweb­site}). Cre­ate a backup and restore that on the devel­op­ment site. Next time: turn off cach­ing and clear the cache before mak­ing the backup. Make sure cach­ing is turned off while developing.

List all the mod­ules on the cur­rent site, see if they have Drupal 7 equi­val­ents. Spend some time fig­ur­ing out wheth­er the new ver­sions are worth­while, or if there’s a bet­ter way to add func­tion X in Drupal 7 (ask­ing an expert, like Shane, is really help­ful at this stage).

Upgrade the core by installing Drupal 7, solve any issues. If the pre­vi­ous sysad­min changed the defaults so none of the menus appear to work, go to {yourdevwebsite}/admin/structure/menu to reset them to the defaults.

Drupal 7 allows upgrad­ing mod­ules from a URL, yay! So the pro­cess of upgrad­ing mod­ules turns into a fairly simple one , if no errors crop up. The first step is to determ­ine the order in which to upgrade the mod­ules — Backup and Migrate should be the first, Con­tent Con­struc­tion Kit (CCK) second since it requires some field con­ver­sion. Then Date, Token, and Views (nev­er under­es­tim­ate the power of a View). Once you have those basics done, upgrade the oth­er mod­ules in whatever order makes sense. I like to order things so I fix what’s on the front page of the web site first, then the oth­er pages.

  1. Go to {yourdevwebsite}/admin/modules/install, add the link for the latest stable Drupal 7 ver­sion, and install. 
  2. Enable the mod­ule, then run {yourdevwebsite}/update.php
  3. Fix any errors.
  4. Run the backup to back up the changes.
  5. Con­fig­ure the mod­ule, adjust menus, etc, until the mod­ule more or less does what you need. Final tweak­ing can wait until all the mod­ules are installed, but get the main func­tion­al­ity in place for each mod­ule as you upgrade it.
  6. Repeat for your list of modules

Be aware, some mod­ules just don’t work in Drupal 7 and for those you need to find anoth­er way to get that func­tion­al­ity. Some mod­ules (e.g., Cal­en­dar) changed the way they work between Drupal 6 and Drupal 7. Some mod­ules use the stand­ard con­fig­ur­a­tion meth­ods, oth­ers (Cal­en­dar again) are con­figured using dif­fer­ent methods.

Drupal 7 lets you split lib­rar­ies and the mod­ule. For example, a good way to install the CK edit­or is to get the down­load from the web site and put in /sites/all/libraries. Then install the CKed­it­or mod­ule, which will use that lib­rary via the lib­rar­ies API.

IMCE is a nice image and file browser/uploader.

When it comes to updat­ing themes, be aware that even if the theme has the same name as one in Drupal 6, it will prob­ably have sig­ni­fic­ant changes. Respons­ive design tech­niques and the avail­ab­il­ity of more base themes con­trib­uted to this, as well as the changes due to the actu­al plat­form. Expect to spend more time than you expec­ted to tweak the theme back to some­thing approach­ing the ori­gin­al look and feel (assum­ing that’s what the cli­ent wants).

Allow time for train­ing people on the new fea­tures. Even an hour or two helps.

/* ]]> */