Weeknotes 4

  • I started using Bitbucket Pipelines to deploy projects.  I’m a great fan of Gitlab due to their awesome CI system, but have only just started to use Bitbucket Pipelines to auto deploy my sites.  I’ve setup several sites this week on Bitbucket to deploy.  Check out my Gists for some example CI scripts.
  • I have only worked with one new client in perhaps the last year, with all of my work coming from existing clients.  This means I can add more value to this projects I’ve worked on in the past.
  • A had an enquiry from a company who are currently having a new website built and enquired if I would support it and providing training after it was delivered.  I find this an odd situation as I provide all of the support and maintenance for every website I have ever made.  I thinks it’s odd that a developer wouldn’t off this, and I find it stranger than a client would accept this from a developer.
  • The Gift Project that I worked on in 2018 and 2019 is presenting at more Museums.  This is a fantastic project and it makes me very happy to see it adopted by more Museums.

Weeknotes 3

I’ve been watched the BBC’s Severn Worlds, One Planet. The production quality is astonishing, as is the human impact on the planet.

I’ve enjoyed working on several different projects this week. I do this every week, sometimes working on several in a day.

I’m very keen to finish a long winded web project I’ve been working on.

I’ve started my half marathon training.

I’ve started eating mince pies and chocolate.

Weeknotes 2

This week I did a bunch of updates on the optilabs.com and listenandlearnresearch.com websites.  These are both sites I have worked on for years.  I really value continued relationships with clients, as it’s good regular work that takes little time and investment to win.

I was contacted by a travel agency owner who needed to update an ageing Drupal 6 site as it has come to its end of life, and also their only member of staff who knew the site was leaving.  I had a long call with him, and expressed my opinion that Drupal is hard to use and develop for.  I put together a fixed price to incorporate all the required work to migrate to WordPress.  This was brave for me as the brief was minimal.  He decided to stick with Drupal, going with a different freelancer/agency. He seemed to realise this was perhaps the wrong move, as Drupal had not served them well.  Price so often drives peoples short term decisions, even when they know they are facing the same problems long term.

I created a new freelance WordPress developers guide website.  This is a site I had toyed with several years ago, but then it got archived in a server move.  I’ve found myself with lots of tips to journal and got the site back online.

I’m finding more time to focus on my long overdue side projects, which feels very satisfying.

Weeknotes 1

Inspired by Mark Boulton and others I’ve decided to try writing weekly notes, as a record of things I’m working on and other little snippets.

I worked on DKIM signing outgoing emails for the itvworkplaceservices.com website.  A little outside my normal wheelhouse, but aways nice to learn new things.

Last week was the Spit Spreads Death parade in Philadelphia.  This wonderful parade was a memorial to the 20,000 people that lost their live in 1918 to a flu pandemic.  The parade was created by Blast Theory, who I regularly collaborate with.  I worked on a React and Node.js app to allow people to choose who they will represent in the parade. I also contributed to another React app used during the parade.

I discovered a client was using a website that they never paid me for. Long story, but basically I was to develop sister websites for sister companies. One client pulled out at the end, but eventually just took a copy of the other website. I’ve emailed the client but haven’t heard back yet.

 

How to change WooCommerce product gallery zoom image size

By default the WooCommerce product gallery zoom image size is very big.  This can cause the zoomed image to look distorted and too far from the original.

The cause is that WooCommerce selects the ‘full’ image size to use as the zoomed image.

Use the snippet below to the use the ‘medium’ image size as the zoom image.  ‘large’ will give a bigger zoomed image.

// Change the image size used for the WooCommerce product gallery image zoom
// 'medium' or 'large' are normally the best options
add_filter( 'woocommerce_gallery_full_size', function( $size ) {
  return 'medium';
} );

How to enable Hot Reloading in React Native

By default Hot Reloading in React Native only works if you extend React.Component.
If you are using your own base classes to inherit from you need to change the .babelrc file.

Below is my working example. In the superClasses section you will see BasePanel and InfoPanel which are my base classes.

{
 "presets": ["babel-preset-expo"],
 "env": {
  "development": {
    "plugins": [
      ["react-transform",
        {
          "transforms": [{
             "transform": "react-transform-hmr",
             "imports": ["react"],
             "locals": ["module"]
           }],
          "superClasses": ["BasePanel", "InfoPanel", "React.Component", "Component"]
        }
      ]
     ]  
    }
  }
}

