Feeds

Author

Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough
Apr 06 2023
Apr 06

What is the difference between Drupal 7 and Drupal 10?

The biggest difference is that Drupal 10 has “backward compatibility”. Drupal 7 does not have this. In other words, Drupal 10 is able to use modules, customisations and data originally created for Drupal 8, with some minor alterations.

Because deprecated code needs to be deleted, Drupal 10’s code is clean, the platform itself is nimble and this results in excellent website performance.

Drupal 10 is user friendly, easy-to-use, versatile and scalable. Some more technical differences include a new theme engine called Twig (introduced in Drupal 8), which replaces PHPTemplate in Drupal 7.

Because Drupal 10 requires an up-to-date hosting environment with the most recent PHP database engine or key-value store, it is faster than Drupal 7.

Content modelling has been simplified, so Drupal 10 is great for content-heavy web applications. CKEditor, a new text editor, provides users with many WYSIWYG editing features that were previously only available through extensions.

CKEditor 5 is available in Drupal 10, and looks amazing! Other features are responsive images, improved multilingual capabilities, JSON:API and more modules out-of-the-box.

Mar 07 2023
Mar 07

3. Derivatives

Scaling your configurations can be made simple by using derivatives.

When you have a large number of migrations, with varying variations and discrepancies between sites that have slowly diverged over time, what you may need to do is define a base configuration to cover the commonalities, and then create a separate migration file for each variation which extends it. This allows you to run each of the individual migrations covering all the variations, but as the project scales and the number of variations increases, so does the number of YAML files – it can all get quite tricky to manage! This is where derivatives are extremely useful.

Derivatives provide a simple way to expand a single plugin so that it can represent itself as multiple plugins, and are used in other parts of Drupal, not just in migrations. To implement derivatives, you just need to add in an extra line in your YAML file to define the path to the deriver plugin you want to use. This causes your YAML file to become a definition of a base plugin and then it’s up to the deriver to take this base definition and generate lots of copies.

The end result is that we end up with lots of migrations that operate and behave the same as normal non-derivative migrations, but rather than multiple YAML files to maintain covering all of these migrations, there is just one base YAML file.

This is a huge time saver when it comes to creating, or later tweaking the migrations. You can just edit the variations in one central location, and avoid having to edit multiple YAML files when you need to change something later.

The derived migration machine names are a bit different from what you may be used to. They take the format of the base identifier, colon and derivative name (base_identifier:derivative_name). For example, if you have a migration for the “page” content type and create a derivative for each site in a multisite, then the derived migrations could have names like “node_page:site1”, “node_page:site2” and so on.

Similarly a set of derived taxonomy migrations could be created as “taxonomy_term:tags”, “taxonomy_term:product_types”, etc. Other than this slightly different naming structure they are exactly the same. This article has the essence of how to actually use derivers: “Migrations can now be derived and executed after a specific other migration.”

Jul 01 2021
Jul 01

We're Platinum Sponsors!

With our Gold Sponsorship and contributions at last year's event, we are excited to announce that we've taken the plunge and will be Platinum Sponsors this year!

We're busy getting our papers submitted and hope to have a number of very insightful sessions throughout the conference.

As usual, we will be preparing and writing questions for "Trivia night". The Trivia event has been one of the highlights of DrupalCon for many years, ever since the first one at DrupalCon Chicago 2011!

Watch this space for further announcements about Annertech's speaking engagements and other contributions for what is going to be an event not to be missed for all things Drupal.

Jun 02 2021
Jun 02

1. Scalable across multiple departments

With numerous departments, research groups, student organisations and other entities comprising a university, it can be a struggle for higher education institutions to maintain governance and keep track of the hundreds of adjacent sites that may involve.

Fortunately, Drupal provides two options to enable higher education institutions to centrally manage and control the brand while still giving content independence to each department.

First is Drupal's multisite feature, which makes it possible to run as many sites as you wish on the one Drupal installation, each with their own database and sets of users. These individual sites can share code, components and themes providing better reusability across different websites. 

An alternative to this approach is to use the Group module. This extension allows you to create arbitrary collections, or groups, of content and users within your site. Here a group is created for each department or group, and editors then assigned to one or more groups. 

With one codebase, one database and the inability for configuration settings to vary across department "sites", the Group module provides even tighter governance controls to higher education institutions.

Both of these solutions reduce the time and cost involved in launching new sites, while also improving governance, brand consistency, and maintainability, and still offering autonomy to each department or group.

Jul 10 2020
Jul 10

Thursday, 16th July, 18:15 - 19:00 (UTC)
Speaker: Christopher Torgalson
Track: DevOps & Infrastructure

In his session, Christopher will outline some of the most prevalent issues that make automated tasks less safe, secure, reliable, and performant. On the back of these learnings, he will then discuss how we can design better quality automation for ourselves and our clients.

As usual, we've been busy preparing and writing questions for Trivia "night". The Trivia event has been one of the highlights of DrupalCon for many years and at DrupalCon Global 2020, this is no exception - except this year, we will have teams from all around the globe! In addition, rather than it happening in the evening time, the event will be split across the three days of the conference. For more details on the times, see the conference website.

Jun 10 2020
Jun 10

What's new in Drupal 9?

With the release of Drupal 9, there are no major changes, no system overhauls, not even any new features! The only differences between Drupal 8.9.0 and Drupal 9 is that those deprecated APIs have now been removed, and a number of third-party dependencies (Symfony, Twig, etc) have been updated to newer versions which will be supported for longer.

This means that as long as you are already on Drupal 8, and have been keeping your site up-to-date, upgrading your site from Drupal 8.9.0 to Drupal 9 should be a relatively pain free process.

Are Drupal 7 and 8 still supported?

Yes, Drupal 7 and 8 will both be supported until November 2021, at which point both versions will reach their end-of-life (EOL). It is highly recommended that you upgrade to Drupal 9 before then. After this date, these versions will no longer be supported by the Drupal Security Team which means no future security patches or bug fixes will be released for these versions.

This is the first time that two major versions of Drupal will become unsupported at the same time. The timing of Drupal 8's EOL has been planned to coincide with the EOL of one of its third-party dependencies, Symfony 3. As the upgrade path from Drupal 8 to Drupal 9 is so simple, it is unlikely that any extended support will be available for Drupal 8 beyond this date.

Drupal 7 is a different story though. There will most likely be a small group of approved third-party agencies who will provide long-term security support for Drupal 7, for a fee of course, for those organisations which are not ready to undertake an upgrade just yet.

However, there is still a year and a half before they reach their end-of-life, so there is plenty of time to upgrade your site - you just need to start planning for it now.

Upgrading from Drupal 8

If you are using Drupal 8 already, then the process of upgrading to Drupal 9 is relatively seamless and pain-free.

  • The first step you should undertake is to ensure that you are running the latest version of Drupal 8 and any contributed modules you may be using.
  • Use the Upgrade Status module to check whether your custom code and contributed modules are Drupal 9 ready.
  • If any contributed modules are not Drupal 9 ready, then check their issue queue and work with their maintainers to remove deprecated code.
  • Remove deprecated APIs used in your own custom code too. The Rector module can assist in resolving these automatically.
  • Lastly, make sure your hosting environment is compatible with the updated requirements of Drupal 9.

At this point you should be ready to upgrade to Drupal 9! Of course, as with any upgrade, we recommend taking a backup and testing it in a non-production environment first.

Upgrading from Drupal 7

There is no upgrade path from Drupal 7 to Drupal 8, or indeed Drupal 9. Essentially your site will need to be rebuilt from scratch and any content you want to retain migrated into the new structures. While this is a large undertaking and may seem a bit daunting, it's also a huge opportunity.

Drupal 7 was first released in January 2011. By the time it reaches its end-of-life in November next year, it will be over 10 years old! That's 10 years of no new features, other than what can be provided by contributed extensions. Ten years is a long time in the life span of any software, but particularly so in the online digital space, where technology advances rapidly.

Upgrading to Drupal 9 is the perfect time for you to re-evaluate your online digital strategy, to re-assess your messaging and positioning. It's a time to enhance and improve your customers' experience online. It's a time to take advantage of the new innovations and features released on the platform every six months.

At Annertech, we deliver ambitious digital experiences for our clients, and with Drupal 9 we know we have the ideal digital experience platform to deliver on that aim.

Isn't it time you started planning your upgrade now?

Oct 06 2017
Oct 06

We were also privileged and honoured to have the opportunity to present five sessions ourselves, and of course, we once again played host to the Drupal Trivia Night. There was a lot going on, and it was a fantastic week, but here are just some of the key moments I experienced during the week.

Monday Summits

For me DrupalCon Vienna started with the Business Summit on the Monday. I had great difficulties in deciding whether to attend the Community Summit and the Business Summit, and while I still think I missed out on some very interesting discussions that happened at the Community Summit, the Business Summit still didn't disappoint. There we had great sessions and discussions on topics such as marketing and collaboration. In the afternoon workshop, we split out into groups based on our organisation size, which proved much more useful than past summits where the groups were based around topics.

Tuesday

Alan with his new Acquia Developer Certification

Unfortunately I didn't make it to the prenote on the Tuesday morning, but really enjoyed Dries' keynote, where he re-affirmed something I had already come around to believe - that Drupal is not for simple sites, but instead for sites or digital experiences that require a certain level of customisation or flexibility.

Mike had his session after the keynote on "Estimates are dead, long live forecasting!" which went well, though I was disappointed to have missed the start of it as I was too busy chatting to people! My session on "Lessons Learned from Building a Large Multilingual, Multi-region Site in Drupal 8" was in the afternoon, for which I had a full room and there was a good level of interest and good conversations afterwards. With my session out of the way, I was able to focus on enjoying the rest of the conference a lot more - oh yes, and finishing the trivia questions too!

On Tuesday night, we had a number of different things to celebrate, but one of them included Alan gaining his Acquia Developer Certification. Congrats Alan! 

Wednesday

Two more Annertechies were speaking on Wednesday, Andrew on "Core Accessibility: How are we doing, and what can we do better?" and Mark on "Back to the Future: No More Static Mockups!". Unfortunately I missed Mark's session as I was taking part in various meetings and BOFs on deciding the process for licensing DrupalCon Europe in 2019, and also what could be done to organise a major Drupal Europe 2018 event.

For me, Wednesday wrapped up with the annual Drupal CEO dinner, with great food and great conversation with a diverse group of people from Europe, the US and further afield. It really was a great evening, and I would have liked to have stayed longer but those trivia questions weren't going to write themselves!

Thursday

Thursday saw the last Annertech session given by Anthony on "Live Performance Workshop: A top-to-bottom performance overhaul", which for those of you who missed it, will also be at the upcoming Drupal Camp Dublin on the 20th and 21st October. I also took part in the Drupal marketing sprint, which saw people come together to create tangible marketing collatoral by the end of the four hour session. One of the key outcomes of it was the initial mapping of a Drupal buyer's journey, and the start of a blog post / showcase of publishing websites built with Drupal. It was a great initiative and one I hope will continue on.

Anthony speaking at DrupalCon ViennaAnthony speaking at DrupalCon Vienna, photo credit to Dominik Kiss

Of course, no DrupalCon would be complete without the (now) traditional Trivia night. It was a really fun way to wrap up the conference, and yes, I did get the questions finished in time! However, organising trivia night is a lot of work, so if anyone out there wants to get involved and help me write the questions for each trivia night, please do get in touch!

Crowd gathered for Trivia night at DrupalCon ViennaPhoto credit to Dominik Kiss

Highlights from the team

However, I wasn't the only Annertechie to make it to DrupalCon, so I asked the team to give me their top highlights from the conference, and here's what they said:

Mike

"There’s still something really useful about having the whole team at the same conference as well as having the ability to hop across session boundaries and see something you wouldn’t go to a topic-specific conference for".

Anthony

"Comment _why_, not what. That was my key take-away from the conference, thanks to a session by Commerce Guys. When documenting a function in code, the `what` of a function may change, making the comment outdated, but the `why` or the problem the function is fixing will most likely remain, and that is what should be documented."

Andrew

"There was a great birds-of-a-feather session about redesigning Drupal's admin interface.  It was great to have so many stakeholders together to talk about the scope of this idea, and it felt like a kick-off meeting for something ambitious. It was the first time I've been present at the start of a big project inside Drupal core, and it's going to be interesting to see how this gets refined into a plan."

Mark

"It’s humbling to experience the amount of knowledge that is floating around the convention centre, being freely shared to solve some very complex issues. From my point of view, it was great to get direct access to core committers and maintainers about some issues that might arise during our development of the Out of the Box initiative."

Alan

"If you want to improve as a developer you need to see what the best in the field are up to.  Reading blog posts will only get you so far - there’s no substitute for meeting the experts in the flesh and picking their brain"

Ricardo

"From a designer point of view the `CSS-in-JS: unexpected lessons for Drupal component design` session was my favourite session, with the highlight being the confirmation of what I already believed - that component based design is the way to go."

Gavin

"For me, the session on "Automatic Drupal Updates using Visual Regression & Continuous Integration" was fantastic, with my key takeaway being how to use automation to add value for your clients."

To wrap up - we all learned too much, met too many great people, had too little sleep, and are looking forward to doing it all over again at Drupal Europe 2018 - wherever that may be. Thank you DrupalCon Vienna!

Sep 25 2017
Sep 25

Estimates are dead, long live forecasting!

Tuesday, 26th September, 11:20-11:45

Speaker: Mike King
Track: Project Management

In his session, Mike will outline the good, the bad and the downright wasteful aspects of estimates and how they’re used, before contrasting it all with the positive benefits of using forecasting to communicate a range of outcomes and how this can be communicated with the wider team. There will also be a follow-up BoF to share open source tools so that everyone can take home this new set of skills.

Lessons Learned from Building a Large Multilingual, Multi-region Site in Drupal 8

Tuesday, 26th September, 14:15-15:15

Speaker: Stella Power
Track: Site Building

Thinking of adding multilingual functionality to your Drupal 8 site? Then this is the session for you. Here Stella will take you through the fundamentals of configuring your content to be multilingual and the various pitfalls and lessons learned along the way.

Core Accessibility: How are we doing, and what can we do better?

Wednesday, 27th September, 10:45-11:45

Speakers: Andrew Macpherson (and Théodore Biadala and Kristen Pol)
Track: Core Conversations

In Drupal core, we've been making great strides incorporating accessibility best practices into the UX and markup. It’s not only important to help increase Drupal product adoption in some markets (e.g. the public sector) that have strict accessibility requirements, but accessibility is important to make Drupal sites reach the most people with varying backgrounds and abilities. This can be good for business. It is certainly good for our humanity.

Back to the Future: No More Static Mockups!

Wednesday, 27th September, 15:45-16:45

Speaker: Mark Conroy
Track: Front End

This presentation will be an easy-going rant about how to make things better for frontend developers and will start by taking a look at Photoshop, SketchApp and InVision and how these tools fail to deliver. We will then move on to talking about designing in the browser and how tools such as PatternLab and Fractal can help solve these problems. Finally, we'll look at how we can (easily) integrate PatternLab with Drupal, thereby going 'Back to the Future'.

Live Performance Workshop: A top-to-bottom performance overhaul

Thursday, 28th September, 13:00 - 13:25

Speaker: Anthony Lindsay
Track: Performance and Scaling

Come participate in an interactive performance workshop. Here you'll get to view a broken site and all the awful performance blunders that were made, and more importantly how to fix them.

There's a brief overview of each of our speaking slots. Be sure not to miss them, and don't forget to come say hello to us afterwards!

Photo credit: Franz Jachim

Jan 09 2017
Jan 09

One of the ones that seems fairly stable and has a good set of features without being overly complex is the Geolocation Field module. We've used it on a site recently with great success, and in this blog post we will cover the fundamentals of how to use this module.

Add a Geolocation Field to your Content

After enabling the module, the first step you need to do is add a geolocation field to the entity you want to associate a location with. Locations are stored as latitude and longitude value pairs on the entity. This can be any entity type, but for the purposes of this we chose to create a Location content type and add a geolocation field to that.

The default configuration for new geolocation fields is to provide latitude and longitude text boxes on the node edit form. This may be suitable for some sites, but we needed the ability for the user to enter in an address which is then geocoded, and to be able to adjust the pin location if the calculated co-ordinates were incorrect (as is often the case with Irish addresses).

Luckily, the geolocation field module provides this functionality out of the box. On the "manage form display" page in the entity configuration, you can choose the type of input widget the editors will use. The "Geolocation Google Geocoder" is the option you need. You may want to configure your Google Maps API key at admin/config/services/geolocation if using this option however.

Geolocation field - manage form display settings

Similarly, the module also provides a number of options to choose from on the "manage display" page. In our case we chose to display the location on a Google map, rather than outputting the latitude and longitude values.

Geolocation field - manage display settings

After selecting the "Geolocation Google Map" display output, you can then customise its display. For example, you can choose between a Road Map view and Satellite Map view, set the map zoom level, disable/enable various map controls and dimensions.

You can now create your Location content and associate a latitude and longitude with each. Below is a screenshot of what the edit form can look like. Here we have manually entered in an address and the Google geocoder has calculated the latitude and longitude from that. Note, it's not possible to drag and drop the pin to a different location (which caught me out a few times), instead clicking anywhere else on the map will move the marker there.

Geolocation Google Geocoder widget

Create a View

After adding all of our mapped locations, we needed the ability to display them all on one Google Map view. To do this we created a new view of our content, and in the view format settings, we choose "Geolocation - Common Map". In order for this view format to work, you will need to add the geolocation field latitude and longitude co-ordinates to the view and a title for each location (which will appear in the popup). You can also optionally add an image field (make sure to choose the file uri output here) to the view which will be used as a marker for each location. This allows you to customise the marker per node.

Geolocation views format settings

Similar to the manage display settings on the node, you can also configure the map controls, zoom level, and so on. One other setting worthy of mention is the "JSON styles" setting. This allows you to embed a JSON encoded styles array to customise the look and feel of the rendered map. This is incredibly powerful and allows you to have a custom Google Map style that matches the design and colour palette of your site. Styled Google maps are easy to define using services such as Snazzy Maps.

The Results

Not everything we needed was quite there so we contributed a number of patches back to the module to make this happen, all of which have now been added to the module, yay!

Using the Geolocation Field module, we were able to map all our Location nodes and produce a map as can be see at the top of this article. If you want to see it in action, visit Glanbia Nutritionals.

Other Modules

At the time of launch, the only other modules that were available were Styled Google Map and Simple Google Maps. However, neither of these supported all the features we needed. Since then, a beta version of the Leaflet module has also been released. Have you used any of these or other mapping modules in Drupal 8? We'd love to hear what you thought of them. Why not let us know by leaving a comment below?

Jul 25 2016
Jul 25

Yesterday all the accepted sessions for DrupalCon Dublin were announced, and we are delighted to report that 5 of our 8 session proposals were accepted! With Acquia being the only company receiving more acceptances, we are extremely proud of our achievement.

Testament to our high standing in the Drupal community, we are the only Irish company speaking at DrupalCon Dublin. Our accepted sessions this year span a number of different tracks, namely Business, Horizons, Site Building, Being Human and Core Conversations, and cover topics from accessibility to remote working to building mobile apps with the Ionic framework. Congratulations to all our speakers!

Here's a quick run down of each session.

Building a co-lingual website - lessons learned from ireland.ie

Speaker: Alan Burke
Track: Site Building

2016 marks the centenary of the 1916 rising in Dublin, a pivotal year in Irish history, and is marked with a series of high-profile events commemorating the rising. ireland.ie is the official state website for the 1916 commemoration and runs on Drupal 7.

While English is the main language in Ireland, Irish is the first official language. A decision was taken to present both languages side by side wherever possible for the 1916 commemorations - including on the website. This session will focus on the unusual co-lingual [2 languages side-by-side] approach, and how Drupal made it possible. 

Choosing Drupal - insider advice from an Irish multinational

Speaker: Alan Burke & Aisling Furlong from Glanbia
Track: Business

