Kamermans Mobile Analytics Plugin not working with ver. 1.8.2

HI,

I’m a newbie, but very interested in Piwik. I’ve got a huge problem, please somebody help me out :S

I just installed Piwik 1.8.2 and after installing ''kamermans Mobile Analytics Plugin’
I get the following error when I go to settings > Mobile Analytics:

Error while trying to read a specific config file entry ‘MobileAnalytics’ from your configuration files.If you just completed a Piwik upgrade, please check that the file config/global.ini.php was overwritten by the latest Piwik version.

Backtrace:

#0 /home/wwwhealt/public_html/detector/core/Config/Compat.php(132): Piwik_Config->__get(‘MobileAnalytics’)
#1 /home/wwwhealt/public_html/detector/plugins/MobileAnalytics/MobileAnalytics.php(303): Piwik_Config_Compat->__get(‘MobileAnalytics’)
#2 /home/wwwhealt/public_html/detector/plugins/MobileAnalytics/Controller.php(52): Piwik_MobileAnalytics::settingsExist()
#3 /home/wwwhealt/public_html/detector/core/FrontController.php(138): Piwik_MobileAnalytics_Controller->adminMenu()
#4 /home/wwwhealt/public_html/detector/index.php(53): Piwik_FrontController->dispatch(Array, Array)
#5 {main}

please try to add a [MobileAnalytics] sectionin config/config.ini.php ?

I’m running Piwik 1.8.3 and the config.ini.php file contains the relevant [MobileAnalytics] section:

[MobileAnalytics]
TeraWurflURL = "http://yourserver/Tera-WURFL/webservice.php"
TeraWurflPath = "/var/www/html/TeraWurfl/TeraWurfl.php"
TeraWurflMode = “disabled”

These are the default values. However when I change these settings, enable the plugin and add a url for the webservice, the settings remain unchanged. Response message in configuration page is “Your changes have been saved.”

The webservice is being polled and working, response for mobile analytics plugin is {“result”:“success”, “message”:“ok”}

Could the issue of not saving changed settings be related to Config class refactoring · Issue #1713 · matomo-org/matomo · GitHub?
At the moment /MobileAnalytics/MobileAnalytics.php looks like this:


public static function saveSetting($name,$value){
                if(!self::settingsExist()) self::createSettings();
                $config = Zend_Registry::get('config');
                $mobile = $config->MobileAnalytics->toArray();
                $mobile[$name] = $value;
                $config->MobileAnalytics = $mobile;
                $config->__destruct();
                Piwik::createConfigObject();
        }

How would this be rewritten using Piwik_Config::getInstance() and Piwik_Config_Writer::getInstance() syntax?

see my diff at: mobile analytics piwik plugin 1.8 update · GitHub

I don’t remember if i fixed all function or only the ones i needed to work. but saving and general usage works fine.

Thank you! Configuration is saved now, and I’ve a working connection to a local WURFL webservice. The mobile analytics widgets are returning data, so they work fine.

This code update worked fine for 1.8x but no more on the 1.9x. The plugin is no more in the tierce part plugin rep, it is back in the feature request. Has anyone started to look into this?

Charles

Hi Charles,

I had it running successfully on 1.8.x, upgraded to 1.9.1 and after that upgraded to 1.9.2. No problems for me in 1.9.2, still collecting data. Did you update the code with the modifications made by metadude:

[quote=metadude]
see my diff at: mobile analytics piwik plugin 1.8 update · GitHub

I don’t remember if i fixed all function or only the ones i needed to work. but saving and general usage works fine.[/quote]

What part not working?

Tom

Yes I did upgrade the code with Metadude’s, but when I activate the plugin, no new log is taken into account by piwik. Any idea why?
When I deactivate it, all stats are running fine.

Amanka, I have no clue.

thanks for answering. Good day

Maybe you can enable debugging to get some more info about what’s causing it: 301 Moved Permanently