WordCamp London

WordCamp London, in it’s 4th year in 2018, is an excellent event that I’d recommend to anyone working with WordPress.  Whether you are a seasoned developer or have only just starting working with WordPress, it’s worth taking the time to attend one year.

The entire 2 days costs only £30, which is incredible value when you consider this includes a decent lunch for 2 days, dinner on the Saturday night, snacks and hot drinks throughout the event.  Of course WordPress is open source and so this event is non-profit and for the community, with everyone speaking for free and all of the huge number of volunteers helping run the event.

Costs

If you use WordPress for your work then ask your employer to pay for you to attend.  If you are independent it’s a really cost effective way of getting some personal development training.

In 2018 I spent:

  • £30 for my ticket
  • £10 train ticket (Hove to Victoria, this was a bargain ticket)
  • £60 for overnight hotel room (Queens Hotel single room with breakfast)
  • Total : £100

This is incredible value considering many conferences will cost you £150 for a single day of attendance, without travel or accommodation.

Talks

The talks at WordCamp are varied covering development, design, accessibility, business and more.  Experience developers will find the development talks pitched at a less technical audience, and so its worth trying different topics as I often find the business and design talks the most beneficial to me.

Networking

WordCamps are the best networking events I have ever been to.  The WordPress community is very friendly and open to discussion.  At WordCamp you’re likely to meet lots of people quickly including sales leads, people to work alongside, people looking for jobs, and companies looking to hire.

Location

WordCamp London has been at the London Metropolitan University, Holloway Rd for the last 3 years.  It’s a great venue that allows 3 separate tracks of talks, a great social and dinner at the same venue.

There are a large number of WordPress related sponsors helping fund the event also, and they can be found giving away swag on their stalls, so drop buy and have a chat with them.

The WordCamp London website lists a number of suggested hotels. I have stayed at both of the Queens Hotels (there are two right next to each other) near Finsbury Park, as they are cost effective, and would recommend both.  This one has a parking space outside which I’ve used on the Saturday, and there is lots of free parking nearby on a Sunday.  I’d recommend getting to London by train though, as even on a Sunday the traffic can be tiring.

Rebuild of CampervanLife.com – day 5 – Import of data and Pre-go Live

Newsletter

I decided to get a newsletter subscribe form active right from the start.  Previously I had used a Drupal module to collect emails and to send the emails.  This worked out OK.

For smaller projects I use MailChimp.  I love the user interface and simplicity of MailChimp.  The website has about 1,800 subscribers, which is close to MailChimps free account limit of 2,000 subscribers.  At this point I’m keen to keep costs down, and until I actually send a newsletter I’m really just collecting email addresses.  I installed the Newsletter plugin, and configured it in the footer.

Homepage?

Page structure

I decided to re-structure the site slightly.

URLs

During the import of the content from Drupal some of the URLs were changed.  I went through each of the major pages, checking the URL matched that of the Drupal site, adding 301 redirects where necessary.

During the import

Im surprised by how many plugins I’ve needed to install to replicate the features I was using on the Drupal site.

 

SSL

I activated the free Let’s Encrypt SSL certificate in SiteGround.  Then used the interconnectit.com search and replace script to change all occurrences of http://www.campervanlife.com to https:/www.campervanlife.com.

 

Rebuild of CampervanLife.com – day 4 – Pre-import checks and theme selection

This is the first post in a multi-part series where I document the rebuilding and promotion of an existing website. Find out more

Pre-import

The pre-import went pretty well.  I had to add author and comments to several of the post types to preserve the data from the Drupal site.  All of the posts and comments imported straight into the new site.

There are a few broken posts types, such as the old photo gallery, and extra fields for member profiles.  I’ve established that I can get to this data in the old Drupal database, and will fix that when I add those features to the website.

Themes

Hmm, now I have to select a theme.  There’s a lot to consider.

Let’s run through some popular features, and see how I feel about them (roughly top to bottom):

  • Header – Important to have an advertising banner in the header.  A sticky header would also be good.

First, let’s look at the logo, as this will help to give context to the design

 

Campervan Life logo, in blue

 

I’ll run through the options

AlleycatThemes

The premium theme company that I ran.  Surely I would dog-food my own themes?  Nope.  Those themes were amazing at building pages, brochure websites.  They had lots of options, and custom page builder (Visual Composer) components.  There was a lot of code, much of which needed re-writing.  Too bloated.

Something from ThemeForest – Nope.  Too bloated.  I am sure there are some great themes on ThemeForest, but I just don’t have the confidence to use one.

Homepage


https://demo.tagdiv.com/newsmag/ – Feels narrow and cluttered.  Some good features.

Homepage


http://demos.cubellthemes.com/?product=wp15zine

ElmaStudio – http://www.elmastudio.de/en/themes/

Converting my Travel Blog from Drupal to WordPress

Before I start the mammoth task of converting www.campervanlife.com from Drupal to WordPress, I thought I’d try the same process on a smaller site, my travel blog www.itravelabout.com.

Of course, like everyone else, I thought I would start a travel blog, make loads of money from it, and travel forever.  That didn’t happen, but the blog does serve as a great diary for my trips.  It’s nice for me to use it now to look back over the years, and I’m sure it will be even more important for me in the future.

WordPress is definitely the best CMS for this blog, as I want it to be very easy to use, easy to update, and easy to manage photos.

So here’s what I did.

1. Take full backups, as always

I took a full file and database backup of the live site.  Although I wont be changing the live site, just eventually taking it offline, you can never fully anticipate what will happen, and so taking full backups as the first step is vital.

2. Researched current migration options

A year or two ago I found a script on GitHub that someone had created for migrating Drupal (6 or 7) content to WordPress.  I thought this might be useful for me to migrate my sites and searched for it.  Strangely I couldn’t find it, but the top results for migrating Drupal to WordPress was a number of plugins.  Two to be precise: CMS2CMS and FG Drupal to WordPress.  They both have premium options, which I would need to buy.

Af first I thought I would write my own migration code, as that’s an area where I am strong in experience, but then thought I would give these plugins a try, as it will save me a LOT of time, and not cost me that much.

I consider both of the plugins, and they’re pretty similar, but ended up going for FG Drupal to WordPress as it seemed to offer more features and options.

3. Migration

I create a new WordPress website locally, installed the free version of FG Drupal to WordPress and gave it a try.  I copied the live Drupal website locally to reduce the import time.

The import went well, and I was impressed with the results.  The plugin told me I needed the premium version as I had custom content types.  Fine, it was only €50.

I bought it and re-ran the import.  Everything imported really well, pages, posts and comments.  There were a few other bits, such as a Story content type that was really just news, and so I converted those stories to Posts.

4. Problems found on the way

URLs

in Drupal a page (or post, or whatever) can have any URL, as long as its unique.  In WordPress things are not so flexible.

Using the Custom Permalinks plugin it’s possible to have more flexibility, but there are still some constraints.  I’m flexible on the URL structure, but once the campervanlife.com import is done I suspect there will be many broken links from the old site.

I plan to audit every page, revising the content and images, and also the URL if necessary.

The excellent Broken Link Checker plugin makes it really easy find and adjust broken links.  I will also add 301 redirects to the .htaccess file.  Then I can use the 404 to 301 plugin to monitor the inbound 404 links, and address any that have been missed.

<!–more–> tags

I not set the Import summary option “to the content” and I was left with lots of <!–more–> tags and duplicate content in the posts pages.  I only realised this after it was too late.

So I wrote a simple script that went through, compared the content before and after the <!–more–> tag, and removed the duplicate content.

Broken links

There are lots of broken links in the site.  Some because external websites disappear and their URLs change.  Using the Broken Link Checker plugin I was able to find, amend or delete the pretty quickly.  I can’t imagine a similar plugin/module for Drupal. If someone had made it for Drupal, it probably wouldn’t work for my version, would be abandoned, or just simply wouldn’t work as well as the WordPress version.  That’s a major factor with the WordPress community: Pride. People car about what they are making enough to do a really good job.

The Broken Link Checker is also a great way of identifying spammy comment links and easily removing them.

Broken image

There were a lot of broken images, for various reasons.

Images uploaded and inserted via the Drupal media library still have their reference to the Drupal URL path.  So I simply upload all of the images using the old Drupal file structure:

e.g. http://www.itravelabout.com/sites/itravelabout.com/files/images/

 

Latest from the blog

View All
Social media & sharing icons powered by UltimatelySocial