Struggling to sell Drupal to clients? Ever wondered what goes into the decision making process when choosing a CMS?
In 2014, Glanbia selected Drupal as the CMS of choice for marketing sites. This session will outline the decision-making process used, and what Drupal agencies can learn when pitching Drupal. This is a joint session proposal between Annertech and Glanbia.

Bridging the PhoneGap: Getting Started Creating Hybrid Mobile Apps with Drupal and Ionic Framework

Speaker: Mark Conroy
Track: Horizons

With the advent of hybrid mobile apps, you can continue being a Drupal frontend developer and also build apps without needing to learn new technologies. The mobile web is quickly catching up with native apps. The mobile web is free, and open, and available to all of us right now and doesn't bind us to proprietary systems. With the many advances being made in this area, we can create great mobile experiences for users.

Future Directions for Drupal Accessibility

Speaker: Andrew Macpherson
Track: Core Conversations

Drupal has made great advances in accessibility over several major releases, and nowadays ranks as a leading implementation of web accessibility standards.  This session will encourage contributors to look ahead at future challenges and opportunities for accessibility during the faster 8.x (and 9.x) release cycle. 

Happiness is... remote working

Speaker: Anthony Lindsay
Track: Being Human

Many Drupal agencies have remote workers. Some are entirely distributed. Whilst remote working is beneficial to all concerned in so many ways, it does come with its own challenges. This talk will cover the journey I took when I moved from a typical 9-5 office job and joined Annertech, which is an entirely distributed Drupal agency. It will highlight the challenges I found: the good, the bad, the funny and the downright surprising, and offer as examples, my experiences for staying happy and healthy in what has the potential to be an isolating environment. 

Congratulations to Alan, Anthony, Andrew and Mark on their great achievement. We look forward to seeing these and all the other great sessions at DrupalCon Dublin in September. Hope to see you there!

Jul 23 2016
Jul 23

Ever since Andrew joined Annertech, he's been a champion of accessible web design and has ensured that accessibility has remained a key focus area in everything we do. That combined with his dedication to open source and contributing back to the community, meant that we were not surprised when he was asked if he'd be interested in becoming a Drupal core accessibility maintainer.

Andrew is truly passionate about accessibility and has increased the knowledge and awareness of issues encountered by people with disabilities for all members of our team. We can not think of a better candidate for a new Drupal core accessibility maintainer.

His response when asked to be a Drupal Core maintainer?

I was really stoked when Mike asked if I'd consider becoming a core maintainer. I have barely stopped bouncing around my home.

Congratulations from everyone in Annertech Andrew!

Oct 15 2015
Oct 15

Last month, not only did we announce that DrupalCon is coming to Dublin in 2016, but five more of our developers became Acquia-certified, myself included!

It was an interesting experience. I took the Backend Drupal Specialist exam and having not done much in the way of active hands-on development in the last year, was a little bit nervous going in. However, it turns out my skills aren’t as rusty as I might have thought, so I’m dead-pleased about that, and especially relieved that I aced the security and community sections.
 
The exam contains 60 questions and was 90 minutes long. A number of the questions were quite long, and a bit wordy, and needed reading a few times, but despite that I found 90 minutes was ample time. However, I do think that the question text could be made clearer and simpler, especially in light of the fact that not everyone’s first language will be English.

I was also a bit disappointed that there were no questions in relation to accessibility, but perhaps something related to that topic features in the Front End Drupal Specialist exam where it might be more important.

I have to say I’m really proud of my team, who all passed with flying colours. We now have six Acquia certified developers on the team and have every Acquia certification covered. If you check on the Acquia Registry, you'll see there are now six Irish-based Acquia-certified Drupal developers, and five of them work with us. Our other Acquia-certified Drupal developer, Andrew, is based in the United Kingdom.

Kudos to:

  • Mark Conroy - Site Builder (Only person in Ireland with this certificate)
  • Gavin Hughes - Front End Drupal Specialist (Only person in Ireland with this certificate)
  • Anthony Lindsay - Drupal Developer
  • Tommy Lynge Jørgensen - Backend Drupal Specialist (First person in Ireland with this certificate)
  • Andrew Macpherson - Backend Drupal Specialist
  • Stella Power (me!) - Backend Drupal Specialist

Well done everyone! Way to go!

Sep 28 2015
Sep 28

I’m writing this while sitting on the plane on my way back to Dublin and thinking about events of the last week. As I’m sure you’re all aware by now, DrupalCon will be coming to Dublin next year. We’re completely ecstatic about playing host to DrupalCon and excited about what this might mean for Drupal and the Irish Drupal community.

DrupalCon Dublin is going to be held in the new, state-of-the-art Convention Centre on the banks of our River Liffey. Located in the heart of Dublin city, you will be within walking distance of all the shops, pubs and restaurants. 

Dublin is a fantastic city to come and visit, and we would encourage those of you travelling to the conference from overseas to stay a little longer and come see some of the sites, soak up the atmosphere and culture of Dublin and perhaps travel a little further afield and visit some of the beautiful scenic areas outside of Dublin too.

There’s lots to go see and do, from visiting the Book of Kells in the historic Trinity College Dublin, to enjoying a traditional game of hurling (check out this short video clip), to joining the locals for a pint of Guinness. Sure, while you’re here why not get a tour of the Guinness Storehouse too or perhaps the Jameson Distillery.

If you fancy taking a trip outside of Dublin, well then I would recommend visiting Newgrange, a prehistoric passage tomb, or the monastery ruins in the picturesque Glendalough, both day trips from Dublin. If taking a tour of Ireland, I’d also recommend visiting the Giant’s Causeway in Antrim or the Cliffs of Moher in the beautiful and unique Burren landscape.

We have a very active Drupal community in Ireland, holding regular monthly meetups in Dublin, Galway and Belfast, as well as twice yearly Drupal camps. Having organised Drupal Dev Days in Dublin back in 2013, we realise how much work goes into organising international events such as this. And while I’m sure it will be challenging at times, we’re looking forward to taking it on and making this a DrupalCon to remember. If nothing else, we’re looking forward to taking Drupal Trivia home and making it the best Trivia Night yet!

Come join us for DrupalCon Dublin next year - you won’t regret it!

Aug 31 2015
Aug 31

Continuing in our series of integrating CRMs with Drupal, we're now going to take a look at CiviCRM, an open-source, web-based CRM aimed at charities and non-profits which integrates closely with Drupal, Joomla and WordPress.

On a first look, it appears as another Drupal module and is downloaded and enabled in much the same way. However, it's really an external system that sits within Drupal. Often this leads to confusion as it doesn't behave and act in the same way as normal Drupal modules. It also doesn't work well with Drupal's theming layer and provides its own Smarty based templating engine.

Out of the box, CiviCRM comes with a lot of features, including nice deduping contacts functionality and a mail merge. Other features include:

  • Contact management
  • Event forms and registration management
  • Donation forms
  • Mailing lists
  • Petitions
  • Membership management

While aimed at charities and non-profit organisations, it can be customised for commercial applications. However, it is quite a large or weighty program with all the functionality it provides and we've seen a considerable negative performance impact on sites using it.

Due to its close integration with the Drupal platform, it is not too complicated to extend it to integrate with other Drupal modules, such as Webform, Ubercart and Entities and I actually wrote the Drupal Commerce CiviCRM integration module. It provides a fair number of CiviCRM hooks and an API to facilitate this sort of integration.

We've used CiviCRM on a number of client sites, including a bi-lingual English-Irish one, where we had to translate a number of the CiviCRM interface strings into Irish and which resulted in me becoming the maintainer of the CiviCRM Irish translation

However, our experiences using CiviCM generally haven't been that good. We've found it difficult to maintain, upgrade and customise, which combined with the website performance penalty, has resulted in us switching to Drupal's fully native RedHen CRM instead. I'll be covering RedHen in more detail in a later blog post in this series.

Why not get in contact with us to discuss how we can integrate your CRM and website?

Aug 04 2015
Aug 04

Recently I wrote about integrating Salesforce CRM with Drupal. Continuing in the same series, the next CRM we’re going to look at is MS Dynamics from Microsoft.

Unlike with Salesforce, there is not a plethora of modules offering integration with Drupal. In fact, there’s not even one! Okay I’ll admit, there’s one relatively new module which is still in development and not usable yet - MS Dynamics Client Connection.This seems largely due to the fact that the API is highly dependent on the data structure of the CRM itself, and as the configuration of each CRM instance is usually bespoke to the individual organisation, it leaves little to nothing that can be re-used in a generic Drupal integration module. In addition, Microsoft offer their own CMS option so are a bit reluctant to offer integrations with other systems.

On the MS Dynamics integration projects we have worked on, the client usually has had MS Dynamics specialists on board for the setup and configuration of the CRM (always advisable for any CRM project in my opinion). As well as the CRM setup, they can also provide an intermediate API layer between the website and the CRM. This abstracts the data structure and provides a simpler interface to interact it, removing the need for in-depth knowledge of the CRM structure.

The custom APIs we’ve worked with are normally SOAP or REST based, and again as they are custom to the CRM instance being integrated with, we’ve written custom modules to handle the integration and have been unable to contribute anything back to the wider Drupal community. 

However, much like the Salesforce Webform Data Integration we’ve taken to allowing the client to define the mappings for webforms through the webforms UI. Unfortunately, most other mappings have had to be defined in code, but by allowing clients choose which API method to use for webforms and the mappings to use for each field, we’ve been able to provide clients with the ability to create new forms and integrate them with the CRM without the need for developers in the majority of cases.

Again similar to what we do with our Salesforce integrations, we’ve also implemented error handling and tracking to ensure no data ever gets lost. Filterable reports allow the client to check whether any submissions have failed to make it through to the CRM, and why, and to resubmit them if necessary.

I'd be interested to hear how other people have gone about integrating MS Dynamics and Drupal. Do you also rely on an intermediate API layer? Or do you integrate with MS Dynamics directly? What have been your experiences?

Jul 27 2015
Jul 27

Recently, I wrote a blog post on the benefits of integrating your website and CRM, and Anthony followed up with another on the typical integration patterns you commonly see. Annertech have a lot of experience integrating Drupal websites with various CRMs, so this is the start of a new series on CRM integration where we will go into more detail on some of the more popular CRMs we’ve worked with. First up: Salesforce!

