Drupal PHP Fatal error Call to a member function getElementsByTagName()

I suddenly started getting the following error:

PHP Fatal error:  Call to a member function getElementsByTagName() on a non-object in public_html/drupal/modules/filter/filter.module on line 1122

I checked what there is on line 1122. I could clearly see that the error needs to happen because $body_node was null. For a quick fix I just implemented a null check as follows:


Drupal and SVN Repository conflicts

If you happen to maintain your webpage with Drupal and also host a SVN-Repository on the very same host you can run into trouble. Just try to commit a file starting with a period (for example a project file from eclipse: .project). It will give you an error "access denied for unknown reason". The solution is quite simple. There is a rule in the .htaccess file from Drupal which denies access to files starting with a period. You can either delete this rule or restrict it to only apply for the drupal part of the page.

Fix Guestbook in cmsmadesimple

The guestbook module of cmsmadesimple has the bad habit of showing the following error message after updates: Call to undefined function nl2pnbr(). The fix is quite easy. Just open the filemodules/Guestbook/action.get-entrylist.php in a texteditor and replace the line

$entry['message'] = nl2pnbr($entry['message']);

with the line

$entry['message'] = nl2br($entry['message']);

After that it works just fine.


Enhanced XSPF Player breaks when upgrading cmsmadesimple to 1.9.0

The player fails because of the update of the Uploads module and some missing includes. A fix is quite easy:

  1. Open modules/EnhancedXSPF/action.admin_edit_playlist.php in a texteditor. You need to change the line 101 from
    $filelist = array_merge($filelist, $uploads->getFileList($category));


    $filelist = array_merge($filelist, $uploads->get_category_file_list($category));

    Now you should be able to edit the playlists again.


Subscribe to RSS - Web