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_”, > 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:

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

Error from Link Module – line 1305 link.module

I have been getting this error when I save fields to a content type that I have created. Here is the error.

Notice: Undefined index: title_value in link_field_update_instance() (line 1305 of /var/www/foo/public/sites/all/modules/link/link.module) – note the path may not be the same for you.

Here is the issue summary:

There is a patch listed here. very easy to install manually. and fixed the issue.

Error with the Core Contact Form and Google Analytics Tokenizer

well, today I enabled the user contact form and tested it. The form works but I received an error from PHP about a deprecated function. Here is the link to the fix:

To be honest, I’ve had more luck installing these patches manually than using the patch application from the command line. I might be doing something wrong but I don’t think so. I believe that what is happening is that the patch is issued for a version of the module, at a specific line number. Then, the module is changed and the line number changes but the patch isn’t necessarily committed to the module. So the line numbers no long match. Or, I am an idiot who doesn’t know what he is doing.

So i usually open the patch, check out what is being changed and add it manually with Aptana. that way i have to look at the code too.