Can't get rid of component on startpage

LAMF
12 years, 8 months ago
I have tried to disable the GTranslate plug-in as you mentioned that this was most likely where the problem was.
You were unfortunately right... This makes this a very unpleasant issue as I have to use the GTranslate and also Mobile Joomla... aaargh.. WHat can I do to solve this?
I have asked the GTranslate team for a solution as well and I suppose I'm not the only one in the world that will use both MJ and GTranslate Pro on a J2.5 site so it might be kinda interesting to get this solved.
dryabov
12 years, 8 months ago
Let me shortly explain the reason of such a conflict (for other readers).

Mobile Joomla detects home page by analyzing of global $_GET array that contains parameters from URL (and parameters from parsed SEF URL). In the case of homepage it's either empty, or contains parameters of home menu item only.

But GTranslate plugin pollute this array with a lot of additional parameters (api_key, bing_api_key, cache_time, ssl_verify_peer, auto_detect, auto_detect_user, main_lang, and debug_mode). As a result, MJ cannot detect homepage correctly.

The only solution here is to patch plugins/system/mobilebot.php (because of GTranslade is crypted by ionCube) by adding
unset($current['api_key']);
unset($current['bing_api_key']);
unset($current['cache_time']);
unset($current['ssl_verify_peer']);
unset($current['auto_detect']);
unset($current['auto_detect_user']);
unset($current['main_lang']);
unset($current['debug_mode']);

after
$current = $_GET;


And unlikely this patch will be included into official MJ release, so you should apply it after each MJ update.
LAMF
12 years, 8 months ago
Finallly!!!

Thanx Denis you're the hero of the day!
2

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.