You are here

Tip

Drupal: Error: Class 'SelectQueryExtender' not found in includes/pager.inc

If you find that you Drupal installation is WSOD-dead with the following error message:
Error: Class 'SelectQueryExtender' not found in includes/pager.inc

then this means that you've messed up the Drupal (7, at the time of writing) registry somehow. You might have done this during an import/export operation where you forgot to export the registry and registry_file tables, or as I did, you have foolishly just emptied them to clear up issues with a missing class file that Drupal fastidiously continues to track.

sed: Deleting all lines between two types of lines

Today, I made quite an impression on my furniture thanks to incessant contact between it and my illustrious head. This, as usual, was due to my looking for a clean regex to solve my issue while working with text files in Vim. My task was, I initially believed, quite simple: delete all the lines that are sandwiched between two types/patterns of lines. In this case, the top slice of the sandwich consisted of a line which was entirely a number and the bottom slice was a line entirely populated with underscores.

Resolving merge conflicts fixed manually in Eclipse/eGit

I'm using Eclipse (Indigo) and eGit, its Git plugin. Earlier today, when I merged the contents of one branch with my master, I ran into a bunch of conflicts. While I suspect that I should have used the "Team > Merge Tool" to resolve them, as they were rudimentary in nature, I just sorted them out manually. However, eGit did not notice that the conflicts (and their in-file markers) were gone and retained the conflicted icon for each of the affected files.

KDE network manager disabled

One of my laptops which is running on Kubuntu Lucid decided to stop connecting to my network today. I found that the KDE network-manager applet (or is it a plasmoid? :S) had decided to disable itself. Clicking it stated so with no option to re-enable it (nice UI, boys). Getting to the commandline and starting the network-manager service did not help. I also found that accessing the System settings networking configuration gave me corrupt XML file errors.

Missing Excel/XLS/XLSX spreadsheet import in PHPMyAdmin

If you find that the really handy Excel spreadsheet import feature for MySQL is missing in PHPMyAdmin, it's because it has been removed. According to the PHPMyAdmin changelog:
3.4.5.0 (2011-09-14)
- [core] Remove library PHPExcel, due to license issues
- [export] Remove native Excel export modules (xls and xlsx formats)
- [import] Remove native Excel import modules (xls and xlsx formats)

PHPMyAdmin xls/ods import fails or hangs when partially complete

If you're importing Open Office / Libre Office Calc files or Excel spreadsheets into MySQL using PHPMyAdmin, you might have run into the occasional case where the process hangs with either a partially imported set or no records at all. After some messing around, I have found that this usually happens when there's a problem with the input data. In my case, this usually stemmed from duplicate primary keys or similar issues. Unique keys were detected fine.

In other words, PEBKAC.

Removing hyperlinks from Open Office Calc

If you have ever pasted data into Calc in Open Office, you'll notice that any hyperlinks in the input data will be retained as hyperlinks rather than reduced to plain text. While this might be beneficial behaviour to some, it wasn't for me this afternoon. After a little digging around, I found that an easy way of removing the hyperlinks is by highlighting all the affected cells, right-clicking and choosing the Default Formatting option.

The associated CTRL+M shortcut (as seen in the Format menu) did not work for me.

Error message: iptables-restore v1.x.x: no command specified

If you run into the following error message when attempting an iptables-restore < my.rules:
iptables-restore v1.4.8: no command specified
then the problem is that you have very likely just copied and pasted stuff into my.rules which has led to some dodgy line-breaks terminating blank lines in the file.

Apache/httpd error: SoftException in Application.cpp:357: UID of script "/home/foo/public_html/index.php" is smaller than min_uid

On a server I am working on right now, I installed a PHP application and attempted to run it. However, I ran into a "500 Internal Server Error". Upon further investigation by checking the logs, I found the following errors in the Apache error log:

SoftException in Application.cpp:357: UID of script "/home/foo/public_html/index.php" is smaller than min_uid
Premature end of script headers: index.php

SVN: Deleting removed/missing files

I currently work with an SVN checkout which tracks a separate GIT checkout (for reasons of managerial short-sightedness). When I update my git checkout, I find that the SVN checkout does not like the fact that files deleted by the git update have effectively been removed from the SVN checkout without the use of svn rm. Consequently, it is impossible to commit the updated checkout into the SVN repository.

Pages

Subscribe to RSS - Tip