mexicoMATT Posted February 8, 2014 Share Posted February 8, 2014 Hi All, I recently deleted some of the modules I wasn't using to free up server memory. But this seems to of created the following error, and I cannot acess the Modules folder in the Bak office: Warning: Invalid argument supplied for foreach() in /websites/123reg/LinuxPackage22/pi/x_/8_/pix-8.co.uk/public_html/BIGhedz/modules/gamification/classes/Advice.php on line 99 Can anyone offer a solution to this? Any help much appreciated. Thanks, Matt. Link to comment Share on other sites More sharing options...
El Patron Posted February 8, 2014 Share Posted February 8, 2014 Hi Matt, you could simply turn off error reporting or change level to not include warnings. or you could get the latest version here: https://github.com/PrestaShop/PrestaShop-modules/blob/master/gamification/gamification.php and see if they resolved this issue. Link to comment Share on other sites More sharing options...
mexicoMATT Posted February 8, 2014 Author Share Posted February 8, 2014 Hi El Patron, thank you for your reply & advice. Not sure if I made my problem clear sorry? I turned on error report to see if it would identify the issue. The main problem being I can't access the modules folder in back office, so unable to do any further edits/configurations. The link you attached, how do I go about trying that code to solve the problem? I did add a module before deleting unused ones, but it seemed to have installed well (facebook " like" code added using this module: htmlbox (also installed)). Do you think by deleting modules it has caused this issue? Can it be corrected, as my site still works fine, but is no good if i can't access the modules. Hope you can help further. Cheers, Matt. Link to comment Share on other sites More sharing options...
El Patron Posted February 8, 2014 Share Posted February 8, 2014 Hi Matt, Sorry didn't realize the seriousness. The warning is not what is stopping your module load. And it's odd that you are not getting a 'fatal' type error, which can then be debugged. Link to comment Share on other sites More sharing options...
mexicoMATT Posted February 8, 2014 Author Share Posted February 8, 2014 Hi El Patron, Yeah sorry to say it seems serious. But the fact that you say the error message has got nothing to do with the modules folder not loading is a great help! The reason being that I've previously had page loading problems due to not enough memory on the shared hosting, do you think the lack of memory is why the modules folder won't load? Again seems odd as it was loading fine until I deleted some modules. (I thought I'd get a fatal error if that was the case, out of memory etc... trying to load 1176484 bytes etc..) Any further thoughts appreciated. Thanks, Matt. Link to comment Share on other sites More sharing options...
El Patron Posted February 8, 2014 Share Posted February 8, 2014 without the some 'other' error then I would just be guessing. Sorry not much help. Link to comment Share on other sites More sharing options...
mexicoMATT Posted February 8, 2014 Author Share Posted February 8, 2014 El Patron, do you know if there is any safe way to uninstall modules from Prestashop without going through the uninstall button in the modules folder? I'm thinking to delete the last 2 modules that were installed to see if they are the culprits eating the memory (only guessing that is what's stopping folder from loading). Cheers, Matt. Link to comment Share on other sites More sharing options...
El Patron Posted February 9, 2014 Share Posted February 9, 2014 Hey Matt, did you make any progress? Check the hosting error logs to see if any good information there. Link to comment Share on other sites More sharing options...
vekia Posted February 9, 2014 Share Posted February 9, 2014 this error appears because update of this module failed. if i were you, i will upload original version from your PS (if you use 1.5.4.1 - use gamification from 1.5.4.1) and disable automatic module updates, this causing problems 1 Link to comment Share on other sites More sharing options...
mexicoMATT Posted February 10, 2014 Author Share Posted February 10, 2014 Hi Vekia, Thanks for your advice. Here's what I have done : Firstly) turned off Module updates in Back office. 2nd) I have re-installed the gamification folder with the original PS version for 1.5.4.1. 3rd) Checked the php Database, and tried to create 'hide' column in ps_advice folder , but cannot create as it already exists. Not sure what to do now, is there something in the table that needs to added/deleted? I have attached a screenshot of the 'ps_advice' structure as it stands. Does anything look wrong there? Very much appreciate the help you are offering. Matt. Link to comment Share on other sites More sharing options...
vekia Posted February 10, 2014 Share Posted February 10, 2014 you use ps 1.5.4.1 ? Link to comment Share on other sites More sharing options...
mexicoMATT Posted February 10, 2014 Author Share Posted February 10, 2014 Hi Vekia, Yes I overwrote the gamification folder within modules with the one that from the original install of PS. I did this via FTP... have I done correctly? I've also downloaded PS version 1.5.4.1 from Prestashop site, but there is no folder within it called gamification?? There's obviously a reason for that, but It's beyond my knowledge. Is there anywhere else I can download the 1.5.4.1 gamification file? Cheers, Matt. Link to comment Share on other sites More sharing options...
El Patron Posted February 10, 2014 Share Posted February 10, 2014 gamification.zip from 1.5.4.1 Link to comment Share on other sites More sharing options...
mexicoMATT Posted February 10, 2014 Author Share Posted February 10, 2014 El Patron, many thanks for that. I've overwritten the folder again, and yet still no joy. I've got error messages turned on, but nothing comes up when the modules folder fails to load. Got to admit I'm totally lost with this now. From what Vekia was saying it has something to do with the fact that auto updates for modules was on, and this has corrupted something when a new module was installed. Willing to try any other suggestions. Thanks, Matt. Link to comment Share on other sites More sharing options...
mexicoMATT Posted February 11, 2014 Author Share Posted February 11, 2014 Hi El Patron & Vekia, hopefully I'm getting somewhere with the advice you've given me (Thank you!). I checked back with my host to see if they could see any errors & help. They've said they can't help at there end, but gave me this error message: ------------------------------------------- Unfortunately this seems to be an issue on PrestaShop's end and I cannot provide further assistance. I would recommend looking into the exact lines referenced in the error: $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); $advices = array(); foreach ($result as $res) <- line 99 and seeing if any changes can be done in order to avoid the error message. -------------------------------------------- Would you have any suggestions guys? Thanks in advance, Matt. Link to comment Share on other sites More sharing options...
vekia Posted February 11, 2014 Share Posted February 11, 2014 it looks like you still use gamification module with advices feature, it;'s a part of new gamification, not old one. Link to comment Share on other sites More sharing options...
mexicoMATT Posted February 14, 2014 Author Share Posted February 14, 2014 Hi Vekia, thanks for your reply. Not sure where I can get the original gamification file. I've installed the one that came with the theme as a quick install. Theme being Leo Converse Quick install. Do you think this is the only thing it can be? Any suggestion where I can get a different gamification file? My install is 1.5.4.1. Thanks in advance, Matt. Link to comment Share on other sites More sharing options...
vekia Posted February 15, 2014 Share Posted February 15, 2014 here it is: gamification for 1.5.4.1 try with this one, and after installation don't update it Link to comment Share on other sites More sharing options...
mexicoMATT Posted February 15, 2014 Author Share Posted February 15, 2014 Hi Vekia, Your an absolute STAR! that's worked a treat. Many, many thanks! & El Patron thanks also for your input. May I ask why was the gamification file different to the original that I uploaded on install? Not that it matters, but helps with the education for a newbie like me. Please mark this as solved! and hopefully it will also help someone else out oneday. Link to comment Share on other sites More sharing options...
vekia Posted February 15, 2014 Share Posted February 15, 2014 i suppose that you probably updated this module, this is why you saw error you mentioned Link to comment Share on other sites More sharing options...
Recommended Posts