Anchor links does not scroll to the correct position

There are several issues that can cause local anchor links to not scroll to the right position. The first thing to check is if you have an id-tag that has the same name as the anchor. In this case the browser will scroll to the id position instead. The solution is to name the anchor and id with different names.

Example:

<div name="myanchor">
<p>Some random text</p>
</div>
<a href="#myanchor">Go to some random text</a>

The above example will behave as expected.

But in this example the link will scroll to the h1 instead of the div:

<h1 id="myanchor">
<div>
<p>Some other random text</p>
</div>
<div name="myanchor">
<p>Some random text</p>
</div>
<a href="#myanchor">Go to some random text</a>

To avoid this, make sure the anchors (name) and id have different names.

There are also other sitiuations where the local anchor does not scroll correctly covered in this article.

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.

MySQL not sorting swedish characters ÅÄÖ correct [solved]

Problem: When using ORDER BY or GROUP BY, the swedish characters Å,Ä and Ö is sorted as A and O.

Solution: add COLLATE utf8_swedish_ci to your ORDER BY or GROUP BY, for example:

SELECT field1,field2 FROM table1 ORDER BY field1 ASC

should be changed to:

SELECT field1,field2 FROM table1 ORDER BY field1 COLLATE utf8_swedish_ci ASC

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.

PrestaShop

Error 500 after PrestaShop upgrade from 1.5 to 1.6

Upgrading a PrestaShop 1.5 to 1.6 resulted in Error 500 when visiting the shop frontend. During the upgrade I had selected to disable all non native modules, replace theme with default theme and updating all emails.

I tried every trick in  the book, like cleaning the cache, disable all caching and compression, etc but it didn’t help.

The problem was solved like this:

  • Go to Preferences -> Themes
  • Make sure the default-bootstrap theme is selected
  • Click on the Advanced options button for the theme
  • It turned out the setting for Folder was not set to any folder (no radio button selected). Select default-bootstrap folder and Save

This solved the problem for me.

Mac OSX installing software update

Mac OSX “El Capitan” software update stuck on “11 minutes remaining”

When installing a software update for Mac OSX “El Capitan” that required a system reboot to install, it seemed stuck on the white screen displaying a text “Installing software update: About 11 minutes”.

Mac OSX installing software update

Mac OSX installing software update

The solution was quite simple – just wait. It seems the time calculation is really off. After about an hour it stepped down to 10 minutes, so it’s not stuck. It just takes a lot longer than the system calculates.

Automatic SMS / text message to email forward

Sometimes my clients send me messages as SMS or “texts” on my mobile phone. That might be relevant for an urgent matter but often is being used instead of mail. From my clients view, they just see it as another, non-intrusive, way of sending me a message instead of calling which is polite as a phone call can be more interrupting than a text message.

A problem with SMS or text messages is that when they arrive I must read it to be able to decide if it is urgent and need immediate attention or if it can be responded to later. Once read, the “new message” notification on my phone is gone and I must remember to handle it later. There is a risk that I might forget.

My clients are also the reason I’m in business so I’m not complaining about my clients contacting my in any way (well ok, I might complain if they call me at 3 in the night wanting to discuss some non critical issue 🙂 ). Instead I find solutions and make things work better.

So one way of handling the problem of forgetting matters sent to me via SMS or text was that I installed an app in my phone that automatically forwards any incoming SMS as an email to my inbox. That way I can sort it into my normal work handling queues or even my ticket system.

There are many apps available for this, some free, some paid, with different amount of features in it. Some has advanced filtering and some can forward only messages from specific senders (or vice versa, forward all messages except from specfic senders).

In my case the best solution was just a simple app that forwards all incoming SMS as email so I use Relay Me (yes, I use Android) which works for me. There are probably similar solutions on other, non Android, platforms.

The best solution is to set up a specfic email account for the app (like yourphonenumber@somedomain.com for example), not using your normal email account, because the app works both ways. If you reply to an email on your inbox that originated as a SMS via Relay Me, the reply will be picked up by the app and sent back as SMS to the sender.

For obvoius reasons the app will need data connection to the Internet to be able to send emails, so having a data plan on your mobile subscription is a good idea. The reason I liked Relay Me was, apart from other things, that it works directly with my own email servers, so there are no intermediate servers handling my messages.

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.

How to disable iCloud sync on Mac while on mobile data

When you are connected to the Internet through a network with limited bandwidth or restricted data plan it is desirable to reduce the data consumption. In this case, disabling iCloud sync is something you want to do.

In Windows, you can easily mark a wifi network as limited by data plan and this will automatically inhibit Windows updates to download and it will also make cloud services not to sync.

In the world of Apple and Mac OSX, it seems like Apple assumes that when you are on a wireless or wired network, bandwidth is unlimited. Period. If this only was true, what a great world to live in! The news is that this is not how it works in the real world. Unfortunaly, because of this there is no function to disable or pause iCloud syncing at all. A simple feature present in all other cloud services like One-drive, Dropbox etc.

The solution, which works excellent is called TripMode. This piece of software gives you the control you want over any application using your Internet data.