Drupal Blog

Drupal 7: Heartbeat comment messages show up twice!

Heartbeat messages were showing up nicely on a project we have been working on lately, bringing up all the member activities including changing the user account details, adding or editing nodes and commenting on nodes.
Everything was working fine right out of the box - except one minor inconvenience that we noticed: all comments were showing up twice in the heartbeat stream.

Configuring drupal cron jobs in crontab.

Drupal 7 has the ability to run cron automatically, but if there are tasks that really depend on cron, it only makes sense to ensure that cron is running in pre-defined time spans.

To make sure of that, we can configure the drupal cron to run from a server side command. So from the console, In crontab, the following line will trigger Drupal's cron

Drupal7: How to change an already existing text field to a text area

Here is a useful snippet that you can use to change an already existing drupal textfield into a text area. Just replace the field_machine_name with the machine name of the field that you would like to change.

Drupal Commerce - Translate Order total, Shipping Information, Billing information

If you do not want to use i18n_string and i18n_field in order to translate the Order total, Shipping & Billing Information texts, that show up in the cart and on the checkout pages when using Drupal Commerce, the following hacky approach should do the trick.

First, the following funcion can be used in your template.php file:

Remove non-utf8 characters from string

Here is a nice little PHP snippet that will remove non-ASCII characters from a String.

blog: 

Recent Comments

Forward by Dries Buytaert, Founder and Project Lead, Drupal; CTO Acquia.

Order now from:

Managing Expectations Podcast with DrupalEasy

Author Interview http://tinyurl.com/8a8nxno

We provide the most Shiny Drupal Bits & Pixels

Since Drupal 4.x

Konordo OÜ
Drupal Services

Reg No. 14623621
VAT ID. EE102121939

Director: Konstantin Ordoulidis

Get in touch

  • Konordo OÜ
  • Sepapaja 6, 15551 Tallinn, Estonia
  • +4917698807355
  • info [at] konordo [dot] com