CSS background-position not working on Android Mozilla

In order to position a background image inside a div I tried to use the CSS3:

background-position: right 10px center;

The goal was to position the background image to the right of a div container, 10px from the right edge and vertically centered. This worked fine in most browsers. However, in the Android devices using the native Mozilla browser the background was positioned at 0,0 (i.e. left top).

The solution was to use:

background-position: right center;

and edit the background image where I added 10 px of extra transparent space into the image.

How to convert a SVG (scalable vector graphics) image to PNG

This method aims at Windows users but similar methods are probably also useable in other environments.

  1. Right click on the SVG image file and select Open with
  2. Select Internet Explorer
  3. In Internet Explorer right click on the image and select Save image as
  4. In the File Format box switch from Scalable Vector Graphics (*.svg) to PNG (*.png) 
  5. Click Save

For Ubuntu there is a simple solution described here -> http://www.upubuntu.com/2012/06/how-to-convert-svg-files-to-other-image.html

Cron scripts in /etc/cron.daily not running

If you put a script to be run by cron in cron.hourly, cron.daily, cron.weekly or cron.monthly but they won’t run, make sure that they:

  • Are chmod +x
  • Are owned by the correct user (like root:root)
  • Start with #!/bin/sh or the corresponding shell used to execute them
  • The filename doesn’t contain any dots, like a script name ending in .sh will not execute

You can also execute the command to verify that your script will be run:

run-parts –test /etc/cron.daily

My mobile phone has been stolen – how do I find it?

Track and find a stolen mobile phone is often done in vain. If you forgot it somewhere there is a chance to locate it, but if it was stolen for example by a pick pocket, they usually know to turn it off immediately and then wipe it before it has a chance to report it’s location. But it is worth a try.

Apart from that, call your provider to lock your SIM card and the phone IMEI numer (makes it unusable with other SIM cards). Change passwords for all the apps you had installed, like Facebook, email etc.

Android: Use Android Device Manager and login using the same Google account you used to initially set up the phone. Click on Locate device.

iPhone: Use iCloud and login using your Apple ID. Can be used to find your missing Mac, iPhone or iPad.

Windows phone: Use Microsoft and login using your Microsoft Account (former Windows Live ID). Go to Find my device.

Smooth scrolling not working for my website on IOS devices like iphone and ipad

On iPhone and iPad, i.e. IOS devices, in some cases the smooth, accelerated scrolling is not working. Instead the web page feels “lagging”, slow or stuttering and won’t continue to scroll in the smooth accelerated way you are used to.

To solve this, make sure to use overflow-y: scroll; (not auto) and apply  -webkit-overflow-scrolling: touch; to body and possibly other elements. If it is not enough to apply it to the body you might need to also apply it to your div:s, like the wrapper div and so on.

body {
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}

Joomla t3 bootstrap dropdown submenu not working on tablet and phone

A template based on t3 boostrap framework has a problem when click a menu item where there is a submenu dropping down. The visitor has no possibility to click the submenu item. The problem occurs in the android native browser but works fine in chrome for android. Some reports says the same problem occurs in the iphone/Ipad safari browser too.

To resolve this, go to the templetes in joomla backend and configure the t3 bs. Go to navigation and change dropdown trigger from hover to click (as tablets and phones doesn’t have the possibility of hovering).

FormMail.pl keeps reporting Bad referrer

I used FormMail.pl from Matt’s Script Archive on one of my web sites and called this script from several other web sites. This way I only need to maintain one copy of the script regarding updates.

The script began complaining about “Bad referrer” when called from my other sites, even though I could positively verify that the other site’s domain name was present in the referrers of FormMail.pl.

Not finding the problem in the script itself I began to think over what I had recently changed on the site hosting the FormMail.pl and one thing was that I recently added a http redirect any incoming calls that didn’t go to the site url using https and I also redirected www.sitename to just sitename. For example, a call to http://www.sitename was redirected to https://sitename using Apache’s http rewrite module.

On my other sites using the FormMail.pl script from the main site, I was calling the FormMail.pl using a url beginning with http://www, i.e. the call was redirected by http redirect rules. When changing the url to call the FormMail.pl script to https://sitename (i.e. using SSL and no www), the call would not be touched by http redirect rules and voila – everything was working again.

PrestaShop PHP error Cannot redeclare class BlowfishCore on Ubuntu 14.04 server [solution]

Edit /etc/php5/cgi/conf.d/05-opcache.ini. Add:

opcache.enable=0
opcache.enable_cli=0

Joomla error “Table jf_content doesn’t exist” after migration from Joomla 2.5 to 3.4

I was working on a migration project on site running Joomla 2.5, moving it over to Joomla 3.4. On some pages I received an error screen with SQL errors saying, among other things, “Table jf_content doesn’t exist”.

I found out that the common factor for the pages with errors was that they used the include_content_item plugin. I tried downloading the latest version of the plugin, which was 3.0.12 released in June 2014 supporting up to Joomla 3.3. However I was now running Joomla 3.4 and this didn’t solve my problem.

So I had to start looking for an alternative and found the Articles Anywhere extension which gave me similar functionality. After the include_content_item plugin was uninstalled and replaced by Articles Anywhere my problem was solved.

Joomla com_weblinks not working after upgrade from Joomla 2.5 to 3.4

After upgrading my Joomla 2.5 site to Joomla 3.4 the com_weblinks stopped working. I got error messages like these:

Notice: Trying to get property of non-object in /var/www/SOMESITE/components/com_weblinks/models/category.php on line 87 Warning: Creating default object from empty value in /var/www/SOMESITE/components/com_weblinks/models/category.php on line 88 Notice: Undefined property: stdClass::$url in /var/www/clients/client1/web2/web/webhotel24-2/modules/mod_weblinks/helper.php on line 92
Notice: Undefined property: stdClass::$title in /var/www/SOMESITE/modules/mod_weblinks/tmpl/default.php on line 21 Notice: Undefined property: stdClass::$description in /var/www/SOMESITE/modules/mod_weblinks/tmpl/default.php on line 38

As of Joomla 3.4 the com_weblinks is no longer a core part of the Joomla distribution. Instead it is found in the Joomla Extensions Directory (JED). To try to solve the problem I downloaded the latest com_weblinks from JED and tried to install it in my Joomla 3.4 site. This failed with an SQL error however

After trying to manually delete the weblinks package originating from Joomla 2.5 from the site (by deleting the folders com_weblinks folders and renaming the table ending with the name “_weblinks”) I ended up in a kind of deadlock situation where I wasn’t able to install the new weblinks from Joomla Extensions directory either. It didn’t install due to SQL errors.

The problem with upgrading a weblinks package that has been present during a Joomla 2.5.28 -> Joomla 3.4.0 problems are being adressed here. However, just downloading the suggested pkg_weblinks341 didn’t solve the problem for me either. Trying to install it in my Joomla 3.4 site gave SQL errors about columns images and version already existing in the table ending with the name “_weblinks”. Just deleting the table “_weblinks” gave another error about the table “_weblinks” not exisiting.

This is how I solved it.

Warning! 1) The below solution will have the drawback of deleting all your existing weblinks, but it will get the extension up and running with Joomla 3.4 and 2) make backup of your site and database before you begin!

So my solution was:

  • Using phpMyAdmin I made a copy of the table with the name ending with “_weblinks” to a name ending with “_weblinks_OLDJ25” (just to have an easily accessible backup of the table)
  • Using phpMyAdmin I deleted the columns images and version from the table “_weblinks”
  • I downloaded pkg_weblinks341 and now it was possible to install it using the normal Joomla extension install