Jump to content
thirty bees forum

movieseals

Gold member
  • Posts

    432
  • Joined

  • Last visited

  • Days Won

    7

Posts posted by movieseals

  1. 9 minutes ago, datakick said:

    This is a bug in the module that was always there. It would reproduce on prestashop 1.6 as well if you run it on php7. You should ask the developer to fix it -- make it php7.2 compliant.

    You can also fix it yourself by changing the signature of the method to 

    
    public static function insertTagM($public=false)

     

    It's true that I was running PS under 5.6 at the time...  Thanks for the pointer.

  2. Hello all.  I am having an issue with a module that used to work under 1.6.1.  When I install the module, it gives a 500 error.  The details of the error is below.  It seems to cascade through quite a bit.  Not sure if it is fixable or not.  Any advice would be appreciated.  Developper does not want to do anything because it is TB.  What the module does is help manage tags and unify them across languages.

    Here is the initial error that cause the 500 error call - if you go back, though, the module is installed and seems to work but it no longer imports the existing tags in the main language.

    Decoded exception

    Too few arguments to function Tagm::insertTagM(), 0 passed in /home/zbookstore/public_html/modules/patagsmanagement/classes/Tagm.php on line 384 and exactly 1 expected

    in file modules/patagsmanagement/classes/Tagm.php at line 476
     
    If you open up all the stack traces, this is what we get:
     

    Source file: modules/patagsmanagement/classes/Tagm.php

    457:
    458:        if (Db::getInstance()->execute($q)) {
    459:            //elimino los names de tags
    460:            $q = "DELETE FROM `"._DB_PREFIX_."tag` WHERE name in('".$strTagsComplete."')";
    461:            Db::getInstance()->execute($q);
    462:            $q = "DELETE FROM `"._DB_PREFIX_."tagm` WHERE id_tagm = ".(int)$idtagm;
    463:            Db::getInstance()->execute($q);
    464:            //elimino de las relaciones de agrupacion
    465:            return true;
    466:        }
    467:        return false;
    468:    }
    469:
    470:    public static function updateTagM($idtagm, $public)
    471:    {
    472:        $q = 'UPDATE `'._DB_PREFIX_.'tagm` set public = '.(int)$public.' WHERE id_tagm ='.(int)$idtagm;
    473:        Db::getInstance()->execute($q);
    474:    }
    475:
    476:    public static function insertTagM($public)
    477:    {
    478:        $q = 'INSERT INTO `'._DB_PREFIX_.'tagm` (fecha,public) VALUES (now(),'.(int)$public.')';
    479:
    480:        if (Db::getInstance()->execute($q)) {
    481:            return Db::getInstance()->Insert_ID();
    482:        }
    483:
    484:        return null;
    485:    }
    486:}
    

    Stack trace

    1. modules/patagsmanagement/classes/Tagm.php:384 source Tagm::insertTagM()
    365:
    366:        return $saveOk;
    367:    }
    368:
    369:    public static function createTagForLang()
    370:    {
    371:        $sql = 'SELECT id_lang , count(*) as cant from '._DB_PREFIX_
    372:            .'tag GROUP BY id_lang ORDER BY cant DESC LIMIT 0,1';
    373:        $tagsConteo = Db::getInstance()->executeS($sql);
    374:
    375:        if (isset($tagsConteo) && $tagsConteo[0]) {
    376:            $lang_id_tags = $tagsConteo[0]['id_lang'];
    377:
    378:            if ($tagsConteo[0]['cant']>0) {
    379:                //creo todos los tags para ese idioma
    380:                $sql = 'SELECT * from '._DB_PREFIX_.'tag WHERE id_lang = '.(int)$lang_id_tags;
    381:                $tagsAdd = Db::getInstance()->executeS($sql);
    382:
    383:                foreach ($tagsAdd as $t) {
    384:                    $id_tagm = Tagm::insertTagM();
    385:
    386:                    $dataTagmTag = array();
    387:                    $dataTagmTag['id_tagm'] = $id_tagm;
    388:                    $dataTagmTag['id_tag'] = $t['name'];
    389:                    $dataTagmTag['id_lang'] = $t['id_lang'];
    390:
    391:                    Tagm::insertTagmTag($dataTagmTag);
    392:                }
    393:            }
    394:        }
    
    2. modules/patagsmanagement/patagsmanagement.php:69 source Tagm::createTagForLang()
    50:        }
    51:
    52:        // Execute module install SQL statements
    53:        $sql_file = dirname(__FILE__).'/install/install.sql';
    54:        if (!$this->loadSQLFile($sql_file)) {
    55:            return false;
    56:        }
    57:
    58:        // Install admin tab
    59:        $langnames = array();
    60:        $langnames['es'] = 'Gestión avanzada de etiquetas';
    61:        $langnames['fr'] = 'Gestion avancée et affichage';
    62:        $langnames['en'] = 'Advanced Tags Management';
    63:
    64:        if (!$this->installTab('AdminCatalog', 'AdminPATagsManagement', 'Advanced Tags Management', $langnames)) {
    65:            return false;
    66:        }
    67:
    68:        //tomo los tags existentes en el idioma que mas tenga
    69:        Tagm::createTagForLang();
    70:
    71:        // Register hooks
    72:        if (!$this->registerHook('displayRightColumnProduct')
    73:        ) {
    74:            return false;
    75:        }
    76:
    77:        //Create the folder for imgs
    78:        $dir = _PS_ROOT_DIR_.'/img/tagm';
    79:        mkdir($dir, 0777, true);
    
    3. controllers/admin/AdminModulesController.php:1653 source PATagsManagement->install()
    1634:                            }
    1635:                        }
    1636:                        //retrocompatibility
    1637:                        if (Tools::getValue('controller') != '') {
    1638:                            $_POST['tab'] = Tools::safeOutput(Tools::getValue('controller'));
    1639:                        }
    1640:                        $echo = '';
    1641:                        if ($key != 'update' && $key != 'updateAll' && $key != 'checkAndUpdate' && $key != 'delete') {
    1642:                            // We check if method of module exists
    1643:                            if (!method_exists($module, $method)) {
    1644:                                throw new PrestaShopException(sprintf('Method %s of module cannot be found', $method));
    1645:                            }
    1646:                            if ($key == 'uninstall' && !Module::getPermissionStatic($module->id, 'uninstall')) {
    1647:                                $this->errors[] = Tools::displayError('You do not have permission to uninstall this module.');
    1648:                            }
    1649:                            if (count($this->errors)) {
    1650:                                continue;
    1651:                            }
    1652:                            // Get the return value of current method
    1653:                            $echo = $module->{$method}();
    1654:                            // After a successful install of a single module that has a configuration method, to the configuration page
    1655:                            if ($key == 'install' && $echo === true && strpos(Tools::getValue('install'), '|') === false && method_exists($module, 'getContent')) {
    1656:                                Tools::redirectAdmin(static::$currentIndex.'&token='.$this->token.'&configure='.$module->name.'&conf=12');
    1657:                            }
    1658:                        }
    1659:                        // If the method called is "configure" (getContent method), we show the html code of configure page
    1660:                        if ($key == 'configure' && Module::isInstalled($module->name)) {
    1661:                            $this->bootstrap = (isset($module->bootstrap) && $module->bootstrap);
    1662:                            if (isset($module->multishop_context)) {
    1663:                                $this->multishop_context = $module->multishop_context;
    
    4. controllers/admin/AdminModulesController.php:1516 source AdminModulesControllerCore->postProcessCallback()
    1497:        if (Tools::getValue('redirect') == 'config' && Tools::getValue('module_name') != '' && Module::isInstalled(pSQL(Tools::getValue('module_name')))) {
    1498:            Tools::redirectAdmin('index.php?controller=adminmodules&configure='.Tools::getValue('module_name').'&token='.Tools::getValue('token').'&module_name='.Tools::getValue('module_name'));
    1499:        }
    1500:
    1501:        // Execute filter or callback methods
    1502:        $filterMethods = ['filterModules', 'resetFilterModules', 'filterCategory', 'unfilterCategory'];
    1503:        $callbackMethods = ['reset', 'download', 'enable', 'delete', 'enable_device', 'disable_device'];
    1504:        $postProcessMethodsList = array_merge((array) $filterMethods, (array) $callbackMethods);
    1505:        foreach ($postProcessMethodsList as $ppm) {
    1506:            if (Tools::isSubmit($ppm)) {
    1507:                $ppm = 'postProcess'.ucfirst($ppm);
    1508:                if (method_exists($this, $ppm)) {
    1509:                    $ppmReturn = $this->$ppm();
    1510:                }
    1511:            }
    1512:        }
    1513:
    1514:        // Call appropriate module callback
    1515:        if (!isset($ppmReturn)) {
    1516:            $this->postProcessCallback();
    1517:        }
    1518:
    1519:        if ($back = Tools::getValue('back')) {
    1520:            Tools::redirectAdmin($back);
    1521:        }
    1522:    }
    1523:
    1524:    /**
    1525:     * @return void
    1526:     *
    
    5. override/controllers/admin/AdminModulesController.php:22 source AdminModulesControllerCore->postProcess()
    3: * Ce module permet de raccourcir les urls catégorie et page cms et catégorie de produit et produit
    4: *
    5: * @author    Pliciweb Solutions<contact@pliciweb.com>
    6: * @copyright 2007-2015 PrestaShop SA
    7: * @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
    8: */
    9:class AdminModulesController extends AdminModulesControllerCore
    10:{
    11:    /**
    12:     * permet de lancer un build a la page du module
    13:     * pour recréer la chaine
    14:     */
    15:    /*
    16:    * module: plicimultioverride
    17:    * date: 2019-08-09 14:02:59
    18:    * version: 1.0.7
    19:    */
    20:    public function postProcess()
    21:    {
    22:        $return = parent::postProcess();
    23:        $module = Module::getInstanceByName('plicimultioverride');
    24:        $module->multiOvrBuildAll();
    25:        return $return;
    26:    }
    27:}
    
    6. classes/controller/Controller.php:197 source AdminModulesController->postProcess()
    178:        } else {
    179:            $this->$property = $value;
    180:        }
    181:    }
    182:
    183:    /**
    184:     * Starts the controller process
    185:     *
    186:     * @since   1.0.0
    187:     * @version 1.0.0 Initial version
    188:     */
    189:    public function run()
    190:    {
    191:        $this->init();
    192:        if ($this->checkAccess()) {
    193:            if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
    194:                $this->setMedia();
    195:            }
    196:
    197:            $this->postProcess();
    198:
    199:            if (!empty($this->redirect_after)) {
    200:                $this->redirect();
    201:            }
    202:
    203:            if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
    204:                $this->initHeader();
    205:            }
    206:
    207:            if ($this->viewAccess()) {
    
    7. classes/Dispatcher.php:852 source ControllerCore->run()
    833:                    return;
    834:                }
    835:                break;
    836:
    837:            default:
    838:                throw new PrestaShopException('Bad front controller chosen');
    839:        }
    840:
    841:        // Instantiate controller
    842:        try {
    843:            // Loading controller
    844:            $controller = Controller::getController($controllerClass);
    845:
    846:            // Execute hook dispatcher
    847:            if (isset($paramsHookActionDispatcher)) {
    848:                Hook::exec('actionDispatcher', $paramsHookActionDispatcher);
    849:            }
    850:
    851:            // Running controller
    852:            $controller->run();
    853:        } catch (PrestaShopException $e) {
    854:            $e->displayMessage();
    855:        }
    856:    }
    857:
    858:    /**
    859:     * Retrieve the controller from url or request uri if routes are activated
    860:     *
    861:     * @param int|null $idShop
    862:     *
    
    8. override/classes/Dispatcher.php:36 source DispatcherCore->dispatch()
    17: *  @author ETS-Soft <etssoft.jsc@gmail.com>
    18: *  @copyright  2007-2019 ETS-Soft
    19: *  @license    Valid for 1 website (or project) for each purchase of license
    20: *  International Registered Trademark & Property of ETS-Soft
    21: */
    22:class Dispatcher extends DispatcherCore
    23:{
    24:    /*
    25:    * module: ets_superspeed
    26:    * date: 2019-11-26 19:36:05
    27:    * version: 1.0.8
    28:    */
    29:    public function dispatch() {
    30:        require_once(dirname(__FILE__).'/../../modules/ets_superspeed/ets_superspeed.php');
    31:        if($cache = Ets_superspeed::displayContentCache(true))
    32:        {
    33:            echo $cache;
    34:            return true;
    35:        }
    36:        parent::dispatch();
    37:    }
    38:}
    9. smtgitb9e0nbr7r0/index.php:63 source Dispatcher->dispatch()
    44://small test to clear cache after upgrade
    45:if (Configuration::get('PS_UPGRADE_CLEAR_CACHE')) {
    46:    header('Cache-Control: max-age=0, must-revalidate');
    47:    header('Expires: Mon, 06 Jun 1985 06:06:00 GMT+1');
    48:    Configuration::updateValue('PS_UPGRADE_CLEAR_CACHE', 0);
    49:}
    50:
    51:// For retrocompatibility with "tab" parameter
    52:if (!isset($_GET['controller']) && isset($_GET['tab'])) {
    53:    $_GET['controller'] = strtolower($_GET['tab']);
    54:}
    55:if (!isset($_POST['controller']) && isset($_POST['tab'])) {
    56:    $_POST['controller'] = strtolower($_POST['tab']);
    57:}
    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();

    If it can be fixed by myself, I am open to any and all suggestions. If it is a more complicated matter, I am willing to pay someone to help me fix it.

     

  3. 17 hours ago, Theo said:

    LiteSpeed plugin caches the crap out of Panda. Stuff like user logged in, cart etc. are all cached.

    OK, I am not entirely familiar with Panda but you can punch holes in the LSCache to allow modules that require no caching, such as login, wishlist, carts, etc.  Perhaps it does not work with the way the theme is designed but if you flag those modules as private, they will not get cached normally.

  4. I solved the issue by using the core updater, going back one iteration then reinstalling my current one again - everything came back!  Not too sure why but I will take the end result!  I wish I could explain what went wrong beyond the scrambling of the htaccess because since it is automatically generated, it should have been overwritten and reverted back to before.

    Anyhow, I leave my solution here in case someone else encounters a similar problem.

    • Like 1
  5. The images are there.  Someone at my web host messed with htaccess to try and fix something not related to htaccess in the end: there was a missing php 7.3 handler on their end but I find that web manager never seem to listen or believe you when you tell them what you think is the issue...  So he screwed with the htaccess.  Which, I must say, under TB, is much more stable than my previous experience with PS.

    I can see the images but I need to manually modify the link for them to appear - they are, of course, all in their respective folders in the img.  So I am not overly worried but usually, deleting the htaccess or regenerating fix those issues.  Not so at the moment. I have cleared system cache, smarty cache, browser caches.  Is there another cache I am not aware of?  Is full page cache cleared when we clear the cache normally?

  6. Hi!

    Suppliers, manufacturers and categories images have stopped showing.

    I deactivated Friendly urls and reactivated it.

    I deleted the htaccess and recreated it.

    I regenerated those images after both attempts.

    Not sure what is causing it and why they are not coming back.

    Oh!  And I flushed the cache manually at each steps.

    The images are all present and accounted for in the BO...

  7. I can only speak for myself but here what has been my experience:

    When I was using Prestashop, I had tons of issues.  Lots of things and modules were not working right and I spent a lot of time trying to fix things.

    When I decided to switch to TB, the migration was very difficult - I had more help in a week than in years with Prestashop, not a diss, just stating a fact (for which I am tremendously grateful).  Like I stated, the migration was not easy by any stretch, partly because of my lack of knowledge but also partly because there was a lot of bugs.  If some modules stopped working, I bit the bullet and found alternatives that worked.  I used to need over 250 modules to get my shop to do what I wanted it to do under prestashop.  I am down to around 140 in TB!

    Things are faster in TB and things that did not work well before now do.  Prestashop acknowledges themselves in their boards that some of the issues I encountered were due to bugs that were never fixed.

    I use a super old theme and while I do have to do workarounds to get it to install properly, it is not a major issue.  It works as expected otherwise.  Most prestashop code works and when it doesn't, it is usually either due to bugs, compatibility issues between modules or, more often than not, server issues (some apache module was not activated or limited, or some php extension was missing).

    If it does not work, I have always managed to find alternatives or code them myself (with my little knowledge) and things work better than ever.

    I use to have nightmares and fear overrides - I have almost none now but they do what they are supposed to do.  Never any issues anymore with them.

    I think the logic of getting rid of the bugs and get things running smoothly from the get go is sound.  If the base works, then it is much more suitable to build on than trying to patch things along as we go.

    The lack of some functionalities might be frustrating but I find that 90% of modules work without issues and the rest can be tweaked to work.

    I for one am grateful and I do not take the view that the software needs to bend to everyone's wills and needs - it needs to be solid, stable and working properly and it is up to us to build on it and adapt if need be.  If the platform is strong and solid, eventually developers will flock to it.

    That is my two cents.

     

    • Like 2
    • Thanks 1
  8. 9 hours ago, Theo said:

    Ok interesting. I think it the Business edition. The reason I'm asking is that apparently it only works with "the default theme + warehouse" and I've seen other TB guys ask on the Litespeed forums how to make it work...
    Are you using Warehouse, or which theme?

    I am using a theme from Template Monsters that I modified for my needs.  The Litespeed PS cache works perfectly for me. You can check if it works by looking at the header of your site.  You should see something like ls-cache: hit if it works.  You should also notice a significant improvement in the speed of page loading.  I am not sure what would be the major differences with the Warehouse or Panda themes that would make it not work.  The only issue I encountered that was causing caching issues was modules with full page caches that compete with the LS-Cache.  The versions of TB I used the cache on was TB 1.1.0 and 1.1.x (Bleeding Edge) and there was no issues with either versions.

    A quick Google search yielded this contribution from one of the forum members here:

    http://nemops.com/litespeed-module-prestashop-thirty-bees/#.XdlDYJNKiF0

    • Thanks 1
  9. 2 hours ago, Theo said:

    Hi guys

    I'm wondering if any of you have had experience with configuring TB + Panda + Litespeed module?

    If so, mind sharing the modifications you've had to make to make it work please?

    Just to be clear, are you using the Litespeed server Business edition?  The module is useless without that version of the server.  Open Litespeed (the free version) does not support the module.

    The module works well right out of the box with TB for me, but I am using another third party theme, not Panda however.  But from what I can tell, with Panda, you should not have any problems.  You need to deactivate all the full page caches however in order to use the Litespeed module efficiently.

  10. 7 hours ago, datakick said:

    Thanks @zen for your testing, really appreciated.

    Anyone else tried this, or has some input? Remember, once it's integrated and released, it's too late to complain... 🙂

    Installing it today and will run a series of tests as I have a need for geolocation with several modules and it has been a bit wonky in a while.  Will keep you posted.

    • Like 1
  11. I have been using the settings mentioned in this prestashop article and it has been working well for me.  You need to scroll down to point 4 for the parts related to the sitemap.  Whatever does not apply to your TB installation can sort of be inferred from the rest of the information available since the module is pretty similar:

    http://prestacraft.com/prestashop-seo-guidelines-tips-and-tricks/

    It works and I can safely say that I actually saw a difference after implementing most of these tips.  Hope it helps!

  12. 4 hours ago, datakick said:

    I bet you are talking about paypal's checkout.js script -- this one is included using on all pages, even though it is needed only during payment. It uses header hook to do that -- but you can't simply remove this hook, as it would disable paypal functionality on your checkout page as well. What you can do is to define hook exceptions, blacklist all controllers except checkout

    Yup, that's the one.  How does one go about defining hook exceptions?

    • Like 1
  13. 4 hours ago, Traumflug said:

    Disabling a module just disables it. Which means, all hooks and overrides stay in place.

    To get rid of a module, one should uninstall and delete it.

    I meant that I disabled the functionality of using Paypal to login.  However, that script is still there on every page and it still checks with Paypal, even though technically, I don't need it to.  I sometimes disable hooks when I know they call functions I do not need and it does speed things up, but I am not sure what hook contains the login in the TB Paypal module.

  14. I am looking for things that slow down the render of my pages and one thing that comes up on every page is a browser warning: waiting for paypal.com

    As far as I can tell, this is code for the Paypal login, which I do not use.  It is disabled in the module yet it loads at every page.

    I wanted to disable the hook that calls it but I am not sure which one it is and I do not want to accidentally prevent things needed by Paypal from loading.

     

    Any insights?

  15. For those who might have ran into the same issues I did, here is how I fixed all my issues:

    I tried several prestashop elastic search modules after my failures with the free TB elastic search module and the various hoops it is associated with.  These modules either had the same limitations as the TB one, or they just plain did not work.  I found this one however, which actually is compatible with elasticsearch up to the current version 7:
    https://addons.prestashop.com/en/search-filters/19527-elasticsearchconnector.html

    The module is pricey but well built and worth every penny in my honest opinion.  The only thing that does not work for some reason with TB is the function for error logging.  The developer actually had to disable it entirely.  Everything else works like a charm.  I was able to use the latest version of elastic search, which is blazing fast.  The module allows you to use the default search engine if you want while indexing but once the indexing is done, since it is not using the DB, you can actually delete the content of the default search engine tables - and in my case, clear several hundreds of MB from my DB!  I now have a DB light as a feather and I tremendously improved the speed of my website and queries.  And if somebody searches something, no matter what, it is lightning fast!!!  Very impressive.  The module requires some tweaking to insure the best results in search, it is so encompassing that you actually need to limit what it searches at times to get more accurate, focused results.  But it is worth the time investment to figure it out.  Also, if you have a lot of products like me, it takes a while to index but once it is done, there is practically nothing left to do but run a cron job to automatically index new products.  I am very happy with the end result and I stopped the never ending ballooning of my Database.

    That being said, I do want to thank everyone who tried to help me.  This forum is lightyears ahead of any other ecommerce platform in terms of helpfulness and response.  I really, really appreciate it.  Thank you all.

    • Thanks 1
×
×
  • Create New...