Patch for Service Links – Failed: PDOException: SQLSTATE[42S22]: – and a good example of patch syntax

Drupal patches can be a pain. I usually just apply them manually because the line numbers don’t always line up (various reasons) and that way I get to look at the code. But this patch was fairly complicated and the error occurs at update.php so I didn’t want to mess around with it. Here is some detail about the error, and the syntax needed to install the patch using the patch shell command.

Upon a standard upgrade to the Service Links module, I encountered a known error during the update.php section, where the db is upgraded to add some elements to the schema.

The following updates returned messages

service_links module

Update #6200
Failed: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘service_links_show_’ in ‘where clause’: SELECT name FROM {variable} v WHERE LOCATE(“service_links_show_”,v.name) > 0; Array ( ) in service_links_update_6200() (line 46 of /var/www/html/sites/all/modules/service_links/service_links.install).

Here is a link to the fix: https://drupal.org/node/2015967

This is the exact syntax that was provided:

patch service_links.install drupal7-service_links-2.2-update_1.patch

from within the service_links folder

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: