Error Report & Backtrace


#1

I received an error when trying to go to settings. I replaced libs/Smarty and plugins/UserManager. I could then get to settings, see the websites, but they weren’t listed on the dashboard. I can’t interact with the UI to change dates/site, etc. Not sure if that added commentary helped.


There is an error. Please report the message and full backtrace in the Piwik forums.

User Error: Smarty error: [in /var/www/vhosts/_mydomain_/httpdocs/piwik/plugins/UsersManager/templates/userSettings.tpl line 9]: syntax error: unrecognized tag 'var' (Smarty_Compiler.class.php, line 590) in /var/www/vhosts/_mydomain_/httpdocs/piwik/libs/Smarty/Smarty.class.php on line 1093

Backtrace -->
#0 Piwik_ErrorHandler(256, Smarty error: [in /var/www/vhosts/_mydomain_/httpdocs/piwik/plugins/UsersManager/templates/userSettings.tpl line 9]: syntax error: unrecognized tag 'var' (Smarty_Compiler.class.php, line 590), /var/www/vhosts/_mydomain_/httpdocs/piwik/libs/Smarty/Smarty.class.php, 1093, Array ([error_msg] => [in /var/www/vhosts/_mydomain_/httpdocs/piwik/plugins/UsersManager/templates/userSettings.tpl line 9]: syntax error: unrecognized tag 'var' (Smarty_Compiler.class.php, line 590),[error_type] => 256))#1 trigger_error(Smarty error: [in /var/www/vhosts/_mydomain_/httpdocs/piwik/plugins/UsersManager/templates/userSettings.tpl line 9]: syntax error: unrecognized tag 'var' (Smarty_Compiler.class.php, line 590), 256) called at [/var/www/vhosts/_mydomain_/httpdocs/piwik/libs/Smarty/Smarty.class.php:1093]#2 Smarty->trigger_error([in /var/www/vhosts/_mydomain_/httpdocs/piwik/plugins/UsersManager/templates/userSettings.tpl line 9]: syntax error: unrecognized tag 'var' (Smarty_Compiler.class.php, line 590), 256) called at [/var/www/vhosts/_mydomain_/httpdocs/piwik/libs/Smarty/Smarty.class.php:1815]#3 Smarty->_trigger_fatal_error(syntax error: unrecognized tag 'var', /var/www/vhosts/_mydomain_/httpdocs/piwik/plugins/UsersManager/templates/userSettings.tpl, 9, /var/www/vhosts/_mydomain_/httpdocs/piwik/libs/Smarty/Smarty_Compiler.class.php, 590, 256) called at [/var/www/vhosts/_mydomain_/httpdocs/piwik/libs/Smarty/Smarty_Compiler.class.php:2256]#4 Smarty_Compiler->_syntax_error(unrecognized tag 'var', 256, /var/www/vhosts/_mydomain_/httpdocs/piwik/libs/Smarty/Smarty_Compiler.class.php, 590) called at [/var/www/vhosts/_mydomain_/httpdocs/piwik/libs/Smarty/Smarty_Compiler.class.php:590]#5 Smarty_Compiler->_compile_tag(var params; var defaultDate = $('input[name=defaultDate]:checked').val(); if(defaultDate == 'today' || defaultDate == 'yesterday') { params = 'period=day&date='+defaultDate;) called at [/var/www/vhosts/_mydomain_/httpdocs/piwik/libs/Smarty/Smarty_Compiler.class.php:312]#6 Smarty_Compiler->_compile_file(/var/www/vhosts/_mydomain_/httpdocs/piwik/plugins/UsersManager/templates/userSettings.tpl, /*! * Piwik - Web Analytics * * @link http://piwik.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */function getUserSettingsAJAX(){ var params; var defaultDate = $('input[name=defaultDate]:checked').val(); if(defaultDate == 'today' || defaultDate == 'yesterday') { params = 'period=day&date='+defaultDate; } else { params = 'date=today&period='+defaultDate; } var ajaxRequest = piwikHelper.getStandardAjaxConf('ajaxLoadingUserSettings', 'ajaxErrorUserSettings', params); var alias = encodeURIComponent( $('#alias').val() ); var email = encodeURIComponent( $('#email').val() ); var password = encodeURIComponent( $('#password').val() ); var passwordBis = encodeURIComponent( $('#passwordBis').val() ); var defaultReport = $('input[name=defaultReport]:checked').val(); if(defaultReport == 1) { defaultReport = $('#defaultReportWebsite option:selected').val(); } var request = ''; request += 'module=UsersManager'; request += '&action=recordUserSettings'; request += '&format=json'; request += '&alias='+alias; request += '&email='+email; request += '&password='+password; request += '&passwordBis='+passwordBis; request += '&defaultReport='+defaultReport; request += '&defaultDate='+defaultDate; request += '&token_auth=' + piwik.token_auth; ajaxRequest.data = request; return ajaxRequest;}function getAnonymousUserSettingsAJAX(){ var ajaxRequest = piwikHelper.getStandardAjaxConf('ajaxLoadingAnonymousUserSettings', 'ajaxErrorAnonymousUserSettings'); var anonymousDefaultReport = $('input[name=anonymousDefaultReport]:checked').val(); if(anonymousDefaultReport == 1) { anonymousDefaultReport = $('#anonymousDefaultReportWebsite option:selected').val(); } var anonymousDefaultDate = $('input[name=anonymousDefaultDate]:checked').val(); var request = ''; request += 'module=UsersManager'; request += '&action=recordAnonymousUserSettings'; request += '&format=json'; request += '&anonymousDefaultReport='+anonymousDefaultReport; request += '&anonymousDefaultDate='+anonymousDefaultDate; request += '&token_auth=' + piwik.token_auth; ajaxRequest.data = request; return ajaxRequest;}$(document).ready( function() { $('#userSettingsSubmit').click( function() { $.ajax( getUserSettingsAJAX() ); }); $('#userSettingsTable input').keypress( function(e) { var key=e.keyCode || e.which; if (key==13) { $('#userSettingsSubmit').click(); }}); $('#anonymousUserSettingsSubmit').click( function() { $.ajax( getAnonymousUserSettingsAJAX() ); });});, ) called at [/var/www/vhosts/_mydomain_/httpdocs/piwik/libs/Smarty/Smarty.class.php:1489]#7 Smarty->_compile_source(/var/www/vhosts/_mydomain_/httpdocs/piwik/plugins/UsersManager/templates/userSettings.tpl, /*! * Piwik - Web Analytics * * @link http://piwik.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */function getUserSettingsAJAX(){ var params; var defaultDate = $('input[name=defaultDate]:checked').val(); if(defaultDate == 'today' || defaultDate == 'yesterday') { params = 'period=day&date='+defaultDate; } else { params = 'date=today&period='+defaultDate; } var ajaxRequest = piwikHelper.getStandardAjaxConf('ajaxLoadingUserSettings', 'ajaxErrorUserSettings', params); var alias = encodeURIComponent( $('#alias').val() ); var email = encodeURIComponent( $('#email').val() ); var password = encodeURIComponent( $('#password').val() ); var passwordBis = encodeURIComponent( $('#passwordBis').val() ); var defaultReport = $('input[name=defaultReport]:checked').val(); if(defaultReport == 1) { defaultReport = $('#defaultReportWebsite option:selected').val(); } var request = ''; request += 'module=UsersManager'; request += '&action=recordUserSettings'; request += '&format=json'; request += '&alias='+alias; request += '&email='+email; request += '&password='+password; request += '&passwordBis='+passwordBis; request += '&defaultReport='+defaultReport; request += '&defaultDate='+defaultDate; request += '&token_auth=' + piwik.token_auth; ajaxRequest.data = request; return ajaxRequest;}function getAnonymousUserSettingsAJAX(){ var ajaxRequest = piwikHelper.getStandardAjaxConf('ajaxLoadingAnonymousUserSettings', 'ajaxErrorAnonymousUserSettings'); var anonymousDefaultReport = $('input[name=anonymousDefaultReport]:checked').val(); if(anonymousDefaultReport == 1) { anonymousDefaultReport = $('#anonymousDefaultReportWebsite option:selected').val(); } var anonymousDefaultDate = $('input[name=anonymousDefaultDate]:checked').val(); var request = ''; request += 'module=UsersManager'; request += '&action=recordAnonymousUserSettings'; request += '&format=json'; request += '&anonymousDefaultReport='+anonymousDefaultReport; request += '&anonymousDefaultDate='+anonymousDefaultDate; request += '&token_auth=' + piwik.token_auth; ajaxRequest.data = request; return ajaxRequest;}$(document).ready( function() { $('#userSettingsSubmit').click( function() { $.ajax( getUserSettingsAJAX() ); }); $('#userSettingsTable input').keypress( function(e) { var key=e.keyCode || e.which; if (key==13) { $('#userSettingsSubmit').click(); }}); $('#anonymousUserSettingsSubmit').click( function() { $.ajax( getAnonymousUserSettingsAJAX() ); });});, , /var/www/vhosts/_mydomain_/httpdocs/piwik/tmp/templates_c/%%A7^A71^A7154681%%userSettings.tpl.inc) called at [/var/www/vhosts/_mydomain_/httpdocs/piwik/libs/Smarty/Smarty.class.php:1422]#8 Smarty->_compile_resource(/var/www/vhosts/_mydomain_/httpdocs/piwik/plugins/UsersManager/templates/userSettings.tpl, /var/www/vhosts/_mydomain_/httpdocs/piwik/tmp/templates_c/%%A7^A71^A7154681%%userSettings.tpl.php) called at [/var/www/vhosts/_mydomain_/httpdocs/piwik/libs/Smarty/Smarty.class.php:1261]#9 Smarty->fetch(/var/www/vhosts/_mydomain_/httpdocs/piwik/plugins/UsersManager/templates/userSettings.tpl) called at [/var/www/vhosts/_mydomain_/httpdocs/piwik/core/View.php:172]#10 Piwik_View->render() called at [/var/www/vhosts/_mydomain_/httpdocs/piwik/plugins/UsersManager/Controller.php:128]#11 Piwik_UsersManager_Controller->userSettings()#12 call_user_func_array(Array ([0] => Piwik_UsersManager_Controller Object ([] => UsersManager,[] => 2011-02-24,[] => Piwik_Date Object ([] => 1298533269,[] => UTC),[] => 1,[] => Piwik_Site Object ([] => 1)),[1] => userSettings), Array ()) called at [/var/www/vhosts/_mydomain_/httpdocs/piwik/core/FrontController.php:125]#13 Piwik_FrontController->dispatch() called at [/var/www/vhosts/_mydomain_/httpdocs/piwik/index.php:60]


(vipsoft) #2

The error message shows that plugins/UsersManager/templates/userSettings.tpl is a copy of userSettings.js on your system. Looks like you uploaded the file using the wrong filename.

What did you mean by “replaced libs/Smarty”? That shouldn’t be necessary. Piwik has the latest stable version of Smarty 2.x.


#3

Thank you. I wasn’t quite sure what was wrong. I guess I meant “re-uploaded” rather than replace in terms of smarty & friends.

I don’t know what happened, but it looked like there was an issue on my ftp client. I simply reuploaded the entire plugins directory and my problem is gone.

For whatever reason, it is working.

Thank you.