Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Script-Fu

Members
  • Content Count

    78
  • Joined

  • Last visited

Everything posted by Script-Fu

  1. Can i stop modules admin from showing uninstalled modules by editing the .xml files?
  2. I wish there was a way to export a list of all the modules in modules admin. What version the modules are and what version of the system they were meant for.
  3. I have so many modules in my presta 1.6.1.x modules admin that it blinds me. What i want to do is trim all the modules down to basic and installed. I do not want them to show whatsoever in admin if they are gone. Trying to migrate to Thirty Bees has been fun for me. However for some people i can understand why they give up. I know it's a module stopping my migration to Thirty Bees but with no specific output to tell me which one it's pointless. I think being able to have my modules trimmed down would help me migrate once and for all! You see i could pay someone to migrate for me. However what does one truly learn by doing it that way?
  4. @Traumflug I thought TB wasn't compatible with PHP 7.2 yet? I know the devs here are on track to make it so! I posted those files to give a little life/time to PS 1.6.1x while getting my migration to TB 100% straight.
  5. The only file that you can download is the one at the very bottom for PS 1.6.1x I felt this was an important post on PS forum which is no longer their as Eleazar has left the building. So i found it in Google Cache and re-posted here in the tip/trick section. If the powers that be do not approve then slay the post by the way side then! _Bill
  6. ***Please disregard the PS 1.5.x versions as that does not have any bearing on the TB eCommerce system. I'm trying to convert the files Eleazar provided hopefully for use with TB.*** ----------- For those of you who don't want to miss their smooth running PrestaShop 1.5.6 and want or need to upgrade to PHP 7.2, here are the essential fixes for download. Sometimes there are just small changes. Larger modifications were mainly necessary in tools and classes, also for the editor TinyMCE. The class Rijndael (classes/Rijndael.php) has to be replaced by a patched one that switches to Open SSL in case the mcrypt extension of PHP 7.2 is not installed. This is no longer the case with 7.2 by default. I'd recomend to use the Rijndael.php which is included since PrestaShop 1.6.1.18. Nevertheless PrestaShop 1.5 would steadfastly refuse to keep Rijndael active (you find the radio button at the bottom of the Back Office menu Advanced settings --> Performance) and always wants to switch to Blowfish. This requires a little trick for both PrestaShop 1.5 and 1.6: The Boolean variable PS_CIPHER_ALGORITHM in the database table ps_configuration has to be set to 1. This can be done with PHPMyAdmin, either directly by an input in the corresponding field, or in the SQL window by entering the following command: UPDATE `ps2_configuration` SET `value` = 1 WHERE `name` = 'PS_CIPHER_ALGORITHM' `ps2_configuration`. However, this is already the only database intervention required. Smarty has provided an upgrade for PHP 7.2, but this is not backward compatible. So you should really just make the fixes you find in the zip files. For conservative results, here's a short guide to how to proceed: Switch your shop to maintenance mode. Don't forget to enter your own IP so that you can continue to access your shop front. In the config/settings.inc.php switch on the debug mode (from false --> true). Backup all originals of patched files from your shop prior to patching. Check if one or the other file is overridden. Then the changed code must be always be fixed in the Override. After importing the patched files, test the shop in any way and check out all payment methods once. Be sure to also test the behavior of - if available - third-party modules or a third-party theme (e.g. Sunnytoo’s Transformer theme needs some fixes)! For frontend and backend tests the following applies: Messages like "Notice" or "Warning" can normally be ignored, but you should carefully make a note of any error message ("Error") with the place (file, line) where it was found and the hint for modifying it. If you don't know what to do here, you can report the error message - and please only errors! - in this topic. For security reasons, the download is provided with a checksum, whose validity you can check by double-clicking on the sha256 file in the mantle zip file. (Of course on your home PC before the upload). Download all files here: PS 1562 modified for PHP 7.2.zip These patch files were tested and work like a charm in production mode in PrestaShop 1.5.6.1 and 1.5.6.2. Nevertheless I don't want to rule out to have forgotten something - so critical reviews are welcome! ************************************************************** Changes for PrestaShop 1.6 EDIT: In PrestaShop 1.6 there are fewer changes, but these should also be better incorporated to avoid unpleasant surprises.PS 1.6.1x Umstellung auf PHP 7.2.zip Here is a summary of all major core changes for download: PS 1.6.1x Umstellung auf PHP 7.2.zip Please read the readme.txt included in the Download before uploading the contents of the zip file to your PrestaShop 1.6! PS 1.6.1x Umstellung auf PHP 7.2.zip
  7. Thank you for your time @Traumflug you and ttoine on ps have given me some more ideas!
  8. I want to try and migrate my prestashop 1.6.1.x site again to TB. I am specifically looking for some pointers on my very old website. You see this website of mine was built around 2011 with version 1.2.x so yes it's been around a long time. So some questions... Manual migration of my data meaning. Export / import would be the correct term i believe. Does TB have modules that can export all my data from PS then import that data TB? --- Migration module of my 1.6.1.x shop to TB. What would be the best way to prep my very very very old but now 1.6 site? This process has failed over and over in the past. As you can see by looking back thru my limited posts. It hasn't went well for me so to speak. What would you do to prep a clone of my website installed in a sub domain or even a main domain on another URL? Thanks
  9. @Baarssen my bad You should use this module then! ---> https://store.thirtybees.com/shop-modules/front-office/no-captcha-recaptcha-module?
  10. Thank you for that link! Also... @Baarssen my bad You should use this module then! ---> https://store.thirtybees.com/shop-modules/front-office/no-captcha-recaptcha-module?
  11. So i have a very old PS site that started around version 1.2.x that's been upgraded since 2011 to many times to count. In it's present form i'm on version PS 1.6.1.10 and i'm stuck. You see i have (ghosts in the machine) so to speak. Being that this is my oldest PS site i have given up trying to update it to any newer versions of PS or TB as it just wont do it without complete failure. I have changed so much over the years with this site. Anyway I am content where i am right now as i found a post on PS to update my site to PHP 7.2 which i did and its now working very well. So moving forward I have the notarobot module installed because of all the bots creating spam. Well as this saga is never over lol i now have bots attacking my registration/authentication section. So yea it looks like the Bots are back. Except this time they are using the Register Now / Auth page to send porn links. ( They enter the email account they want to spam & hit the button. The website creates a new account then pops over so you may enter your first & last name etc etc. What they are doing is in the first name field is they put something like "Ada And Amy Are Waiting" then in the last name field "They put a Porn Site Link with a tracking code behind the url aka .com/fke6u". Go figure! Well i have been digging around trying to find a solution and i found Lesley's No Captcha reCAPTCHA Module in the TB Store. Of course i have given it a shot on one of my clone sites and i keep getting this error. [PrestaShop] Fatal error in module file :/home/xxxxxxxx/website/classes/module/Module.php(1361) : eval()'d code:syntax error, unexpected 'use' (T_USE) Well at least i am one up from others that try to install un-compatible modules. As i know which module is causing the issue. However the fatal error does not help a bit on trying to solve the first step. I have nothing to work with because of that error above. So i am gonna ask but i don't want to offend anyone at all. I think TB is the Bees Knees and all the hard work you ladies and gents have pulled off. All my new sites are based on TB and i'm impressed. With how clean it is in the module section with out all the BS like inside PS. However this leads me back to the question... I only need a few snippets to get the No Captcha reCAPTCHA Module to produce meaningful errors. I can handle all the back port code from their. Where do i start??? In the main nocaptcharecaptcha.php so far i have changed the... if (!defined('_TB_VERSION_')) { exit; } to if (!defined('_TB_VERSION_') && !defined('_PS_VERSION_')) { exit; } Which looks correct to me but i'm still stuck after that. I have nothing in my error logs and nothing with dev mode turned on. Again i'm not trying to make anyone mad i'm just stuck with a very old site with ghosts in the machine which leave me no choice. A lot of people would have give up by now. I can't and wont let this old site win! Thanks _Billy
  12. I had the same issue. In fact a lot of the url's say the same thing. When i arrived here there was also another forum. I think it was called forum 2 but has since disappeared. That forum was a full width. This one is 1/4 cutoff on the left with useless info in yellow. Meh anyway here is the error. Sorry, there is a problem The page you requested does not exist Error code: 1S160/2
  13. Notice on line 29 in file /home/xxx/clone2.xxx.com/modules/psonesixmigrator/classes/Blowfish.php [8] Constant PS_UNPACK_NATIVE already defined Notice on line 30 in file /home/xxx/clone2.xxx.com/modules/psonesixmigrator/classes/Blowfish.php [8] Constant PS_UNPACK_MODIFIED already defined Yep they are only notices & i'm running php 5.6
  14. Perfect and i changed the v to 9.11.1 hope that works. I attached the module for later reference. As i need to grab the paypal api password from the main website database. I can't seem to find that password. So I will need a little coaching to trick paypal into thinking nothing has changed. (I hope anyway after cloning that is.) Thank you for such a fast response! paypal.zip
  15. So i have a paypal module that i did some minor work on years ago. How can a change the version so it's not overwritten by TB? The version of that module is "PayPal v3.11.1 - by PrestaShop"
  16. I can't remember if the migration module upgraded my paypal module or not. Maybe this was something i did after migration when updating all the modules that were left over. Can i stop this process by commenting out some code? tia _best
  17. I would like to ask if it possible to block ThirtyBees from upgrading my Prestashop Paypal Module v3.11.1 back to v5.4.2 of ThirtyBees? That is if i can get the native module to uninstall.
  18. I was looking to roll back to the paypal module i used with my prestashop sites as it has been rock solid with me since v2.8 and in it's currant version of upgrades is at v3.11.1 Anyway i went to uninstall the native version of the thirtybees paypal module PayPal v5.4.2 - by thirty bees and ended up with this below. Also no matter how many times i try to uninstall the module i end up back on the Exception Page. I did try to uninstall with the Presta PayPal Module USA/Canada that came with ThirtyBees so I installed/uninstalled/deleted that module now so i'm stuck. Any ideas how to get the native PP module to uninstall? [ThirtyBeesException] [] is not a valid configuration key at line 1005 in file classes/Configuration.php 1000. * @since 1.0.8 1001. */ 1002. protected static function validateKey($key) 1003. { 1004. if ( ! Validate::isConfigName($key)) { 1005. $e = new PrestaShopException(sprintf( 1006. Tools::displayError('[%s] is not a valid configuration key'), 1007. Tools::htmlentitiesUTF8($key) 1008. )); 1009. die($e->displayMessage()); 1010. } ConfigurationCore::validateKey - [line 813 - classes/Configuration.php] - [1 Arguments] Argument [0] ConfigurationCore::deleteByName - [line 292 - modules/paypal/paypal.php] - [1 Arguments] Argument [0] PayPal->deleteConfiguration - [line 275 - modules/paypal/paypal.php] 270. * 271. * @return bool Indicates whether the module was uninstalled successfully 272. */ 273. public function uninstall() 274. { 275. $this->deleteConfiguration(); 276. 277. return parent::uninstall(); 278. } 279. 280. /** PayPal->uninstall - [line 1648 - controllers/admin/AdminModulesController.php] 1643. } 1644. if (count($this->errors)) { 1645. continue; 1646. } 1647. // Get the return value of current method 1648. $echo = $module->{$method}(); 1649. // After a successful install of a single module that has a configuration method, to the configuration page 1650. if ($key == 'install' && $echo === true && strpos(Tools::getValue('install'), '|') === false && method_exists($module, 'getContent')) { 1651. Tools::redirectAdmin(static::$currentIndex.'&token='.$this->token.'&configure='.$module->name.'&conf=12'); 1652. } 1653. } AdminModulesControllerCore->postProcessCallback - [line 1511 - controllers/admin/AdminModulesController.php] 1506. } 1507. } 1508. 1509. // Call appropriate module callback 1510. if (!isset($ppmReturn)) { 1511. $this->postProcessCallback(); 1512. } 1513. 1514. if ($back = Tools::getValue('back')) { 1515. Tools::redirectAdmin($back); 1516. } AdminModulesControllerCore->postProcess - [line 251 - classes/controller/Controller.php] 246. if ($this->checkAccess()) { 247. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) { 248. $this->setMedia(); 249. } 250. 251. $this->postProcess(); 252. 253. if (!empty($this->redirect_after)) { 254. $this->redirect(); 255. } 256. ControllerCore->run - [line 837 - classes/Dispatcher.php] 832. if (isset($paramsHookActionDispatcher)) { 833. Hook::exec('actionDispatcher', $paramsHookActionDispatcher); 834. } 835. 836. // Running controller 837. $controller->run(); 838. } catch (PrestaShopException $e) { 839. $e->displayMessage(); 840. } 841. } 842. DispatcherCore->dispatch - [line 63 - admin/index.php] 58. if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) { 59. $_REQUEST['controller'] = strtolower($_REQUEST['tab']); 60. } 61. 62. // Prepare and trigger admin dispatcher 63. Dispatcher::getInstance()->dispatch();
  19. Thanks for the response Traumflug. I changed the table name in this post so i wouldn't give away my database name. So yea i can see why that might seem odd. Anyway i deleted that site as it was a clone of the main site and tried again to migrate to thirtybees from presta 1.6.10. I have learned what steps to take by trial and error when doing the migration. Then of course updating all the new modules inside of that fresh migration to thirtybees. I seem to have a pretty solid thirtybees website now after getting over some hurdles. The first couple as i remember are in the thirtybees migration module. Again before i say what they are i am talking about a clone of my main website. I had to move forward with presta because because php 5.6 went EOL as you all are well aware of. My clone is now running on php 7.1 Here are a few things i learned to check and or un-check inside the migration module. Your mileage might very as mine did when i started this project. 1) I kept all my custom modules active. 2) I did not switch my custom theme to the default thirtybees theme. 3) I did not backup my database etc during the migration. For some reason all those issue above i had to learn the hard way as the migration for me would not work. Now it seems that i am able to make a clone at will and update everything with out any errors. Of course i half to go back and correct my errors & warnings inside my custom modules once i switch over to php 7.1. Now back on topic: What solved the issue of updating all the modules in thirtybees after migration was to delete the cron module before doing the migration. Thus not getting this error that killed the site in the first place. That module from prestashop was version "Cron tasks manager module v1.4.0 - by PrestaShop" Btw thanks for pointing out the upgrade script for the thirtybees cron module also what one would need to do to fix the table. So thanks again Traumflug for the solution to my post. I went the other direction and did 10x the work making another clone. Anyway i'm trying to get better at posting on this site for help. I know i need to provide better information when posting. It's hard to help anyone if they can't understand the post. I'm working on it as i'm rusty and haven't been in the game in many years. _best
  20. Just one more point. I did the migration under php 5.6 then switched to php 7.1 for the modules if that makes a difference.
  21. I also meant to put this post under the modules topic. Please forgive me for my oversight. _best
  22. So i migrated from ps 1.6.10 to tb 1.08 which went well. I deleted the migration module and updated all the modules that TB wanted to. Which in turn knocked out my back office. Here is what i have atm. [ThirtyBeesDatabaseException] Table 'xxx_thirty.cronjobs' doesn't exist ALTER TABLE `cronjobs` ADD `minute` INTEGER DEFAULT '-1' AFTER `task` at line 844 in file classes/db/Db.php 839. if ($webserviceCall && $errno) { 840. $dbg = debug_backtrace(); 841. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97); 842. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('TB_INSTALLATION_IN_PROGRESS')) { 843. if ($sql) { 844. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>'); 845. } 846. 847. throw new PrestaShopDatabaseException($this->getMsgError()); 848. } 849. } DbCore->displayError - [line 488 - classes/db/Db.php] - [1 Arguments] 483. $this->result = $this->_query($sql); 484. } 485. } 486. 487. if (_PS_DEBUG_SQL_) { 488. $this->displayError($sql); 489. } 490. 491. return $this->result; 492. } 493. DbCore->query - [line 675 - classes/db/Db.php] - [1 Arguments] 670. { 671. if ($sql instanceof DbQuery) { 672. $sql = $sql->build(); 673. } 674. 675. $this->result = $this->query($sql); 676. 677. return (bool) $this->result; 678. } 679. 680. /** DbCore->execute - [line 32 - modules/cronjobs/upgrade/upgrade-2.1.0.php] - [1 Arguments] 27. exit; 28. } 29. 30. function upgrade_module_2_1_0() 31. { 32. Db::getInstance()->execute('ALTER TABLE `cronjobs` ADD `minute` INTEGER DEFAULT \'-1\' AFTER `task`'); 33. 34. return true; 35. } upgrade_module_2_1_0 - [line 2212 - classes/module/Module.php] - [1 Arguments] 2207. 2208. // Call the upgrade function if defined 2209. $upgrade['success'] = false; 2210. foreach ($fileDetail['upgrade_function'] as $item) { 2211. if (function_exists($item)) { 2212. $upgrade['success'] = $item($this); 2213. } 2214. } 2215. 2216. // Set detail when an upgrade succeed or failed 2217. if ($upgrade['success']) { ModuleCore->runUpgradeModule - [line 389 - controllers/admin/AdminModulesController.php] 384. require_once(_PS_MODULE_DIR_.$module->name.'/'.$module->name.'.php'); 385. } 386. 387. if ($object = Adapter_ServiceLocator::get($module->name)) { 388. /** @var Module $object */ 389. $object->runUpgradeModule(); 390. if ((count($errorsModuleList = $object->getErrors()))) { 391. $moduleErrors[] = ['name' => $module->displayName, 'message' => $errorsModuleList]; 392. } elseif ((count($confModuleList = $object->getConfirmations()))) { 393. $moduleSuccess[] = ['name' => $module->displayName, 'message' => $confModuleList]; 394. } AdminModulesControllerCore->initContent - [line 262 - classes/controller/Controller.php] 257. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) { 258. $this->initHeader(); 259. } 260. 261. if ($this->viewAccess()) { 262. $this->initContent(); 263. } else { 264. $this->errors[] = Tools::displayError('Access denied.'); 265. } 266. 267. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) { ControllerCore->run - [line 837 - classes/Dispatcher.php] 832. if (isset($paramsHookActionDispatcher)) { 833. Hook::exec('actionDispatcher', $paramsHookActionDispatcher); 834. } 835. 836. // Running controller 837. $controller->run(); 838. } catch (PrestaShopException $e) { 839. $e->displayMessage(); 840. } 841. } 842. DispatcherCore->dispatch - [line 63 - admin/index.php] 58. if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) { 59. $_REQUEST['controller'] = strtolower($_REQUEST['tab']); 60. } 61. 62. // Prepare and trigger admin dispatcher 63. Dispatcher::getInstance()->dispatch(); What direction should i take? Thanks in advance.
  23. Which boxes should be checked under the "Copy database to" section? Thanks in advance for any help.
  24. I found the ps_shop_url to edit. Do i need to edit anything else in the database? Thanks
×
×
  • Create New...