Blogs

Disable Cache Before developing Drupal 8 Theme

Drupal 8 Theme Developer

I recently started developing Drupal 8 theme. But every time I was making any change, I had to clear Drupal cache. So, here is how you can disable Drupal cache when developing theme / module for Drupal 8.

Step 1

Copy and rename /sites/example.settings.local.php to be /sites/default/settings.local.php

Why Overlay Module do not work in some Drupal themes

Some of our themes might not support Drupal overlay module. This is because these themes comes with latest stable version of jQuery.

If you check the error using inspect element of browser, you will find following error message.

TypeError: jQuery.browser is undefined

The overlay module do not work with jQuery version 1.9 and later. It's because $.browser is deprecated in jQuery 1.9 and overlay module need this to work. So, its good to disable overlay module from:

How to remove Breadcrumb from Bartik Theme

I have seen many people do not want to show breadcrumb links on their Drupal website. The default Drupal 7 theme Bartik do not have option to show / hide this breadcrumb links.

If you want to remove breadcrumb links from Bartik theme, follow these steps:

Step 1:

Open following file in any text editor of bartik theme.

/templates/page.tpl.php

Step 2:

Find and delete following codes:

Drupal Error - Fatal error Class 'PDO' not found

Your drupal powered website may show error message like PDO not found.
The error message may be something like this:

Fatal error: Class 'PDO' not found in /home/username/public_html/includes/database/database.inc on line 184

Solution

  1. Create a file php.ini in public_html folder
  2. Add following code:
    extension=pdo.so
    extension=pdo_mysql.so
  3. Save php.ini file

Done!!!

Drupal Error - Warning: ini_set() has been disabled for security reasons

Your Drupal powered website may start showing following error message:

Warning: ini_set() has been disabled for security reasons

Cause of error message

Your hosting provider has disabled PHP function ini_set() on server.
This is generally done to increase server security. Some server security expert highly recommend to disable ini_set() on server

Solution

Solution one:
Contact your hosting provider and ask them to enable ini_set() on the server.

Solution two: