Posts

Akeeba restore error – 1118 – Row size too large (>8126) [solution]

When restoring an Akeeba backup of a WordPress site the restore process was interrupted with the error message saying 1118 – Row size too large (>8126).

Solution:

  • Use SSH to log in to your database server
  • Edit /etc/mysql/my.cnf or if you use a config file under /etc/mysql/conf.d, edit that one
  • Under the [mysqld] section add:
    internal_tmp_disk_storage_engine=MyISAM
    innodb_strict_mode = 0
  • Restart mysql:
    service mysql restart

Edit: After you successfully restored the site, remove the lines and restart MySQL. I didn’t do this and later tried to move another site from this server to another using Akeeba. When the site was installed on the new server, I just got an error message saying “Error Establishing a Database Connection”. To resolve it, I had to go back to the above server, remove the lines from mysql config, restart MySQL, make a new backup of the site using Akeeba and successfully restore it on the new server.

Credit: The solution to this problem was found here.

Gogodigital Cookie Consent for Joomla! plugin

Gogodigital Cookie Consent plugin for Joomla! doesn’t display custom message [solution]

Using Gogodigital Cookie Consent plugin for Joomla! version 3.0.2. In the plugin configuration a custom message and submit label was entered and saved but on the frontend the popup only displays the built in message and button label.

Solution: It turns out there is a bug when the message entered has a newline (return). If you write the text in one row without any line breaks the problem will not occur.

RSForm! Pro and reCaptcha plugin not working [solved]

Using RSForm! Pro together with the RS!Form Pro reCaptcha plugin stopped working, the reCaptcha does not show up in the form anymore.

Inspecting the page shows errors like “Unexpected token <” on line 2 and further down complains that RSFormProReCAPTCHAv2 is not defined.

The Unexpected token error is probably caused by a line in the <head> section calling a non-existing javascript (i.e. just links to the site root), like: <script src=”/?cc86e17febb09de1768c47283dc17a9b” type=”text/javascript”></script>. This line is originating from a plugin.

It turns out this is problem occured after upgrading to RSForm! Pro 2.0.12 and using the reCaptcha plugin.

The simple solution was to download and reinstall the current “Google No Captcha ReCAPTCHA 1.52.1” from the downloads section at RSJoomla (you might need to login to get to your memberships downloads section).

Note! Just using the Joomla Extensions Update to try to update the plugin will solve the problem. You need to download the plugin and install it.

How to add GDPR consent checkbox to Joomla! contact form

It is quite simple to add a GDRP consent checkbox to the Joomla! contact form by using the custom fields feature in Joomla 3.

    1. Go to Components -> Contacts
    2. Click on Fields in the left hand menu
    3. Select Mail in the drop down above the fields list

      Joomla! Contact form GDPR consent checkbox

      Joomla! Contact form GDPR consent checkbox

       

    4. Click on New to create a new field
    5. Select Type = Checkboxes, Required = Yes

      Joomla! Contact form GDPR consent checkbox

      Joomla! Contact form GDPR consent checkbox

       

    6. Click on the “+” sign at Checkbox Values and enter your consent text in the Text field, like for example “I consent to thesite.xxx collecting and storing my data from this form“ (replacing “thesite.xxx” with your site name and please note). Enter “Consent” in the Value field.
    7. Click on the Permissions tab and set Edit Custom Field value to Allowed for the user group Public.

      Joomla! Contact form GDPR consent checkbox

      Joomla! Contact form GDPR consent checkbox

    8. Click Save.
    9. Now you a required consent checkbox should appear on your contact form.

How to migrate Phoca Gallery from Joomla! 1.5 to 3

There are some guides on how to migrate Phoca Gallery from Joomla! 1.5 to 2.5 and from 2.5 to 3 but in my case I had a really old 1.5 site that was going to be migrated from Joomla! from version 1.5 to 3. The process is very similar to migrating 1.5 to 2.5.

This is how I did it.

You will need access to both sites through:

  • FTP
  • MySQL using for example using phpMyAdmin

Files

Transfer images/phocagallery including subdirectories from the old 1.5-site to the new version 3-site

