All my content

How to fix Drupal CAPTCHA ReCaptcha validation error: unknown CAPTCHA session ID

Submitted by gazza on Mon, 14/12/2020 - 08:32

Edit the recaptcha.module file inside the ReCaptcha module (usually in: modules/recaptcha) and change this code:

// As the validate callback does not depend on sid or solution, this // captcha type can be displayed on cached pages. $captcha['cacheable'] = TRUE;

To this code:

// As the validate callback does not depend on sid or solution, this // captcha type can be displayed on cached pages. //$captcha['cacheable'] = TRUE; $captcha['cacheable'] = FALSE; \Drupal::service('page_cache_kill_switch')->trigger();

Geo Location for your local trades website

Submitted by gazza on Mon, 28/09/2020 - 14:13

As a trades person, you will be trying to target your local geographical area to gain more referrals through your website. There are many SEO implementations that you should have in your website to ensure that you are getting the right sort of traffic from the right location. One of these that will help you rank better is to  make sure you implement geo location tagging metadata on every page of your website. This isn't seen by visitors to your website but it is seen by search engines like Google and is used in location based searches.

Please use mysql_upgrade to fix this error - Plesk fix

Submitted by gazza on Thu, 24/09/2020 - 10:31

This error occurred in my environment when I tried to create a database dump. This happened after I updated the MariaDB from version 10.2.x to 10.3.x. After upgrading your MySQL you have to run  mysql_upgrade to fix any incompatibilities in System tables. 

Just run the below command at your Plesk command line after upgrading your MySQL, restart MySQL and it will fix the issue:

Upgrade MySQL databases:

MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin

Restart the MySQP service

systemctl restart mysql

A Drupal 8/9 module I plan to use

Submitted by gazza on Wed, 23/09/2020 - 10:56

The following modules I plan to use in the near future so that every time one of my clients log into their website, I can redirect them automatically to a page where I can give them up to date helpful advice and information on how to use their website and recommendations on what they should be doing.

Integrate Facebook Messenger Bot with Drupal

Submitted by gazza on Mon, 21/09/2020 - 18:34

A module that I will be checking out in due course is the Drupal Facebook Messenger Bot module. Bot content can be updated from within Drupal in real time. Due to Drupal's strong focus on content and data modelling, and what is possible with Drupal's REST API, I am excited to see what this module can do!

How to update Drupal core and it's dependencies using composer

Submitted by gazza on Sat, 18/07/2020 - 13:59

Below is the command line code that you can copy and paste into your favorite command line terminal.

composer update drupal/* --with-dependencies

If you are using Plesk, you can access composer globally byusing the following command. Obviously change the php version to the one you are using.

/opt/plesk/php/7.4/bin/php /usr/lib64/plesk-9.0/composer.phar update drupal/* --with-dependencies

Drupal 8 to Drupal 9 migration

Submitted by gazza on Wed, 10/06/2020 - 07:39

I have now upgraded/migrated the trades persons business listings directory to Drupal 9. I have used very few contributed modules and actually achieved most of the functionality with Drupal core. The only contributed modules I used was to add functionality that is not essential but do add more usability options like users being able to login using Facebook and the Address, geolocation and geocoder modules which make it easier for users to add their business to the map.

Socket Overload Calculator

Submitted by gazza on Fri, 13/03/2020 - 09:42

How to add the Electrical Safety First Socket Overload Calculator to your website and keep it mobile friendly

The Electrical Safety First Socket Overload calculator is a fantastic tool and I would highly recommend adding it to your own website. You can display the socket calculator by going to the Electrical safety First webpage HERE to grab the embed code. There is just one catch!