Bye, bye region.tpl.php and block--system--main.tpl.php

/**
* Implements hook_page_alter().
*/
function mytheme_page_alter(&$page) {
// Remove all the region wrappers.
foreach (element_children($page) as $key => $region) {
if (!empty($page[$region]['#theme_wrappers'])) {
$page[$region]['#theme_wrappers'] = array_diff($page[$region]['#theme_wrappers'], array('region'));
}
}
// Remove the wrapper from the main content block.
if (!empty($page['content']['system_main'])) {

The code has been tested and works

The best way to add a column to an existing table in drupal

/*
* Implements hook_schema_alter().
*/
function mymodule_schema_alter(&$schema) {
$schema['tablename']['fields']['fieldname'] = array(
'type' => 'varchar',
'default' => null
);
}

/*
* Implements hook_install().
*/
function mymodule_install() {
if (!db_field_exists('tablename', 'fieldname')) {
$schema = drupal_get_schema('tablename');
db_add_field('tablename', 'fieldname', $schema['fields']['fieldname']);
}
}

The code has been tested and works

Reinstall virtualbox debian

Uninstall VirtualBox -> sudo apt-get purge "^virtualbox-.*"

Check carefully what will be removed before you confirm.

Update the software repositories -> sudo apt-get update

Clean up -> sudo apt-get autoremove | sudo apt-get autoclean | sudo apt-get clean

rm -r /etc/init.d/vboxdrv
rm -r /var/lib/update-rc.d/vboxdrv
apt-get install virtualbox virtualbox-dkms virtualbox-guest-utils virtualbox-guest-additions virtualbox-qt

Vagrant commands manage

A VirtualBox machine with the name 'vm_name' already exists. Please use another name or delete the machine with the existing name, and try again.

I listed current running virtual machines from the command line :

vboxmanage list vms

Result :

"vm_name" {8ba467b7-da96-4f68-9bf8-671dd6f0d007}

Then proceeded with the removal of the offending virtual machine :

VBoxManage unregistervm 8ba467b7-da96-4f68-9bf8-671dd6f0d007 --delete


vagrant up --provision

The code has been tested and works

Installing and Configuring Redis for Drupal 7

The following is a detailed guide to get Redis installed and configured for your server. It assumes that you are an Ubuntu Server 14.04, or the equivalent Debian release.

Installing Redis

First, download the Drupal redis module, which should go to sites/all/modules/contrib. You can do that in many ways, here is how you would use Drush for that:
drush @live dl redis

You do not need to enable any Redis modules in Drupal.

The code has been tested and works

Pages

Subscribe to moscovie.com RSS