Is your site running slow ? Check Custom HTML modules.

One of the most popular module types you will find amongst the pages of most Joomla! websites is the plain old default Custom HTML module. It is a very useful feature; with it, you can insert virtually any code you like, ranging from text or images to social media share buttons.

Prepare Content option HTML modules

Prepare Content option in HTML modules

As you have probably noticed, the Custom HTML module doesn’t have many additional options. You can set a suffix and a background image, configure its cache, and also enable or disable Prepare Content with the Joomla! content plugins.

However, as discovered by Ronni Christiansen from redcomponent.com, the Prepare Content option may break the Joomla! cache and browser cache and generally slow down application rendering time. See here for more details: Joomla! 2.5.x Bug Tracker All of your instances of the Custom HTML module probably uses this option because since version 2.5 of Joomla!, this feature has been enabled by default.

This has possibly had the following consequenses for your Joomla site:

  • Joomla! cache not working with the Custom HTML module;
  • browsers being unable to cache this module’s content so that module content must be loaded with each user visit to the site; and,
  • site rendering time being much higher.

The easiest way to correct this problem is to run a SQL query to disable this option in all modules. To apply this solution, you need access to your database (via PHPMyAdmin or some other database administration tool) and run the following SQL statement:

update DBPREFIX_modules set params = replace(params,'prepare_content":"1', 'prepare_content":"0')

Of course, DBPREFIX must be replaced with your database prefix which you can verify by browsing the database or by checking the value in the root/configuration.php file; just find the line similar to this one:

public $dbprefix = 'rv1zj_';

In this example the database prefix is ‘rv1zj_‘.

Another approach to fix this issue is to manually disable the Prepare Content option via your Joomla! administrator panel. In this case, you will need go to Module Manager and filter the modules by the type Custom HTML. Then, in every module‘s parameters, set its Prepare Content option to ‘No‘ and save the settings.

CustomHTMLSettings

Remember, though, that if your module is loading tags or scripts inside your Custom HTML module, then your website needs Prepare Content enabled.

Please also remember that when making changes directly to the database we strongly recommend you first create a backup of your database or of your entire website.

Is your site running slow ? Check Custom HTML modules. 5.005 (100.00%) 3 votes
Share
This article was first published March 19th, 2013