I first started integrating Drupal with Salesforce back in 2009 with Drupal 6 for Trócaire. Since then we’ve worked with it multiple times with both ‘web-to-lead’ integration and ‘two-way synchronisation’ integration, with both Drupal 6 and 7.

With ‘web-to-lead’ integration, the website acts as a data capture mechanism, generating leads for Salesforce. When a user submits a form on the website, the data is instantly sent to Salesforce and a 'lead' object is created. Whereas with the two-way ’synchronisation’ integration option, Salesforce remains the canonical data source, but the website can update Salesforce with the latest data captured, and can also pull down the latest updates from Salesforce to ensure the user always sees the latest version of the data. This is normally used in the case of managing membership details - so members can view and update their contact information online while administrators can modify them via Salesforce UI and both systems have the latest copy of the data.

SOAP vs REST

When we worked on our first Drupal-Salesforce integration in 2009, there was only a SOAP interface available when communicating with Salesforce. Since then they have brought in a REST interface, which offers some benefits over SOAP including the fact that it is  faster, more efficient and easier to integrate with.

Entities

The module landscape has also changed with Drupal 7. The powerful Salesforce Suite is still the go-to module for any Drupal-Salesforce integration but it changed drastically between Drupal 6 and 7. The main change is that it is now entirely entity driven. This means it will only create or update records in Salesforce when an entity is created or updated. This is great for updating Salesforce with new users, new commerce shop orders, or any other Drupal entity you may have on your site. However, this means that webforms submissions are not supported, which I’ll discuss in more detail shortly.

Salesforce Suite provides a number of hooks you can leverage to manipulate the data before it gets sent/received, as well as hooks for altering the mappings and other useful integration points. The main one we availed of was hook_salesforce_push_params_alter() which allows you to alter the data that gets sent and add additional mappings. I found this one particularly useful for conditional mappings - e.g. if the data that gets sent for a mapping varies based on the data entered or a combination of values entered.

Salesforce Suite supports both push and pull integration, so it is suitable for web-to-lead and two-way synchronisation. In such instances, the module will pull down the latest version of the data from Salesforce. This pull operation is usually triggered in some form, for example a user goes to edit their profile, or renew their membership, etc. However, it could also be triggered on a periodic cron run. Whatever you use to trigger it, just be sure not to issue too many API calls as you’ll just slow down the site and probably upset the folks at Salesforce! Once triggered, the associated entity is updated with the newly fetched data.

Webforms

The reliance of the Salesforce Suite module on entities posed a number of problems for us however. Most sites we create have a number of webforms, from lead generation forms to ‘volunteer with us’ type forms and donation forms. For new sites, there is an alternative to the webforms module: Entity Form. With the Entity forms module, every time the form is submitted a new entityform submission entity is created. As it’s an entity, there is no problem using the Salesforce Suite module to send the submitted data to Salesforce.

However, it’s not always feasible to use the Entity Form module. This was the case for us where we had an existing site with a large number of webforms already in place, including one that used the Pay module for processing donations. Instead we opted to use the Salesforce Webform Data Integration module. Unfortunately this doesn’t integrate with Salesforce Suite and uses the old SOAP interface, so you will have to configuration the Salesforce credentials twice and in potentially two different ways. There is a patch in the issue queue which integrates the two modules to avoid this issue, and there’s a few other patches from the issue queue that you will need too.

There is an older Salesforce Webform Integration module maintained by myself for Drupal 6, but it relied on the old non-entity driven Salesforce Suite architecture and so I’ve deprecated this in favour of Salesforce Webform Data Integration module. Other Salesforce-webform integration modules have been released since and have matured over the past couple of years that I have yet to try. Given the current lack of activity on the Salesforce Webform Data Integration module, these might be worth considering for newer projects, but Salesforce Webform Data Integration is still the one most actively in use. There’s a good comparison of these quite similar modules on drupal.org which is worth a look before choosing which module to use for your project.

However, one of the nice features about the Salesforce Webform Data Integration module is the ability to configure, on a per-form basis, whether that form should send data to Salesforce and then on a per-field basis configure which fields in Salesforce the data should be mapped to. We found this particularly useful when the client wanted to be able to create new forms and manage the mappings themselves without having to come back to the developers.

As this module works with webform submissions, and not with entities, it only supports web-to-lead integration. If the data in Salesforce is updated, there is no way to update the website with the latest changes.

It also provides a number of hooks including hook_salesforcewebform_data_alter(), which similarly to the Salesforce Suite module hook, allows you to manipulate the data before sending it to Salesforce, for example, we had to change the single on/off checkbox values from 1 and 0 to TRUE and FALSE.

Resilience

One of the features all of the Salesforce modules seem to be lacking, and most external-CRM integration modules for that matter, is the ability to record which transactions have made it through to the CRM successfully.

On all external CRM integrations we’ve had to implement, I think we’ve had to maintain a custom logging mechanism to track which submissions to Salesforce have made it through and which ones have failed, and if so, with what error. For example, sometimes submissions can fail to get through if there is a problem with the data (like the 1/0 vs TRUE/FALSE issue mentioned previously) or if there was a network issue that prevented it reaching Salesforce. To implement this functionality we were able to use hooks like hook_salesforcewebform_submission_pre_send() and hook_salesforcewebform_submission_post_send() to record submissions sent to Salesforce, and then update their status afterwards.

We’ve also provided a user interface for the client to find submissions that failed, and they can either force it to reattempt the submission, or wait until it attempts it again on the next cron run.

So, that's a short introduction to some of the technical side of implementing your Drupal website with a Salesforce CRM. If you think your organisation could benefit from some of our knowledge in this area, why not give us a call on 01 524 0312 or drop us an email at [email protected].

Jun 17 2015
Jun 17

Every organisation needs a CRM (C. Relationship Management) system, no matter how large or small that organisation is. Whether the C stands for Customers, Clients, Constituents, Contributors or other Contacts, organisations need to manage their contacts and keep track of their interactions with them.

So you have a CRM, excellent! However, a CRM is only as good as the data it receives. Many organisations fail to integrate their website with their CRM, having never realised the benefits they could receive by doing so. However, integrating the two systems can bring a lot of added value to your organisation. Here are seven reasons why you should integrate your website with your CRM system.

1. instantaneous and access to up-to-date data

For me, the number one benefit you gain from integrating your website with your CRM is having instant access to the latest data. Automated integration between the website and your CRM is seamless and in real time. There's no more questioning the accuracy of the data, or wondering if yesterday's or last week's website orders have been added to the CRM yet. This is hugely beneficial when it comes to talking to a customer as you know, with confidence, all the details of their most recent purchase or other interaction with you, and that can only lead to improved customer satisfaction and increased sales.

2. Reduced administration overhead

If your website and your CRM don't talk to each other, then you're probably spending an inordinate amount of time either exporting it from the website and then importing into the CRM, or worse yet, manually copying and pasting the latest order (or other) data from your website to the CRM, or worst of all, not capturing that data in your CRM at all!

By opting for an automated integration between the two systems, you're reducing your administration overhead (and hence saving both time and money) as all that manual copy and paste, or export and import, is removed. This leads to increased productivity as it frees up your staff to work on other tasks.

3. Single (accurate) data source

Another time saver for staff is where, by integrating your CRM with your website (and other sales or contact point systems), you end up with just one single accurate data source on each contact. Just think, what would having one master record on each customer or potential lead (with no duplicate data) mean for your sales or fundraising team? For a start, it saves them time as they don't have to check multiple systems to get a full picture of the customer.

In addition, because there is no manual human element in adding the data to the CRM, there is less chance or errors being made or duplicate records created. As well as that, it is likely that more data is captured, and by consolidating all that data into one place, a more complete and accurate picture or profile of your customer is achieved, resulting in a higher conversion rate.

4. Better profiling

A key benefit of any CRM is the ability to profile customers or leads to determine what they might purchase, how valuable a customer they are, etc. The more data you have on a customer, the easier it is to create a better profile, and the more accurate the data you feed in, the more accurate the profile becomes.

By integrating your website with your CRM, you will get a fuller, more complete picture of your customers' interactions with your organisation, from initial enquiry to sales, communications and eventual feedback. It gives you access to more reliable and consistent information. You are better informed about your customers and you've better visibility of your customer's behaviour and buying habits.

Better customer profiles allow you to more effectively manage and target marketing campaigns and other activities, while the website integration enables you to track the effectiveness of these campaigns online through conversion rates and customer response.

5. Increased sales

I've touched on it a few times already, but integrating your website with your CRM should help you improve your organisation's sales. Essentially it comes down to one thing - more and accurate data leads to better profiles, which leads to better-quality leads which in turn leads to higher conversion rates.

Many organisations spend a lot of time and money on their websites, creating great content and adding forms for prospective customers to contact them. By integrating your website with your CRM, it shortens the sales process, as potential leads are in the system immediately after the initial contact, and it gives your sales team better data to work with, ultimately leading to better conversion rates.

6. Improved response time to queries

After a potential customer makes contact, for example they've requested a quote or further information about a product or service, your CRM can automatically assign the customer's query directly to the appropriate person or team. For example, the CRM could use the customer's location, industry, referenced product, etc as factors in determining the correct department or staff member to direct the query to. All of the necessary information can be captured via the website and sent to the CRM with the customer's query. The CRM can then automatically assign and alert the relevant staff member of the new message. This all results in a speedier, and more relevant, follow-up response to the customer, which, like a lot of the other benefits listed, leads to increased sales.

7. Customer churn is kept to a minimum

As a result of the improved response time to queries outlined above, lead follow-up is efficient and customers are happy that their query is being dealt with quickly and by the right person. Other small touches such as the automatic sending of an acknowledgement of receipt or a thank you email, can again make the customer feel happy that their query is being dealt with.

Through better profiling of customers, you can track customer satisfaction. Feedback received can be acted upon and dealt with. This is especially important for negative feedback, but just as useful to do for positive feedback. By dealing with a customer's complaints quickly and effectively, and by monitoring and reviewing general satisfaction with different aspects of your business, you can reduce your customer churn rates.

