mark4040 Posted June 5, 2011 Share Posted June 5, 2011 Hi guysCan anyone help me when i go into the B/O and click the tab modules they are not there how do i get them back.Thank you all. Link to comment Share on other sites More sharing options...
Asenar Posted June 5, 2011 Share Posted June 5, 2011 can you display errors and paste here the error message ? ( you can enable it in config/config.inc.php) Link to comment Share on other sites More sharing options...
shokinro Posted June 6, 2011 Share Posted June 6, 2011 there are filtering conditions in the module pages. maybe it just filtering issue. if this is the case try to click on the "reset" button. If the modules page is empty, there must be some error happen. Follow Michaël's suggestion to show the errors. Link to comment Share on other sites More sharing options...
mark4040 Posted June 6, 2011 Author Share Posted June 6, 2011 HiWhere do i find the reset buttonThanks Link to comment Share on other sites More sharing options...
Asenar Posted June 6, 2011 Share Posted June 6, 2011 If you don't see the reset button, that mean you have to follow my suggestions :open config/config.inc.php and replaceini_set('display_errors','off'); by ini_set('display_errors','On');error_reporting(E_ALL); Link to comment Share on other sites More sharing options...
mark4040 Posted June 6, 2011 Author Share Posted June 6, 2011 Hi MichaelI have done what you said and got this errorFatal error: Call to undefined method Tools::getProtocol() in /home/onestopa/public_html/classes/Module.php(323) : eval()'d code on line 106 Link to comment Share on other sites More sharing options...
Asenar Posted June 6, 2011 Share Posted June 6, 2011 So it seems your php file classes/Tools.php is not correct. When I see mine, the method getProtocol exists.Maybe you try to use a module too recent for your PrestaShop version. I can see you're using 1.3.3.0, You should upgrade. Link to comment Share on other sites More sharing options...
mark4040 Posted June 6, 2011 Author Share Posted June 6, 2011 Thank you Do you no anyone that can upgrade my site for me.Cheers. Link to comment Share on other sites More sharing options...
Asenar Posted June 6, 2011 Share Posted June 6, 2011 See http://support.prestashop.com ^^ But if you remove the last module you added all can works again (of course except what you will remove) Link to comment Share on other sites More sharing options...
mark4040 Posted June 6, 2011 Author Share Posted June 6, 2011 But i haven't added a module i just got the person how hosts my site to upgrade it to 1.4.2 that's when it all went wrong so he put it back to the original settings of 1.3.3 and that when the modules disappeared but it all worked fine before he tried to upgrade. Link to comment Share on other sites More sharing options...
Asenar Posted June 6, 2011 Share Posted June 6, 2011 So that mean maybe he didn't removed the added modules. Let me explains how the Module tab works (in 1.3.x version) :When you go on that tab, all modules/[module-name]/[module-name].php files are evaluated to see if there is an error in the php code. This way, it's impossible to enable not working modules.On your particular example a module need the static method Tools::getProtocol() to works, and it doesn't exists.If you want to see which one doesn't work, you can edit the files classes/Module.php as following : Find the method "getModulesOnDisk" (around line 311 for me but I opened the 1.3.7 file, so that can differ).Find if (class_exists($module, false) OR eval($file) !== false) replace by echo "$module "; if (class_exists($module, false) OR eval($file) !== false) Save and send your edited files to your server.Check again your admin > module tab, you will see all successfully loaded module names, and at the last position the not working module.rename its directory by adding "not-working" at the end of its name, or simply delete it.Check again and if this is ok, remove what you added in Module.php file (the "echo" thing)Edit : a 2nd solution is to ask to the person who made the revert to do that Link to comment Share on other sites More sharing options...
mark4040 Posted June 6, 2011 Author Share Posted June 6, 2011 Hi i have done that and got thisaddheaderauthorizeaimbankwirebirthdaypresentblockadvertisingblockbestsellersblockcartblockcategoriesblockcmsblockcurrenciesblockfblikeboxblockhomenewsblockinfosblocklanguagesblocklayeredblocklinkblockmanufacturerblockmenulavalampblockmyaccountblocknewproductsblocknewsletterblockpaymentlogoblockpermanentlinksblockpselivezillablockrssblockrss2blocksearchblockslidingcategoriesblockspecialsblockspecialscarouselblocksupplierblocktagsblocktopmenublockuserinfoblockvariouslinksblockviewedblockwishlistcanonicalurlcarouselnccarriercomparecashondeliverycashticketchequecornerplublicreditcardcriteocrosssellingcs_livehelpdateofdeliverydejaladibsFatal error: Call to undefined method Tools::getProtocol() in /home/onestopa/public_html/classes/Module.php(324) : eval()'d code on line 106 Link to comment Share on other sites More sharing options...
Asenar Posted June 6, 2011 Share Posted June 6, 2011 so delete the dibs directory, it's not 1.3 compatible Link to comment Share on other sites More sharing options...
mark4040 Posted June 6, 2011 Author Share Posted June 6, 2011 I have got this error nowFatal error: Class 'CarrierModule' not found in /home/onestopa/public_html/classes/Module.php(323) : eval()'d code on line 30 Link to comment Share on other sites More sharing options...
Asenar Posted June 6, 2011 Share Posted June 6, 2011 So do the same as previously, you have to remove every 1.4 modules Link to comment Share on other sites More sharing options...
mark4040 Posted June 6, 2011 Author Share Posted June 6, 2011 Deleted it and got this.Warning: require_once(/home/onestopa/public_html/config/../classes/CarrierModule.php) [function.require-once]: failed to open stream: No such file or directory in /home/onestopa/public_html/config/config.inc.php on line 21Fatal error: require_once() [function.require]: Failed opening required '/home/onestopa/public_html/config/../classes/CarrierModule.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/usr/local/lib/php/ZendGdata-1.11.0/library') in /home/onestopa/public_html/config/config.inc.php on line 21 Link to comment Share on other sites More sharing options...
PrestaSupport Posted June 6, 2011 Share Posted June 6, 2011 Deleted it and got this.Warning: require_once(/home/onestopa/public_html/config/../classes/CarrierModule.php) [function.require-once]: failed to open stream: No such file or directory in /home/onestopa/public_html/config/config.inc.php on line 21Fatal error: require_once() [function.require]: Failed opening required '/home/onestopa/public_html/config/../classes/CarrierModule.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/usr/local/lib/php/ZendGdata-1.11.0/library') in /home/onestopa/public_html/config/config.inc.php on line 21 Have you put the right 1.4 modules on your server and got this messages? Link to comment Share on other sites More sharing options...
Asenar Posted June 6, 2011 Share Posted June 6, 2011 Ok, let's try an other method.Do the following. Find in Module.php: foreach ($modules_dir AS $module) { $file = trim(file_get_contents(_PS_MODULE_DIR_.'/'.$module.'/'.$module.'.php')); if (substr($file, 0, 5) == '<?php') $file = substr($file, 5); if (substr($file, -2) == '?>') $file = substr($file, 0, -2); if (class_exists($module, false) OR eval($file) !== false) $moduleList[] = new $module; else $errors[] = $module; } Now, replace if (class_exists($module, false) OR eval($file) !== false) $moduleList[] = new $module; else $errors[] = $module; By try { if (class_exists($module, false) OR eval($file) !== false) $moduleList[] = new $module; else $errors[] = $module; } catch(Exception $e) { die("Hey ! $module can't work (error $e)! Delete it right now."); } Link to comment Share on other sites More sharing options...
mark4040 Posted June 6, 2011 Author Share Posted June 6, 2011 now i get thisParse error: syntax error, unexpected '?' in /home/onestopa/public_html/classes/Module.php(325) : eval()'d code on line 1Fatal error: Class 'ImportModule' not found in /home/onestopa/public_html/classes/Module.php(325) : eval()'d code on line 5 Link to comment Share on other sites More sharing options...
Asenar Posted June 6, 2011 Share Posted June 6, 2011 If you delete it, put again the "echo" thing, and then try to understood what you're doing !Or, contact the person who restored your site and give him a link to this topic, he will understand what's wrong.Regards, Link to comment Share on other sites More sharing options...
paolitorres Posted July 3, 2011 Share Posted July 3, 2011 So that mean maybe he didn't removed the added modules. Let me explains how the Module tab works (in 1.3.x version) :When you go on that tab, all modules/[module-name]/[module-name].php files are evaluated to see if there is an error in the php code. This way, it's impossible to enable not working modules.On your particular example a module need the static method Tools::getProtocol() to works, and it doesn't exists.If you want to see which one doesn't work, you can edit the files classes/Module.php as following : Find the method "getModulesOnDisk" (around line 311 for me but I opened the 1.3.7 file, so that can differ).Find if (class_exists($module, false) OR eval($file) !== false) replace by echo "$module "; if (class_exists($module, false) OR eval($file) !== false) Save and send your edited files to your server.Check again your admin > module tab, you will see all successfully loaded module names, and at the last position the not working module.rename its directory by adding "not-working" at the end of its name, or simply delete it.Check again and if this is ok, remove what you added in Module.php file (the "echo" thing)Edit : a 2nd solution is to ask to the person who made the revert to do that :) Thank you, your advise was a real lifesaver kudos to you! Link to comment Share on other sites More sharing options...
Asenar Posted July 3, 2011 Share Posted July 3, 2011 You're welcome !(I m a really patient person ^^).Next time your problem is solved, click on the "solved Button" to add the tag automatically in the title regards, Link to comment Share on other sites More sharing options...
MTrabjerg Posted July 4, 2011 Share Posted July 4, 2011 Hey!I have the same issue with the Dibs module. Is it really true, that it's not compatible with PrestaShop 1.3.x? It says so in the addons page, but I have the same issue.PHP Fatal error: Call to undefined method Tools::getprotocol() in /var/www/myserver/domains/www.testsite/classes/Module.php(323) : eval()'d code on line 103 Thanks-M Link to comment Share on other sites More sharing options...
Maxence de Flotte Posted July 11, 2011 Share Posted July 11, 2011 Hi MTrabjerg,Dibs must work with PS 1.3.You can add these functions in file classes/Tools.php. And It will work. /** * getProtocol return the set protocol according to configuration (http[s]) * @param Boolean true if require ssl * @return String (http|https) */ public static function getProtocol($use_ssl = null) { return (!is_null($use_ssl) && $use_ssl ? 'https://' : 'http://'); } Regards, Link to comment Share on other sites More sharing options...
MTrabjerg Posted July 11, 2011 Share Posted July 11, 2011 Maxence de Flotte ->Thanks... I got a working Dibs module now. Right now I'm facing a problem getting the Klarna module to show up, when using One Page Checkout.Thanks-M Link to comment Share on other sites More sharing options...
Steffen Posted July 19, 2011 Share Posted July 19, 2011 Hi MTrabjerg,Dibs must work with PS 1.3.You can add these functions in file classes/Tools.php. And It will work. /** * getProtocol return the set protocol according to configuration (http[s]) * @param Boolean true if require ssl * @return String (http|https) */ public static function getProtocol($use_ssl = null) { return (!is_null($use_ssl) && $use_ssl ? 'https://' : 'http://'); } Regards, Where exactly are these lines of code to be inserted? At the very beginning or what?Thanks Link to comment Share on other sites More sharing options...
Maxence de Flotte Posted July 19, 2011 Share Posted July 19, 2011 Hi Nondo,Just after class ToolsCore { Simpler and cleaner, you can add a file in override/classes, named Tools.php with this content: class Tools extends ToolsCore { /** * getProtocol return the set protocol according to configuration (http[s]) * @param Boolean true if require ssl * @return String (http|https) */ public static function getProtocol($use_ssl = null) { return (!is_null($use_ssl) && $use_ssl ? 'https://' : 'http://'); } } Link to comment Share on other sites More sharing options...
Steffen Posted July 19, 2011 Share Posted July 19, 2011 Thank you - worked Link to comment Share on other sites More sharing options...
erfaan Posted November 29, 2016 Share Posted November 29, 2016 hi guys i update my presta to the last version but i have some error in module part like this: PrestaShop] Fatal error in module file :/home/fcbuyir/domains/fcbuy.ir/public_html/classes/module/Module.php(1361) : eval()'d code:syntax error, unexpected end of file can anyone help me? Thanks Link to comment Share on other sites More sharing options...
Recommended Posts