You are here

Drupal

Drupal: Unpublish an entire book (with all its children)

Submitted by Druss on Fri, 2016-09-09 02:06

Drupal has a module named Book Delete which you can use to delete books (along with all child pages). However, it doesn't appear to have an unpublish option and all I wanted to do was unpublish a book. Rather than writing a separate module, here are a couple of queries that should allow you to unpublish the entire book directly from the database.

This is for Drupal 7. Caveat emptor etc.

Aegir: Site backup error "Could not back up sites directory for drupal"

Submitted by Druss on Sat, 2015-12-19 18:08

If you encounter,

Could not back up sites directory for drupal

when trying to back up a site using Aegir, then this is because there are some permission issues with some of the files in the sites directory.

In my case, these files were in the private/temp/ directory. Listing all offending files can be done by the following command:

Why OpenAtrium sucks

Submitted by Druss on Sat, 2014-08-16 20:17

OpenAtrium is a Drupal "distribution", a pre-packaged Drupal installation which targets a particular niche. I was told to consider it when I went looking for a support ticket package a couple of years ago. That project fell by the wayside but I did have a demo installation on my system and now that I do need to install a ticket management system again, I looked at resurrecting this installation and updating it for some snazzy new features.

Drupal XMLSiteMap: public://xmlsitemap/ not found or not writable

Submitted by Druss on Fri, 2014-04-11 00:48

I ran into the following error (or something like it) while setting up Drupal's xmlsitemap module:

public://xmlsitemap/lOtsOfgoBBlDegOOk not found or not writable

This is as expected some kind of permissions issue. Why the module can't sort this on its own, I do not know. As with everything Drupal, clear the cache first to see if that fixes things. It sometimes does. If not, you will need to get your hands dirty on the commandline (if linux):

The drush command '@hostmaster pm-enable hosting_queued' could not be found

Submitted by Druss on Fri, 2014-01-24 02:00

Installing Aegir 2 on a fresh install of Ubuntu Saucy in a Virtualbox, I ran into the following message:

The drush command '@hostmaster pm-enable hosting_queued' could not be found.

To fix this run, sudo mysql_secure_installation and ensure that you remove anonymous users. This should do the trick.

PDOException: SQLSTATE[HY000]: General error: 144 Table 'cache_menu' is marked as crashed and last (automatic?) repair failed: DELETE FROM {cache_menu};

Submitted by Druss on Tue, 2013-04-23 10:38

While trying to edit a menu on a Drupal site, I found that none of my changes were being saved. Looking at the logs led me to the following error message:

PDOException: SQLSTATE[HY000]: General error: 144 Table 'cache_menu' is marked as crashed and last (automatic?) repair failed: DELETE FROM {cache_menu};

Simply restarting MySQL did not fix things and it looked like I had to get my hands a li'l dirty.

Class 'MollomDrupal' not found

Submitted by Druss on Tue, 2013-04-23 10:15

I upgraded the Mollom module on this site from the 7.1.x version to the newer branch of 7.2.x and ran into a White Screen of Death (WSOD). Checking the logs pointed me to the Mollom error:

Class 'MollomDrupal' not found

It's tough to fix this as you might not be able to even log into the site to get to the admin page. Therefore, you will need to disable the module from the database.

Drupal: PHP Fatal error: Undefined class constant 'MYSQL_ATTR_USE_BUFFERED_QUERY'

Submitted by Druss on Sat, 2012-07-07 23:38

While setting up Drupal on a friend's Ubuntu server, I ran into the following error message:

PHP Fatal error: Undefined class constant 'MYSQL_ATTR_USE_BUFFERED_QUERY' in /var/www/mysite/includes/database/mysql/database.inc on line 42

This basically simply means that the PHP PDO extension has not been installed. It can be installed via something along the lines of:
sudo aptitude install php5-mysql

While you are at it, make sure that all the other PHP extensions that Drupal requires are also installed.

Pages

Subscribe to RSS - Drupal