So that all sounds great, now what? Well, I guess first, if you don't have a CRM already, you will need to pick one. There are a lot of CRMs to choose from, including Salesforce, Microsoft Dynamics, SugarCRM, or even Drupal native CRMs such as RedHen and CRM Core. Ultimately though it will come down as to what you're going to use your CRM for and your budget.

If you already have a website and a CRM setup, then the next step is to determine the various interaction points between the website and the CRM. By and large, every form on your website will probably need to integrate with your CRM, though you could ignore some such as comment forms on blog posts. However, integrating your shop checkout, donation form, contact form or other lead generation forms with your CRM is vital.

With the integration points determined, you can then talk to your website developers about your requirements and start making the above seven benefits a reality.

Annertech have lots of experience in integrating Drupal websites with CRMs, including Salesforce, MS Dynamics, SugarCRM, CiviCRM, Goldmine and others. Over the coming months we will publish a series of blog posts on some of the more popular CRMs and how you might approach integrating them with your Drupal website, so stay tuned!  

If you have a Drupal website and require CRM integration, be sure to get in touch.

Nov 05 2014
Nov 05

We are delighted to learn that the Building Control Management System (BCMS) project that we built recently for the LGMA has been nominated for an Engineers Ireland Excellence Award.  

The BCMS project, which we built as part of the localgov.ie portal, provides a new centralised system for administering planning notices on behalf of all local authorities in Ireland. It has been very successful at streamlining services, reducing administrative burden and, ultimately, reducing public sector costs. So successful has it been that a similar approach is now being considered for other aspects of the LGMA's and local authority sector in Ireland's work in a very timely effort to streamline local government services and save money.

The BCMS project has been short-listed in the Technological Innovation of the Year award category. The 2014 Excellence Awards, which will showcase the very best Irish engineers and engineering, is on Friday 7th November in The Four Seasons Hotel, Ballsbridge.

The purpose of the Technological Innovation of the Year Award is to highlight innovative technological concepts created in Ireland or by an Irish engineer that clearly demonstrates a real impact on society and an actual or future contribution to the economy.

This award will be presented to the organisation or engineer which has demonstrated excellence in the field of technology (digital, software) and innovation in any area of business, healthcare, education or the arts.

Though we are up against some very worthy competition from "FixYourStreet" and "Assisted Domestic Robot", we are confident that the LGMA came up with the product of the year.

Of course, Annertech will be there on the night to wish the project every success.

Oct 17 2014
Oct 17

Worried about the different Drupal and SSL security announcements made this week?  Here's what you need to know.

Drupal SA-CORE-2014-005

On Wednesday, the Drupal Security Team released a highly critical security update (SA-CORE-2014-005) for Drupal 7.  If you have a Drupal 7 site that isn't on the latest 7.32 version, it is extremely important that you upgrade your sites or apply the patch immediately!

This isn't your regular Drupal security announcement, which, while still important to upgrade, may or may not affect your particular site.  This vulnerability affects every single Drupal 7 site out there.  And since the announcement, proof of concepts (PoCs) have been popping up on the internet.  

The vulnerability involved is a SQL injection vulnerability, which allows the attacker to send specially constructed messages to the site and ultimately can lead to arbitrary PHP code execution, access to all your site's and user's data as well as the ability to modify it.  What makes this particularly bad is this vulnerability doesn't require the attacker to already have privileged access to the site - any anonymous user can do it.  Thankfully there is a security release available and you can, and should, update today.  

If you host your site with Annertech, or are one of our support clients, then rest assured that your site is safe.  All vulnerable sites were patched within minutes of the announcement being made.

POODLE

However, #drupalsa05 isn't the only security vulnerability announced this week. POODLE is yet another.  It transpires that SSLv3 has a design flaw that allows the plaintext of secure connections to be calculated by a network attacker.  SSL is used to protect your information from access and modification when browsing sites over https, and now if you're using a browser over the same wireless network as your attacker, then you may be suspectible if using SSLv3.  SSLv3 is nearly 18 years old and newer, stronger versions are available.  The methods vary, but you can protect yourself against this vulnerability by disabling SSLv3 support in your browser configuration, depending on your browser version. IE6 on Windows XP for example doesn't support anything newer than SSLv3.

If you provide hosting services, it is also possible to protect your users being attacked too.  You can configure your webserver to disable SSLv3 and the steps vary depending on the web server or application being used.  Again, if you host your site with Annertech, we've already taken this precaution for you, otherwise get in touch with your hosting company to see what measures they've taken.

So, whilst the threats are severe, the fixes are simple. Make sure that your website is not open to attack.

Jun 30 2013
Jun 30

Another great day, and the final day, of Drupal Developer Days Dublin! The conference continued with more excellent sessions and, of course, sprinting.

There were a few sore heads after the party last night, but it didn't stop people turning up this morning for the first sessions at 9:30am. Yesterday saw two Annertechies presenting sessions, and today continued with another Annertechie session, this time from Anthony on "Maps and Openlayers". Unfortunately, I continued in my trend and didn't make it to this one either, as, during the final session of the day, I was busy wrapping things up and tearing down posters so we could be out of the building on time.

As it happens, it wasn't quite the final session of the day. I had to give one to wrap up the event, including sharing some final numbers on the event. As the slide above shows, there were:

  • Over 210 attendees
  • 24 sessions
  • 2 workshops
  • 1 job speed dating event
  • 120+ people sprinting, over 7 days
  • Over 120 commits to Drupal core, including 85 commits made on Irish soil
  • And many people (including me!) uploaded their first Drupal 8 core patch

Before I sign off this final blog post of the week, I really need to thank some people, without which I couldn't have organised this event:

  • Mike, Drupal Ireland chair and Annertech project manager, who managed my time both in work and on Drupal Dev Days, and who made sure I stayed on top of things
  • Conor, for organising all the tea/coffee, sandwiches and cake!
  • Edward, for taking the lead on the website development, design and for designing the t-shirts too
  • Eoin in DIT, for helping secure the venue in DIT - which they gave to us entirely for free!
  • Heather, for all her promotion and sponsorship wrangling
  • Gary, Louis and Paul for managing the t-shirt stand all weekend
  • Andrew, José and the numerous other volunteers who contributed their time
  • Gábor, chx, xjm and YesCT for helping promote the event and encouraging people to come

Thank you all for all your help, and thanks to everyone who came too. It's been a really great week, although an exhausting one! I'm looking forward to the next Drupal Dev Days, wherever that will be. However, for now, I'm looking forward to getting to sleep!

Thanks everyone!

Jun 29 2013
Jun 29

Day 6 of Drupal Developer Days Dublin, and Day 1 of the sessions, got underway today. Over 200 people are in attendance for this part of the conference, and there's a great atmosphere around the place.

There were many great sessions on today. Unfortunately I was running around for most of the day ensuring rooms were ok, wifi stayed up and the tea/coffee kept flowing, so didn't get to see many of the sessions. However, the couple of sessions I did manage to sneak into were fantastic, namely "Multilingual Drupal 8 - what to look forward to?" from Gábor Hojtsy and "Dependency Injection in Drupal 8" by Kat Bailey.

I didn't even get to two sessions given by my fellow Annertechies! Alan presented a session on the new templating system in Drupal 8, Twig, while Edward gave a session entitled "Think CSS" which looked at the history of CSS, gave an overview of writing maintainable CSS and its future.

Lunch today was sponsored by CommPress, and our caterers went that extra step further and added the sponsor's name and the #drupaldevdays hashtag to the packaging, which was a really nice touch. However, Conor had organised a special surprise for all the attendees - blue cupcakes in the shape of a Druplicon! They even turned your tongue blue :)

Following the sessions came the offical party (sponsored by Freistilbox) in the The Odeon bar just up the road. We had the whole of the top floor to ourselves, and they even put on a summer BBQ outside. Of course, the sprints continued with many coders returning to the sprint rooms after the start of the party fesitivies.

Last day of Dev Days is tomorrow, for which there should be some more great sessions, and some last minute patching ahead of the code freeze on Monday.

Jun 28 2013
Jun 28

Drupal Developer Days Dublin continues! Day 5 of the event saw even more people arriving and the start of the event "proper", with 2 workshops and our new "Job Speed Dating" event.

The day kicked off with the Community Tools Workshop, and then followed in the afternoon by the "Upgrading Your Modules to Drupal 8" workshop, which was actually so popular we had to move it to a larger room!

However, the main highlight of the day for me was the introduction of a new event at Drupal Dev Days - "Job Speed Dating". It's not your normal job fair type affair. Instead each of the companies looking to recruit, gave a 2 minute pitch from the stage and then prospective candidates chose which companies they want to chat with and took a time slot from each. They were then given 5-10 minutes to have a chat and exchange details. Employers can then follow up with the most interesting candidates later if they wish to talk further. Overall, it seemed to go quite smoothly with a number of sponsors taking part, including Annertech! Here's hoping some fruitful conversations were had!

T-shirts also went on sale today, with a variety of colours doing the rounds, depending on whether you're a sponsor, volunteer or attendee. Be sure to get yours tomorrow if you haven't already, they're selling quickly!

Drupal Dev Days begins in earnest tomorrow, with our first day of sessions. I can't wait!

Jun 27 2013
Jun 27

And the sprinting continues! Each day more and more people are arriving and again the sprints are continuing on into the early hours of the morning.

However, tonight I didn't join the sprinters - instead I went to the first official social evening of Drupal Developer Days Dublin, which was held in the Against the Grain bar on Wexford St. It was a really good night, with lots of new faces who just arrived in Dublin today ahead of the workshops tomorrow. It was a welcome break to step away from the laptops and event organisation and just go have a few drinks and enjoy each other's company.

Jun 26 2013
Jun 26

Drupal Developer Days Dublin is really under way now, with more and more sprinters arriving every day. There's a really fantastic buzz around the place.

The big highlight for me today was actually being able to find the time to do some sprinting! At the sprints last night I was able to work on some Drupal 8 core issues, but as the lead organiser of the conference, being able to find the time during the day and not having to run around sorting out various issues, is a big thing for me. It may not happen again during the conference, but I'm glad I got the opportunity to do so today.

Some of the issues I worked on were:

Fingers crossed I'll find some more time to sprint at this conference, but I'm not holding my breath :)

Jun 25 2013
Jun 25

Things were a bit crazy here today at Drupal Developer Days Dublin. Turns out there were some problems finding and gaining access to the sprint venue last night (I knew I should have gone along!). That combined with the fact that the venue not being able to stay open later than 10pm and some attendees wanting to sprint late into the night, a new evening sprint venue was called for.

As it happened, a new venue wasn't that tricky to find. I already had a list of backups from the other venues I'd researched in the preparation for Dev Days, so after a quick call and a little bit of anxious waiting, the Fitzwilliam Hotel on St. Stephen's Green came to our rescue. I really must thank Lorna in the Fitzwilliam for being so helpful and for sorting it out so quickly for us.

I'm actually writing this blog post from the new sprint venue in the Fitzwilliam and it's great. There's plenty of space and power strips, though the wifi is a little shaky on one side of the room, but I'm sure they'll be able to sort that out for us once we report it in the morning. The staff are very accomodating today.

Here's to another great sprint day tomorrow!

Jun 24 2013
Jun 24

Get ready, get set, GO!! After months of preparation, today marks the first day of Drupal Developer Days 2013 being held here in Dublin in the Dublin Institute of Technology (DIT) and organised by yours truly. Of course, there are many volunteers involved, including Mike, Conor, Heather, and others but more about them in another blog post.

For this first part of the conference, there are no sessions, with just full day code sprints from Monday to Thursday. It's the first time that we've held week-long sprints at Dev Days, and mainly driven by the API Code Freeze that's happening the day after Dev Days finishes - 1st July.

It's been a successful day so far, with almost 30 people attending the sprints, including a big turnout from the Multilingual Initiative team. There were some teething problems to begin with, mainly in relation to wifi, but the staff at DIT were amazing and got that sorted fairly quickly.

The sprints continue tonight in TCube which is a coworking space, but also provides space for meetups. Unfortunately I'm unable to attend tonight, so here's hoping they're able to find it ok!

Get your ticket now!

Mar 20 2013
Mar 20

We're delighted to announce that Annertech will be sponsoring the upcoming Drupal Developer Days 2013 being held in Dublin later this year. We've signed up as a silver sponsor and are really looking forward to the event.

Drupal Developer Days is an annual European event that brings together the people who develop, design and support the Drupal platform. The event will feature dozens of sessions and panels from some of Drupal's best contributors, providing developers and site builders with a chance to both learn and share their knowledge with other Drupal professionals.

This year's event is particularly special. Drupal Developer Days 2013 coincides with the final days of development prior to Drupal 8 code freeze. In light of this, this year there will be a week-long Drupal 8 core code sprint in the week leading up to the Drupal Developer Days event.

It should be a brilliant event, and there are only a limited number of sponsorship slots still available, so please help support the event.

Support Drupal Developer Days too!

Aug 27 2012
Aug 27

Following Greg Dunlap's (heyrocker) call for sponsorship funds at DrupalCon Munich, we at Annertech decided to do what we can to help.

