jpcarlisle Posted July 22, 2014 Share Posted July 22, 2014 Hello, I have top1e_googletranslate and it works great, however in the error log this is what I get over and over again: [Tue Jul 22 11:38:34 2014] [warn] [client 82.103.128.63] mod_fcgid: stderr: PHP Notice: Trying to get property of non-object in /var/www/vhosts/trailerpartssupplies.com/httpdocs/cache/smarty/compile/cd/a7/b8/cda7b84d97b7643ea4c4d0e0969594dabc651597.file.top1e_googletranslate.tpl.php on line 32 [Tue Jul 22 11:39:33 2014] [warn] [client 174.34.156.130] mod_fcgid: stderr: PHP Notice: Undefined index: current_url in /var/www/vhosts/trailerpartssupplies.com/httpdocs/cache/smarty/compile/cd/a7/b8/cda7b84d97b7643ea4c4d0e0969594dabc651597.file.top1e_googletranslate.tpl.php on line 30 This just repeats over and over and was wondering how do I remove the error warning? What is this actually doing to cause the error? Note: I've cleared my cache and this still occurs. Thank you Josh Link to comment Share on other sites More sharing options...
vekia Posted July 22, 2014 Share Posted July 22, 2014 hello can you show contents of googletranslate.tpl file that you can find in module directory Link to comment Share on other sites More sharing options...
jpcarlisle Posted July 22, 2014 Author Share Posted July 22, 2014 Hello vekia, Here you go: <!--{$smarty.server.PHP_SELF} {$current_url} {$base_url} --> <div class="box-content_translate" style="width:100px; margin:0 auto;"> <div id="google_translate_element"></div> <script> function googleTranslateElementInit() { new google.translate.TranslateElement({ pageLanguage: '{$current_language_code}', layout: google.translate.TranslateElement.InlineLayout.SIMPLE }, 'google_translate_element'); } </script> <script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> </div> Link to comment Share on other sites More sharing options...
vekia Posted July 22, 2014 Share Posted July 22, 2014 that's all? nothing more? this module is free? if so, can you share url, please? Link to comment Share on other sites More sharing options...
jpcarlisle Posted July 22, 2014 Author Share Posted July 22, 2014 There website is http://top1extensions.com/free-prestashop-modules/31-google-translate-site-prestashop.html my website is http://trailerpartssupplies.com/ Sorry maybe this will help this is the top1e_googletranslate.php the .tpl wasn't so useful <?php if (!defined('_PS_VERSION_')) exit; class Top1e_GoogleTranslate extends Module { public function __construct() { $this->name = 'top1e_googletranslate'; $this->tab = 'My Module'; $this->version = '1.0'; $this->author = 'Top1Extensions'; parent::__construct(); $this->displayName = $this->l('Google Translate - Top1Extensions'); $this->description = $this->l('Add google translate on your site'); $this->confirmUninstall = $this->l('Are you sure that you want to delete your Google Translate?'); } public function install() { if (!parent::install() || !$this->registerHook('header')) return false; return true; } public function uninstall() { if (!parent::uninstall()) return false; return true; } private function _displayHelp() { $this->_html .= ' <br/> <fieldset> <legend><img src="'.$this->_path.'help.png" alt="" title="" /> '.$this->l('Help').'</legend> For customizations or assistance, please contact: <strong>support@top1extensions.com</strong> <br> <a href="http://top1extensions.com/" alt="top1extensions" title="top1extensions">http://top1extensions.com/</a> </fieldset>'; } private function _displayAboutUs() { $this->_html .= ' <br/> <fieldset> <legend><img src="'.$this->_path.'aboutus.png" alt="" title="" /> '.$this->l('About us').'</legend> <h3 style="margin:0;">ABOUT TOP1EXTENSIONS.COM</h3> <p> We are a teams of seasoned web professionals with many years of hands-on experience and alway use new technology, so we will bring best solutions for your site. </p> </fieldset>'; } public function _displayAdvertising(){ $this->_html .= ' <br/> <fieldset> <legend><img src="'.$this->_path.'more.png" alt="" title="" /> '.$this->l('More modules').'</legend> <iframe src="http://top1extensions.com/advertising/prestashop_advertising.html" width="100%" height="335px;" border="0" style="border:none;"></iframe> </fieldset>'; } public function getContent() { $this->_html = '<h2><img src="'.$this->_path.'logo.png" alt="" /> '.$this->displayName.'</h2>'; $this->_postProcess(); $this->_displayHelp(); $this->_displayAboutUs(); $this->_displayAdvertising(); return $this->_html; } private function _postProcess() { global $currentIndex; $errors = array(); } function hookHeader($params) { global $smarty; global $cookie; $id_lang = $cookie->id_lang; // $iso_code = $this->context->language->iso_code; $this->smarty->assign('current_language_code',$id_lang); return $this->display(__FILE__, 'top1e_googletranslate.tpl'); } } ?> Link to comment Share on other sites More sharing options...
jpcarlisle Posted July 22, 2014 Author Share Posted July 22, 2014 I found this in the cache location: <?php /* Smarty version Smarty-3.1.14, created on 2014-07-22 16:12:19 compiled from "/var/www/vhosts/trailerpartssupplies.com/httpdocs/modules/top1e_googletranslate/top1e_googletranslate.tpl" */ ?> <?php /*%%SmartyHeaderCode:53664388553cec5a38a36d8-64615181%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed'); $_valid = $_smarty_tpl->decodeProperties(array ( 'file_dependency' => array ( 'cda7b84d97b7643ea4c4d0e0969594dabc651597' => array ( 0 => '/var/www/vhosts/trailerpartssupplies.com/httpdocs/modules/top1e_googletranslate/top1e_googletranslate.tpl', 1 => 1404933116, 2 => 'file', ), ), 'nocache_hash' => '53664388553cec5a38a36d8-64615181', 'function' => array ( ), 'variables' => array ( 'current_url' => 0, 'base_url' => 0, 'current_language_code' => 0, ), 'has_nocache_code' => false, 'version' => 'Smarty-3.1.14', 'unifunc' => 'content_53cec5a38c69d5_14172677', ),false); /*/%%SmartyHeaderCode%%*/?> <?php if ($_valid && !is_callable('content_53cec5a38c69d5_14172677')) {function content_53cec5a38c69d5_14172677($_smarty_tpl) {?><!--<?php echo $_SERVER['PHP_SELF'];?> <?php echo $_smarty_tpl->tpl_vars['current_url']->value;?> <?php echo $_smarty_tpl->tpl_vars['base_url']->value;?> --> <div class="box-content_translate" style="width:100px; margin:0 auto;"> <div id="google_translate_element"></div> <script> function googleTranslateElementInit() { new google.translate.TranslateElement({ pageLanguage: '<?php echo $_smarty_tpl->tpl_vars['current_language_code']->value;?> ', layout: google.translate.TranslateElement.InlineLayout.SIMPLE }, 'google_translate_element'); } </script> <script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> </div> <?php [spam-filter] ?> Link to comment Share on other sites More sharing options...
samyha Posted July 23, 2014 Share Posted July 23, 2014 Hello, This isn't the right section for your post. I move your topic to the "Configuring & using PrestaShop" section. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now