Drupal 8 - drupal_is_front_page

There seem to be a few posts around at the moment about being able to use Drupal 8 with the drupal_is_front_page() function.

This isn’t the case, as shown by https://api.drupal.org/api/drupal/includes!path.inc/function/drupal_is_front_page/7.x. There is no Drupal 8 version.

Now, you’re able...

Read More

Facebook share showing incorrect text?

Recently I had an issue where a Facebook share popup was showing incorrect translated text.

It seems that Facebook had scraped a previous version of the page, possibly during testing, and this was being displayed on the share popup.


Read More

Update a symlink

To update a symlink in place, without having to delete and recreate:

ln -sfn [source file] [target file] 

What do the flags mean?

-s, –symbolic make symbolic links instead of hard links -f,...
Read More

Local development changes to settings.php

When syncing a DB from production to dev, there are some settings which I often end up turning off in the UI.

It’s possible to add some lines to your dev settings.php to force settings on local only. Make sure...

Read More

Remove lock on Drupal account

If you’ve had someone fail their login attempt 5 times, their account gets locked for a period of time.

To remove the account locks, use the following:

drush sqlq “DELETE FROM flood” 

Of course, if you’re...

Read More