Disable Joomla! two-factor authentication

The Joomla! two-factor authentication is a great security improvement. But if you got locked out, maybe because your smartphone with the Google Authenticator installed broke down, was factory reset or the app was uninstalled – what to do?

  1. First of all, reinstall the Google Authenticator app back into your smartphone or tablet
  2. Use FTP software or similar to access the Joomla! installation directory
  3. Go to the plugins folder
  4. Rename the folder twofactorauth to something else
  5. Access the backend login page (i.e. /administrator) of your site
  6. Now the secret key field is gone, so proceed and login with just username and password
  7. Once logged in, you can rename the plugin folder back to twofactorauth
  8. Go to Users in the Joomla! backend and find your user account and click on it
  9. Click the Two factor authentication tab and scan the QR code with Google Authenticator on your smartphone/tablet
  10. Done! Now you can login using two factor authentication again

SiteOrigin Pagebuilder and widgets not working after site move / migration [solution]

Normally when moving, mirating or deploying a WordPress site, I use the Akeeba Backup plugin for WordPress. This works excellent, also for sites built using SiteOrigin Pagebuilder and SiteOrigin widgets bundle.

If, for some reason, it is not possible to use Akeeba Backup and a more traditional approach is used, like transferring the files using FTP, dumping the database to a SQL file, replacing the urls in the SQL file from the old url to the new, you will run into trouble if the old and new urls have different lengths (number of characters) because Pagebuilder uses something called serialization.

However, there is a solution:

  1. Transfer all the site files using FTP to the new server
  2. Edit wp-config.php on the new server regarding database host, database name, database username and database password
  3. On the old server, use for example phpmyadmin to export the database to a SQL file
  4. On the new server, import the SQL file using for example phpmyadmin
  5. In phpmyadmin on the new server, go to the PREFIX_options table and find the key siteurl and update it to the new url (do not change anything else)
  6. Log in to wp-admin on the new server and install the Better Search and Replace plugin (this one handles serialization)
  7. Go to Tools -> Better Search & Replace
  8. Enter your old url in the “Search for field” and the new url in the “Replace with” field
  9. Click the “Run Search/Replace” button (this will simulate the search and replace process)
  10. If everything looks normal and it reports there are a number of replacement possible, deselect “Run as dry run” and click the button again

SIP-client behind NAT disconnects incoming external call after 8-10 seconds

Scenario: a SIP server running Elastix (Asterisk and FreePBX) with SIP-clients behind NAT. Outgoing calls from the clients (which where CounterPath Xten and Siemens Gigaset C530ip, i.e. completely different brands) works well, but incoming calls are disconnected after 8-10 seconds.

Googleing the problem suggests the problem is caused by a SIP REINVITE on the client side, which can’t happen because of NAT. During testing, I discovered that calls between SIP-phones connected to the same SIP PBX worked fine, even between different locations. Only calls that originated externally would be interrupted.

This made me focus on the trunks instead and I found out that the problem indeed was a REINVITE but it occured on the trunk side.

The solution was to add the following lines to the PEER DETAILS and USER DETAILS on the trunk configuration in the SIP server:

directmedia=no
canreinvite=no