Database

  • Log in to the Joomla! 1.5 database using phpMyAdmin.
  • Go to export and select all tables beginning with the name jos_phocagallery
  • In Output select to Save output to a file
  • In Dump table select Data
  • In Syntax to use when inserting data select both

 

  • Using phpMyAdmin on your Joomla! 3-database, find out what database prefix is being used. If it is not jos_ (the default of Joomla! 1.5) open the SQL-file from the export above in a text editor
  • Do a Search and Replace, search for “jos_” and replace it with the “prefix_” of your Joomla! 3-database
  • Save the file

 

  • Using phpMyAdmin on the Joomla! 3-database, use Import to import the SQL-file
  • In phpMyAdmin, go to the SQL-tab and paste the below SQL-commands (if the database prefix is not “jos_” replace it with your “prefix_” before pasting:


UPDATE `jos_phocagallery` SET `language` = '*';
UPDATE `jos_phocagallery_categories` SET `language` = '*';
UPDATE `jos_phocagallery_comments` SET `language` = '*';
UPDATE `jos_phocagallery_fb_users` SET `language` = '*';
UPDATE `jos_phocagallery_img_comments` SET `language` = '*';
UPDATE `jos_phocagallery_img_votes` SET `language` = '*';
UPDATE `jos_phocagallery_img_votes_statistics` SET `language` = '*';
UPDATE `jos_phocagallery_tags` SET `language` = '*';

If access was not set in Phoca Gallery in Joomla! 1.5 and all categories are public, likely, you need to run the following query:

UPDATE `jos_phocagallery_categories` SET `access` = '1';

It is a good idea to go through and check all settings for Phoca Gallery.

Add custom favicon.ico to T3 bootstrap framework for Joomla!

When you are using the T3 bootstrap framwork for Joomla! to create a Joomla! responsive template, an easy way to use a custom favicon.ico is to just replace the file templates/t3_bs_blank/favicon.ico with your own.

This is fine – until you update the T3 framwork. Then your custom favicon.ico will be overwritten with the default file.

This is a solution:

  • Create an override of the file templates/t3_bs_blank/tpls/blocks/head.php and place it in templates/t3_bs_blank/local/tpls/blocks/head.php
  • Add the following code last in the file:
    <!-- LOCAL FAVICON.ICO -->
    <?php
    if (is_file(T3_TEMPLATE_PATH . '/local/favicon.ico')) {
    $this->addFavicon(T3_TEMPLATE_URL . '/local/favicon.ico');
    }
    ?>
    <!-- //LOCAL FAVICON.ICO -->
  • Now put your custom favicon.ico in templates/t3_bs_blank/local

Now your custom favicon.ico will survive updates of the T3 framework.

Joomla! 1.5 create new admin user via MySQL and phpMyAdmin

If you need to gain administrator access to a Joomla! 1.5 website where the admin password is not known (forgotten or the original admin is no longer available) you can resolve the situation by adding a new administrator user through MySQL.

For this, obviously, you need to now the database credentials. This is how you do it using MySQL and phpMyAdmin. Click on the images below to see them enlarged.

  1. Log in to phpMyAdmin using the credentials for the Joomla! database
  2. Go to the table jos_users and go to the last record. If your last user id is less than 1000 you can use the values in this example. Otherwise you have to adapt it to a user id larger than your last user id (if you have less than 1000 users in your Joomla! database user id 1000 will be fine).
  3. Insert a new record into the jos_users table:

    Joomla! 1.5 create new admin user via MySQL and phpMyAdmin step 1

    Joomla! 1.5 create new admin user via MySQL and phpMyAdmin step 1

    id = 1000
    name = A new administrator
    username = admin2
    email = admin2@example.com (or perhaps your own email address ;))
    password = d2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199
    usertype = Super Administrator
    block = 0
    sendEmail = 1
    gid = 25

    Then click on Run to save the entry

  4. Go to the table jos_core_acl_aro and insert a new record:

    Joomla! 1.5 create new admin user via MySQL and phpMyAdmin step 2

    Joomla! 1.5 create new admin user via MySQL and phpMyAdmin step 2

    id = 1000
    section_value = users
    value = 1000
    order_value = 0
    name = Administrator
    hidden = 0

    Then click on Run to save the entry

  5. Go to the table jos_core_acl_groups_aro_map and insert a new record:

    Joomla! 1.5 create new admin user via MySQL and phpMyAdmin step 3

    Joomla! 1.5 create new admin user via MySQL and phpMyAdmin step 3

    group_id = 25
    section_value = (empty)
    aro_id = 1000

    Then click on Run to save the entry

  6. Now go to the backend of your site (i.e /administrator) and log in with the username “admin2” and the password “secret” (whithout “”)
  7. Go to the user section and immediately change the password of admin2 user since “secret” is a very insecure password

Joomla! Component skeleton or framework

I was going to develop a Joomla! Component for a client and started to read the documentation on how to build a Joomla! Component. I searched online for a skeleton or framework so I didn’t have to program that from scratch. Googeling it didn’t show up any really good results.

Until I realized there are actually services for this. Component Creator is one of them. Through a web interface you can specify the details for your component and you can download a ZIP-file which is installable for Joomla! to start bulding upon.

However, documentation is something not really existing for Component Creator. Instead there are community forums and some video tutorials. I was searching the forums for a specific matter and it turned out that the same question had been asked several times by other users. The reply from the Component Creator staff was that you will get the answer to that question by buying the Premium service. So instead of documenting an answer to a common question they want each client to contact the support team to get the answer, probably in order to sell more Premium subscriptions. A bit odd to me. The free service is so limited anyway so without the Premium subscription you quickly run into it’s limitations, so they will sell them anyway.

You should also be aware that Jensen Technologies who is behind Component Creator also is a consulting business offering development of Joomla! components. So your supplier will also be kind of your competitor. I am not saying they will go and steal your business or clients but it is not always a healthy thing when your supplier is also your competitor. Their in house developers will naturally always have the best support compared to their clients.  If it was me, I would have split it into two different companies.

Anyway, the Component Creator is a powerful and helpful tool when starting a new component project for Joomla!.

The video tutorials can be found here:

There is also a webinar recorded on Youtube here:

Below is a demonstration of building a component in 30 minutes using Component Creator by Søren Beck Jensen (2015).

“Not a valid image” when trying to upload images in Joomla! 3.7

Error message “Not a valid image” displayed when trying to upload an image in Joomla! 3.7. The error message is displayed even though the file type being uploded (jpg or png for example) is existing as valid type in both valid file types and mime types fields.

Solution: Go to System -> Global configuration -> Media and select Check MIME types = No

Joomla 3.7.0 error “Warning. Empty solution not allowed” when trying to save article in frontend [solution]

After upgrade to Joomla 3.7.0 an error was displayed when saving an article in the frontend. The error message was “Warning. Empty solution not allowed”.

The error message is a bit confusing, not giving any real hint what it is about. It turns out it has to do with Captcha. A new feature in Joomla 3.7.0 is the possibility to use Captcha on article editing.

To solve the problem, go to Options -> Articles and select the Editing Layout tab. Make sure “None Selected” is set in the Captcha field and click Save. Do click Save if it is already selected because it seems the setting is missing after the upgrade. By saving, the setting will be added and the problem is solved.

Joomla 3.7.0 "Warning. Empty solution not allowed"

Joomla 3.7.0 “Warning. Empty solution not allowed”