Greg is the initiative lead on the Configuration Management Initiative (CMI), which is aiming to introduce a new configuration management system in Drupal 8. With CMI, configuration in Drupal will no longer be held in various tables in the database, but rather in YAML (YAML Ain't Markup Language) based configuration files. This will make it easier to do code driven development, and hopefully eliminate the need to use the Features module or write custom update hooks in order to deploy configuration changes.

CMI is something that Annertechies are eagerly awaiting and really want to see happen in Drupal 8. However, there is a long way to go before this dream will become a reality. As a small organisation, there is not much we can contribute in terms of developer time, however, we are committed to do what we can to help make this happen. So I'm delighted to announce, that Annertech will be sponsoring Greg for his work on the Configuration Management Initiative.

If you would like to help or get involved, please visit http://drupal8cmi.org.

Is there anything we can help you with?

Jul 12 2012
Jul 12

Encouraging your online shoppers to make donations just became easier! We recently released a new Drupal module, Commerce Donate, which allows visitors to your site to add donation products to their Commerce shopping cart.  

A donation amount widget is provided alongside the "add to cart" button, allowing users to choose from four pre-defined amounts to donate. In addition, we've added in an "other" option to allow them to enter in an alternative figure of their choosing. The default options can be overridden by enabling the Commerce Customizable Products module and editing the amount field on the donation line item type.

However, one of the nicer features of the module is the ability for the user to add a donation to their order in the middle of the checkout process! This way you can encourage users already committed to making a purchase, to donate to your organization. We're also working on a new feature which will make suggestions to the user to round up their order to the nearest Euro or 10 Euros (or dollars or pounds or whatever your unit of currency may be) as another way of encouraging users to give a little extra.

Apr 07 2011
Apr 07

Last weekend Alan and I both headed to the Galway for DrupalCamp Ireland. The camp took place in DERI which has hosted many previous Drupal Camps. It was great chance to meet fellow Drupal-ers and introduce some new people to the power of Drupal.

Alan and myself both spoke at the event. I gave a presentation about Sass and Compass. Anyone who attended the talk will know that I am rather enthusiastic about both these approaches to creating more maintainable (and beautiful) css. A few people came up to me over the weekend and said they were going to give Sass a try so I am looking forward to hearing how they got on. I also gave a talk about the Drupal modules Context and Panels. I also touched on project Bulter which is a project to provide a new 'context system' in Drupal 8. As someone who has done a lot of work as a site builder I am very interested in the different approaches to architecting Drupal sites in robust and maintainable ways.

Due to some late speaker cancelations Alan had to give quite a few talks at the Camp (I am surprised his voice was not gone by Sunday evening!). On Saturday he gave three talks. He spoke about Drupal deployment best practices using git, Javascript in Drupal 7, and optimizing front-end performance. There were a few nervous faces in the audience during the front-end performance talk as Alan Y-slowed various people's websites!

Alan also spoke on Sunday in his capacity as chairperson of the Drupal Association of Ireland. This was one of the most interesting discussions of the weekend. Everyone exchanged their ideas regarding the role of the Drupal Association of Ireland and the nature of future Irish DrupalCamps. As the day was drawing to a close we had to leave mid-conversation but the discussion is on going on at groups.drupal.org.

All in all it was a great weekend. It is a cliche to talk about how welcoming, supportive, and collaborative the Drupal community but it really is so much fun to be apart of. It was great to catch up with people you have not seen in 6 months and just geek-out. A big thank you to everyone involved! I can't wait of the next Irish Drupal Camp which will be in Derry sometime in the Autumn. Hope to see you there!

Mar 05 2011
Mar 05

DrupalCon Chicago is only a few days away and here at Annertech we're really looking forward to it. Alan and I are both flying out tomorrow and will be there for the week, allowing some extra time for sight-seeing and the code sprint on Friday. Both Alan and I are presenting at the conference. Alan and Randy have a session on Git on Drupal.org: It's easier than you think! and of course, my own one (with my co-presenter Jim Berry) on Coder: Upgrade your modules to Drupal 7.

Other highlights of the trip for me are going to the Welcome Party in the Field Museum, meeting an old colleague of mine from my Doolin Technologies days and, of course, the Drupal Trivia night on Thursday. This is actually an event the Drupal Ireland gang are organising. Many thanks to Conor, Síle and Deirdre for helping Alan and myself put together the questions. Word of warning, there are some tricky ones in there, so don't forget to study! We've even got a few prizes, including some Irish whiskey and Drupal Ireland t-shirts. Also major kudos to Tiffany and the rest of the DrupalCon Chicago team for all their assistance.

So here's to a great DrupalCon - we hope to see you there!

Jan 05 2011
Jan 05

Drupal 7 has finally been released! It took close to three years and lots of effort and contributions from the community to make this happen. This new release sees a whole load of new features and other improvements, from image handling in core to support for the semantic web through RDFa markup. Particular emphasis was placed on the user experience in this release, so both accessibility and the administrative user interface have been vastly improved.

In order to celebrate the release, the Drupal community are hosting release parties worldwide this coming Friday, 7th January. Annertech will be attending the two parties being held in Ireland, one at 7pm in the Longstone Pub, Dublin and the other at the Dew Drop Inn in Galway. Be sure to come along and join us!

Nov 14 2010
Nov 14

The next Drupal Ireland event is taking place on Saturday 20th & Sunday 21st November in Trinity College Dublin and will run from 9am to 5pm both days. Thanks to the generous sponsors, including Microsoft, Trellon and ourselves, the camp is being held free of charge with lunch being provided as well. You can now register for the event at http://www.drupalcampireland.org

Presentations in two tracks: White belt and black belt

The event will include presentations from experienced Drupal developers where people can learn more about Drupal, what it can do and how it can benefit both them, their careers and their organisation. There will be two tracks, so participants of all levels will be catered for.

  • White Belt track: For newcomers and beginners.
  • Black Belt track: For intermediates and experts.

Training - Drupal in a Day

The day before the camp (Friday 19th November), learn how to use Drupal in a day. This is perfect for people completely new to Drupal or those who have opened it up and scratched their heads. This training is designed to get you up to speed quickly and prepare you for the Drupal Camp the next day. The venue is provided for free by DIT and Engineers Ireland, while Acquia are kindly providing the material and training. For more details on the topics that will be covered and to sign up for the training, please go to http://www.drupalcampireland.org/training

About the Irish Drupal user group

This event is being organised by the Drupal Ireland user group - a volunteer membership group. The group is comprised of developers who use Drupal everyday; who contribute to Drupal core, documentation and maintain popular modules. More information on the event, including accommodation and the venue, can be found at http://drupalcampireland.org

Sep 17 2010
Sep 17

DrupalCon Copenhagen was a great conference. For me some of the highlights were:

  • Jeremy Keith's excellent presentation on HTML5
  • Meeting Sumit Kataria, and also his session on "Developing Apps for iPhone / Android using Drupal as a base system"
  • Jeff Miccolis's presentation on "For every site, a .make file"

There are quite a few sessions I wished I had got to, but unfortunately didn't, including Poul-Henning Kamp's presentation on Varnish, and Amitai Burstein's session on Organic Groups. Thankfully the videos will be online shortly, and with luck I might actually have time to watch them!

Anyway, major kudos to Mortendk, Isabella and the rest of the Drupalcon Copenhagen team on hosting an absolutely great conference!

May 23 2010
May 23

First of all a disclaimer, part of the intention of this blog post is to see if anyone else has a better solution. This is something I came up with but I'm not entirely happy with the solution as it involves running the sql query twice. :(

Recently I was working on a site which had some subscription content, where basically only members of the site were allowed to view specific content types. However in order to encourage site visitors to register we wanted to display a teaser listing of the 5 most recent articles. We created a node view to display the listing, but the Views module, appropriately, only displays nodes which the user has access to. As the subscription content is only available to logged in users, this defeated the purpose of our teaser listing for site visitors.

To overcome the node access checks, I implemented hook_views_pre_render(). This is a Views hook which is invoked after the SQL query has been run, but before the view has been rendered. It checks that the view it is modifying is called 'myviewname' and that the display is 'block_1' - you'd need to change these as appropriate for your view. The following code essentially rebuilds the SQL query and reruns it a second time, but this time without the db_rewrite_sql() call that causes the node permissions to be checked.

/**
 * Implements hook_views_pre_render().
 */
function mymodule_views_pre_render(&$view) {

  // For myviewname, bypass node access checks.
  if ($view->name == 'myviewname' && $view->current_display == 'block_1' && empty($view->result)) {
    // This does the views token replacements.
    $replacements = module_invoke_all('views_query_substitutions', $view);
    $query = str_replace(array_keys($replacements), $replacements, $view->build_info['query']);
    $args = $view->build_info['query_args'];
    $offset = $view->pager['current_page'] * $view->pager['items_per_page'] + $view->pager['offset'];
    // Runs the query a second time.
    $result = db_query_range($query, $args, $offset, $view->pager['items_per_page']);
    // Overwrites the default empty result set with the results from our 2nd sql query.
    $view->result = array();
    while ($item = db_fetch_object($result)) {
      $view->result[] = $item;
    }
  }
}
?>

While the above solution works, I would be interested in learning if there is a better way that avoids running the query a second time and without creating the listing in a custom module that is.

Mar 10 2010
Mar 10

One of the issues I encountered when migrating nodes to Drupal, using the migrate module, was that I couldn't associate nodes with more than one taxonomy term. Actually in this example, I'm migrating content from one Drupal database to another, so I'm going to assume everyone is already familiar with the database structure, specifically the node and term_node tables.

When I first started using the migrate module, I ran into a similar problem with migrating a user's roles. It's not possible to just create a Views relationship (aka LEFT JOIN) between the node and term_node tables using the node id. This will produce one row for each node and taxonomy combination, but the migrate module is only able to handle data sets that contain one row for each entity. With the above solution, I have more than one row for each node, which causes the migrate module to import the same node more than once, causing all sorts of problems.

Like with the user roles example before, we can overcome this by implementing a migrate hook, specifically hook_migrate_prepare_node().


/**
 * Implements hook_migrate_prepare_node().
*/

function mymodule_migrate_prepare_node(&$node, $tblinfo, &$row) {
  static $vocabs, $source_vocabs;
  $errors = array();

  // Get a list of vocabs in our target database.
  if (empty($vocabs)) {
    $result = db_query("SELECT vid, name FROM {vocabulary}");
    while ($vrow = db_fetch_object($result)) {
      $vocabs[$vrow->name] = $vrow->vid;
    }
  }

  // Set up per-node type specific stuff.
  $node_vocabs = array();
  switch ($node->type) {
    case 'event':
      // Here the 1 and 0 identify which are free-tagging vocabs and which aren't.
      $node_vocabs = array('Regions' => 0, 'Keywords' => 1, 'Topics' => 0);
      break;
     case 'news':
      $node_vocabs = array('Keywords' => 1, 'Topics' => 0);
      break;
  }

  // I have 2 database connections defined in my settings.php.
  // This statement allows me to use the source Drupal database for subsequent queries.
  db_set_active('old_drupal_db');

  // Get vocabs from our source database.
  if (empty($source_vocabs)) {
    $result = db_query("SELECT vid, name FROM {vocabulary}");
    while ($vrow = db_fetch_object($result)) {
      $source_vocabs[$vrow->name] = $vrow->vid;
    }
  }


  // Map each node to its taxonomy terms.
  if (!empty($node_vocabs)) {
    foreach ($node_vocabs as $vname => $tags) {
      $terms = array();
      $result = db_query("SELECT d.name FROM {term_data} d, {term_node} n WHERE n.tid = d.tid AND n.nid = %d AND d.vid = %d", $row->nid, $source_vocabs[$vname]);
      while ($term = db_fetch_object($result)) {
        $terms[] = $term->name;
      }
      
      // Depending on whether it's a free-tagging vocabulary or not, the terms are stored slightly differently.
      $vid = $vocabs["$vname"];
      $vid_key = 'migrate_taxonomy_' . $vid;
      if (!empty($terms)) {
        if ($tags) {
          $node->$vid_key = '"' . implode('"' . $tblinfo->multiple_separator . '"', $terms) . '"';
        }
        else {
          $node->$vid_key = implode($tblinfo->multiple_separator, $terms);
        }
      }
    }
  }

  // Switch back to using the default, aka target, Drupal database.
  db_set_active('default');

  return $errors;
}
?>

Note, for each vocab for a node type, I identify whether or not it's a free-tagging one or not. This is because I handle them slightly differently because of the way taxonomy module treats them, and to avoid problems with commas and quotes within terms, etc. In addition, there can be problems if you use commas as your separator, so when creating the content set I set the multiple separator ($tblinfo->multiple_separator) to be a pipe |.

Mar 04 2010
Mar 04

Currently the Migrate module doesn't support full migration of poll nodes. When the poll module is enabled, you can create a content set mapping for a poll node, but you are unable to set the poll status (active or closed) and, more importantly, you can't migrate the poll choices.

Using the hook_migrate_prepare_node() and hook_migrate_complete_node() hooks, I was able to migrate all choices for each node, along with all existing votes stored.

In the example below, I am migrating polls from a Joomla MySQL database and I am using a poll content set which handles the core node field mapping, including the question text.

/**
 * Implements hook_migrate_prepare_node().
 */
function mymodule_migrate_prepare_node(&$node, $tblinfo, &$row) {
  $errors = array();
  // Ensure we only work on a particular content set.
  if ($tblinfo->machine_name == "my_poll_content_set" && $node->type == "poll") {
    db_set_active('joomla');  // Set active database to be the Joomla db.
    $node->choice = array();
    $node->active = $node->status;  // Set the poll active/closed state to be the same status as the node.
    $choices = db_query("SELECT text, hits FROM {jos_poll_data} WHERE text != '' AND pollid = %d ORDER BY id", $row->id);
    while ($choice = db_fetch_object($choices)) {
      $node->choice[] = array(
        'chtext' => $choice->text,
        'chvotes' => $choice->hits,
      );
    }
    db_set_active('default');  // Restore active database setting to be the Drupal db.
  }
  return $errors;
}
?>

The above implementation of hook_migrate_prepare_node() first checks that we're operating on a specific content set which is identified by the machine name. This is the unique name you enter when creating the content set mapping. It then switches to the Joomla database, and fetches the configured choices for the poll record currently being migrated. Finally we just populate the $node->choice array with this data, and the migration module takes care of the rest.

As the Joomla records I'm dealing with have no concept of being active or closed, I've manually set the poll status ($node->active) to be the same as the node status ($node->status). This may not apply to your own records, but if you don't set $node->active somehow, it will default to closed.

/**
 * Implements hook_migrate_complete_node().
 */
function mymodule_migrate_complete_node(&$node, $tblinfo, &$row) {
  $errors = array();
  if ($tblinfo->machine_name == "my_poll_content_set" && $node->type == "poll") {
    // Select across the two databases and match on poll id and choice text.
    $votes = db_query("SELECT p.chorder, jv.date FROM {poll_choices} p, joomla.jos_poll_data jc, joomla.jos_poll_date jv WHERE jc.text = p.chtext AND jc.pollid = jv.poll_id AND jv.vote_id = jc.id AND p.nid = %d AND jc.pollid = %d", $node->nid, $row->id);
    while ($vote = db_fetch_object($votes)) {
      // We have no user id or hostname to identify source of vote. 
      // However we need to store something in hostname field so record is unique - using
      // vote date here.
      db_query("INSERT INTO {poll_votes} (nid, chorder, uid, hostname) VALUES (%d, %d, %d, '%s')", $node->nid, $vote->chorder, 0, $vote->date);
    }
  }
  return $errors;
}
?>

hook_migrate_complete_node() is only needed if you have individual vote records to migrate in addition to the poll itself. Drupal expects to be able to store the poll id, poll choice id and details on the user who voted. If the user is anonymous, then Drupal will store the user's IP address instead. However in Joomla, no record of the user who voted is kept, but we do have an extra piece of information which is the date and time the vote was recorded. As Drupal's poll_votes table has a primary key which enforces one vote per user (or one vote per anonymous user per IP address), we need to make our vote entries unique somehow. To get around this, I've stored the vote date in the hostname field. I suppose this is a bit "hacky" but it allows the votes to be migrated at least.

The other thing to note about the hook_migrate_complete_node() implementation above is that in the hook_migrate_prepare_node() I didn't store any mapping of a poll choice sourceid to a destid. This means that when pulling out the votes, I needed to join across the two databases in my SELECT and match up the records based on the poll id and the choice text. Again, not ideal, but I wasn't sure how to manage this mapping while in the middle of processing a separate content set.

Mar 02 2010
Mar 02

There are a number of different authentication methods available for integrating with Google Apps.  These include OpenID, OAuth and SAML amongst others.  At a first glance, it's not always entirely clear on the differences between them and when you may wish to use one over another.  Here's a brief overview which hopefully makes this a bit clearer.

OpenID

OpenID allows users to log into supporting websites with an existing account without ever needing to create a new account. All you need to do is to create an OpenID for your username and password. In fact, the chances are you have one already. Sites such as Google, Yahoo!, Flickr and LiveJournal are OpenID providers, so if you have an account with any of these (or another OpenID provider), then you just need to find out your OpenID. It is usually formatted like a URL, for example, for LiveJournal it is username.livejournal.com whereas for MySpace it's www.myspace.com/username. Just replace username with your actual username. You can then click on the OpenID login link on the site you wish to log in and enter in your OpenID. You don't even need to create an account on the site.

For Google Apps, the situation is the same. The user can log into your Drupal site by entering in their Google Apps OpenID url. If the user isn't already logged into their Google Apps account, they'll be prompted for their login details. Users may also have to confirm or reject a set of authentication requests made by the web application before being redirected back to the Drupal site. The user will now be logged into both sites, but the user's Google Apps account can't be accessed by the Drupal site.

OpenID has been part of Drupal core since version 6. For earlier versions of Drupal, there is a contributed module which provides this functionality at http://drupal.org/project/openid These modules only provide client support, to become an OpenID provider (aka server), you will need the OpenID Provider or OpenID Attribute Exchange modules.

Note, while earlier versions of Drupal's OpenID module supported regular Google OpenIDs, those for Google Apps didn't work due to unsupported characters in the url. This was recently fixed in http://drupal.org/node/216101 so ensure you are running Drupal 6.15 or later to avail of this fix.

Useful links:

OpenID + OAuth (aka hybrid)

This is essentially the same as OpenID, except an Auth Token is also returned to the Drupal site. This token allows the site to access the user's Google Apps account and pull down information, such as their calendar feed. See the next section for more information on OAuth.

OAuth

Google also supports the OAuth standard for API authentication. When not being used with OpenID, the user logs into the site with their Drupal username and password. Once authenticated, they are then immediately redirected to the Google login page where they must confirm (or reject) that the website is allowed to use an authorization token to access their Google account. If confirmed, the user is redirected back to Drupal site, along with an auth token, which the site can then use to access Google data feeds, such as the user's calendars, mails, etc.

If you want the user to be logged into both Drupal and Google, and you want the site to be able to access the user's Google account, then this is a good solution. The only caveat is that it is a two step login - once on the Drupal site, and then on Google. If you just want one login but the same functionality, then you probably want a combination of SAML and 2-legged OAuth.

There are two Drupal modules which provide OAuth functionality. The first is OAuth which integrates with Drupal's Services module. The other is OAuth Common which is a more generic, API module. I found the OAuth module too closely intertwined with the Services module to be of any use for integrating with Google.

Useful links:

2-legged OAuth

Administrators of Google Apps Premier and Education editions can also use a special type of OAuth, called 2-legged OAuth. Unlike standard OAuth (also called 3-legged OAuth), 2-legged OAuth does not require an authorisation token for the user's account to be accessed. Instead the credentials for a Google Apps administrator are stored on the site. Then for each user, we just need their Google Apps email address. We don't even need their password. The site uses the administrator's credentials to authenticate with Google. Unlike standard OAuth, the user is not actually authenticated with Google, but the site is able to act on their behalf to pull in or update their account data.

Useful links:

AuthSub

Like OAuth, AuthSub is a proxy authentication service. The end user experience is pretty much the same as with OAuth, so I won't go into too much detail here. It was developed by Google, before the OAuth standard was released, and OAuth is now the preferred solution. The Google Authentication module, google_auth (note underscore), provides AuthSub authentication and is available for Drupal 6.

Useful links:

ClientLogin

An alternative to OAuth and AuthSub is the ClientLogin authentication method. It is the only authentication method which works with Google's Provisioning API which can be used to create and edit accounts, and other account operations. For web applications, OAuth is recommended over ClientLogin as it's not as secure. This is because the user's Google Apps credentials need to be stored in the application.

Useful links:

SAML

Security Assertion Markup Language (SAML) is an XML standard that allows secure web domains to exchange user authentication and authorisation data. This allows users to log into Google Apps directly, but authentication is done against the Drupal database. It's best described by the following two scenarios:

Scenario 1: user logs into Drupal first:

  1. user goes to the Drupal site
  2. user enters Drupal credentials
  3. user not logged into Google Apps
  4. user goes to Google Apps site
  5. Google Apps redirects to Drupal site for authentication, but as user already logged in this step should be invisible
  6. user redirected back to Google Apps and can access their account info.

Scenario 2: user logs into Google Apps first:

  1. user goes to the Google Apps site
  2. user redirected to Drupal site where they enter their credentials
  3. user redirected back to Google Apps and can access their account info.
  4. user decides to go to Drupal site, but should be already logged in.

Unlike OpenID and OAuth, the user isn't authenticated in Google Apps until they actually try to access it.

When user goes to Google Apps they will be redirected to Drupal site and will have to enter their Drupal username and password. This solution doesn't allow for Google Apps data to be accessed by the Drupal site, for either display or modification. It also doesn't allow anyone to log into Google Apps with their Google Apps credentials - they have to an account on your Drupal site. This means the user's calendars, etc can not be pulled in via an API call. For this you'll probably need to combine SAML with 2-legged OAuth. This combination allows you to use the API, have the user logged into both sites and still have just one login step.

The Drupal googleauth module (note: no underscore) implements the SAML solution and requires xmlsec to be installed on the server. However, there's no Drupal 6 version for it yet but there is a patch in the issue queue.

Useful links:

Shibboleth

Shibboleth is standards-based, open source middleware software which provides web single sign-on across or within organisational boundaries. It is very similar to SAML, so I won't go into much detail in here. In fact, version 2 of Shibboleth also supports SAML 2.0. More information can be found at http://code.google.com/apis/apps/articles/shibboleth2.0.html

Useful links:

Feb 25 2010
Feb 25

Time is flying by. There is now only 7 weeks to go to DrupalCon San Francisco! I'm really looking forward to it I have to admit. Although I've visited the US a fair bit, I've never been to the west coast, not to mind say San Francisco.

This year I'm also really excited to be able to sponsor the event as an individual sponsor. It's the first time I've been able to do so. Then there's all the cool sessions. The final schedule hasn't been announced yet, but fingers crossed my session proposal on "Coder Module: Easily Port Modules to Drupal 7" will make it in. It's a joint session by Jim Berry and myself on all the new fab changes to the Coder module for Drupal 7.

The Drupal 7 version of Coder module is a merger of the Code Review and Deadwood modules. These combined modules aim to provide an extremely useful developer tool which allows developers to ensure that their code meets the Drupal coding standards and identify common security coding issues. In addition to providing a set of tests to assist developers when upgrading their modules to newer versions of Drupal, with the addition of the Deadwood module (aka Coder Upgrade) it will now also upgrade your code for you! If you write or maintain Drupal code, you should really check out this session. Also don't forget to vote for this session at http://sf2010.drupal.org/conference/sessions/coder-module-easily-port-modules-drupal-7

Hope to see you there!

Nov 03 2009
Nov 03

The Ubercart module is one of the best e-commerce options for Drupal currently. It is very user friendly and highly flexible with administrators having control over the product catalogue, payment gateways and email notifications. Site administrators also have control over which checkout panes are displayed during checkout and the order in which they appear. However, as I found out recently, while it is easy to control checkout pane visibility, and even add your own, there's no simple way of modifying the forms contained within a checkout pane. This article will cover one solution on how to overcome this.

For a site I'm working on, I needed to be able to add a new field to contain the user's title (Mr, Mrs, Miss, etc) to the "billing information" ubercart checkout pane.  I first implemented hook_form_alter() to add the field and set a custom submit handler.  However, while I was able to modify the form, the submit function was never called and I wasn't able to save the value of the new field to the customer's order.  This is because the ubercart checkout panes don't fully utilise the FAPI.

My solution was to create a new checkout pane and to entirely recreate the billing pane by pulling in the pane contents from the ubercart module, adding my own changes and returning the merged version.

So first I created a new checkout pane by implementing the hook, hook_checkout_pane():

function mymodule_checkout_pane() {
  // Replacement for standard billing address pane.
  $panes[] = array(
    'id' => 'mymodule_billing',
    'callback' => 'mymodule_checkout_pane_mymodule_billing',
    'title' => t('Billing Address'),
    'desc' => t('Custom billing address fields.'),
    'weight' => 2,
    'process' => TRUE,
    'collapsible' => FALSE,
  );
  return $panes;
}
?>

Each pane needs a unique id.  I originally used the same id as the ubercart billing information pane in the hope that I could override it, but that didn't work unfortunately.  The other two fields to pay particular attention to are callback - the function to call to build the pane and process it, and process - this should be set to TRUE, so your callback function is called with the 'process' operation.  </code>

For the callback function, I didn't want to just copy and paste in Ubercart's uc_checkout_pane_billing() function as then I wouldn't be able to avail of any modifications made to the original "billing information" pane by simply upgrading the module - I would have to modify my custom module each time.  So for each operation, my checkout pane calls Ubercart's one, makes my custom changes and then returns the merged result.  The final result is as follows:

function mymodule_checkout_pane_mymodule_billing($op, &$arg1, $arg2) {
  require_once(drupal_get_path('module', 'uc_cart') . '/uc_cart_checkout_pane.inc');

  switch ($op) {
    case 'view':
      // This is needed to avoid 'an illegal choice has been made' error.
      if (isset($_POST['panes']['mymodule_billing']['billing_country'])) {
        $_POST['panes']['billing']['billing_country'] = $_POST['panes']['mymodule_billing']['billing_country'];
      }
      $contents = uc_checkout_pane_billing($op, $arg1, $arg2);

      // Add 'title' or 'salutation' to billing address details.
      $contents['contents']['billing_title'] = array(
        '#type' => 'select',
        '#title' => t('Title'),
        '#options' => array('Mr', 'Mrs', 'Ms', 'Miss', 'Dr', 'Fr', 'Rev', 'Sr'),
        '#required' => TRUE,
        '#weight' => 0,
        '#default_value' => $arg1->data['billing_title'],
      );
      // Address history selector doesn't work for this solution, so remove it.
      unset($contents['contents']['billing_address_select']); 

      return $contents;

    case 'review':
      return uc_checkout_pane_billing($op, $arg1, $arg2);

    case 'process':
      $arg1->billing_title = $arg2['billing_title']; // Save our custom field.
      return uc_checkout_pane_billing($op, $arg1, $arg2);
  }
}

?>

Pages

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web