Drupal 7

How To Update to PHP 7.4 Ubuntu 16.04 Drupal 7 Nginx

| 128 views

I was facing problems with some Drupal modules not being supported, before upgrading to PHP 7.4 version.   As I had running Ubuntu 16.04 server with Nginx and PHP 7.0 FPM on in I felt a bit afraid performing a live update and decided to make a new backup for all settings.  Here I found some good advice: How To Install PHP 7.4 on Ubuntu 20.04/18.04/16.04 and also for Drupal specific things took my own advice from here: How to Install Drupal with Nginx, PHP-FPM 7.4, MySQL, phpMyAdmin on Ubuntu…


How to Install Drupal with Nginx, PHP-FPM 7.4, MySQL, phpMyAdmin on Ubuntu 20.04 - Linode Guide

| 36 views

In this article, you will learn how to setup webserver for serving  Drupal  websites running with Nginx, PHP-FPM 7.4, MySQL and phpMyAdmin on Ubuntu 20.04 For the following tutorial, I used very much the information from my previous guide with Ubuntu 18.04, but I decided to rewrite it for Ubuntu 20.04 version as it is shipped with php7.4 version and will work for Drupal 7, Drupal 8 and most probably for Drupal 9 Prerequisites Ubuntu 20.04  Root privileges. You can get a cheap VPS starting…


Drupal 7 Fix: SQLSTATE[42000]: Syntax error or access violation: 1231 Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER'.

| 357 views

I was migrating Drupal 7 website to a newer infrastructure (PHP 7.4) and during the migration process when tried to connect to the MySQL database  I faced following error - SQLSTATE[42000]: Syntax error or access violation: 1231 Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER'. Here is the error code: Resolve all issues below to continue the installation. For help configuring your database server, see the installation handbook, or contact your hosting provider. Failed…


How to add Pin It button to Drupal 7

| 3 views

In this Drupal tutorial I will show you how to add Pinterest Pin It Button to Drupal 7 site using views and html.tpl.php file. I like it keep it simple, and I have created a separate view for all social share plugins (Facebook, Twitter, G+ and Pinterest). Each of the social sites came with his own JavaScript you have to load either to your template.php file or I prefer to add it to html.tpl.php in theme folder (If you have not it, consider creating it). Add Pinterest script to your html.tpl.…


Add Menu Classes In Drupal 7

| 5 views

In this Drupal tutorial I'll show how to add menu classes to your Drupal 7 website using template.php file. Original of this tutorial has been found here. Add this function to your template.php file: <?php /** * theme_menu_link() */ function THEMENAME_menu_link(array $variables) { //add class for li $variables['element']['#attributes']['class'][] = 'menu-' . $variables['element']['#original_link']['mlid']; //add class for a $variables['element']['#localized_options']['attributes…


Add Viewport in the <head> in Drupal 7

| 2 views

In this Drupal Tutorial I will show how to add a new HTML in Drupal 7 head section. I'm using responsive design to enable my blog work pretty ok on mobile devices, but yesterday looking through Google PageSpeed Insights suggestions I found that there is no viewport defined, so it might not render CSS as I might want, but instead to scale webpage to device. Your page does not have a viewport specified. This causes mobile devices to render your page as it would appear on a desktop browser,…