NWDUG Unconference 2017: A Review

20th November 2017 - 9 minutes read time

For the past few months I have been organising an unconference event with †he other organisers of the North West Drupal User Group (NWDUG). An unconference is just like a normal conference, with the exception of the sessions. All of the sessions are selected on the day and then presented by the delegates. Thankfully, everything came together and on November the 4th at MadLab in Manchester we had 55 people show up for the day. Once we introduced the day and got some sessions on the wall we started out.

NWDUG Unconference 2017

Due to me organising and running the event I didn't get to see that much of the talks, but I was room monitor for the downstairs track and so saw a great collection of talks.

PHPNW17: A Review

10th October 2017 - 13 minutes read time

The PHPNW 2017 Conference was run over the weekend of the 30th September to 1st October at the Manchester Conference Centre and I went along to participate. PHPNW has now been going for 10 years and it looks like this will be the last (more on that later) but this year was just as good as ever.

BSides Manchester 2017

8th October 2017 - 7 minutes read time

I recently attended the BSides Manchester conference, which was held at Manchester Metropolitan University Business School on 17th August 2017. This was a security and hacking conference that was free to attend, but had a very limited number of tickets available. After missing the first two releases of tickets I managed to get one from the waiting list.

After some introductions we got started with the first talk of the day, which was Dominic Chell & Vincent Ylu talking about A Year In The Red. As a non-security professional I had to Google exactly what some of the terms in this talk meant. So apparently red team refers to a security consultancy who are hired to attack a system or network. Conversely, blue team is a security team that is resident within an organisation. A funny talk with some good demonstrations of hacking attacks.

DrupalCamp London 2017

12th March 2017 - 7 minutes read time

DrupalCamp London 2017 was held on the 4th and 5th of March at the newly refurbished main hall of City, University of London. The new facilities are really nice and keep the conference in the same area, but they aren't too small that it feels cramped.

Drupal 7: Update Field Definitions For Lists

17th November 2016 - 4 minutes read time

I had to update a Drupal 7 site recently and needed to change the field keys of a list field to be different values. This wasn't possible from within Drupal as it does a pre-check to make sure that the key doesn't already exist. If it finds any values present in the database with that key then it will reject the change. This is absolutely correct but causes a little bit of an issue when you need to update these values.

The solution to this is to alter both the field definition and the field data via directly altering them in the database. The following function provides a neat little way of doing this to a field by just passing in the field name and what the key values need to change to.

PHPNW 2016

6th November 2016 - 10 minutes read time

The 9th PHPNW was held on the 1st and 2nd of October 2016 and I was in attendance with around 400 people. The venue was the Manchester Conference Centre, which is where the event has been for the past few years. It's a nice place with helpful and friendly staff, lots of rooms, great food and even a good bar. After a quick introduction from the organizers Jeremy Coates and Rick Ogden) and a session from the platinum sponsors UKFast we started the conference proper.

DrupalCon Dublin 2016

4th October 2016 - 9 minutes read time

The European DrupalCon was held in Dublin from 26th - 30th September and I went along with a couple of colleagues to learn a few things about Drupal. I have been back from the conference for a few days now, and I wanted to write down some of the highlights of the conference in a blog post. There is a lot going on at DrupalCon and with 2000+ people, 3 full days of sessions, 2 tutorial days, multiple parties and over 10,000 cups of coffee consumed there is too much to write about here. So this will be a few random highlights and stand out moments of the conference.

Drupal 7: Redirect Users From Unpublished Content

9th August 2016 - 4 minutes read time

I was recently asked to implement a feature on a Drupal site where all nodes of a certain type would redirect to a main listing page if that node had been unpublished. The problem in doing this is that if a post is unpublished then Drupal will issue an access denied response quite early on in the boot process. When the menu item is loaded it goes through an access callback which sees that the post is unpublished and issues an access denied before anything else can happen. So in this situation you can't use things like Rules to redirect users as the rule is never triggered.

The solution was to use hook_menu_alter() to change the access callback parameter of the node page. We are essentially replacing the normal access callback of node_access() with our own version.

Drupal 8: Detecting An Anonymous User

28th June 2016 - 1 minute read time

To find out if the current user is anonymous use the following.

\Drupal::currentUser()->isAnonymous();

This can be used as part of an if statement like this: