Jump to content
thirty bees forum

movieseals

Gold member
  • Posts

    432
  • Joined

  • Last visited

  • Days Won

    7

Posts posted by movieseals

  1. I get the following log and the customers get an error 500:
     

    Decoded exception

    Can't load Order status

    in file classes/module/PaymentModule.php at line 408

    Source file: classes/module/PaymentModule.php

    389:            $this->context = Context::getContext();
    390:        }
    391:        $this->context->cart = new Cart((int) $idCart);
    392:        $this->context->customer = new Customer((int) $this->context->cart->id_customer);
    393:        // The tax cart is loaded before the customer so re-cache the tax calculation method
    394:        $this->context->cart->setTaxCalculationMethod();
    395:
    396:        $this->context->language = new Language((int) $this->context->cart->id_lang);
    397:        $this->context->shop = ($shop ? $shop : new Shop((int) $this->context->cart->id_shop));
    398:        ShopUrl::resetMainDomainCache();
    399:        $idCurrency = $currencySpecial ? (int) $currencySpecial : (int) $this->context->cart->id_currency;
    400:        $this->context->currency = new Currency((int) $idCurrency, null, (int) $this->context->shop->id);
    401:        if (Configuration::get('PS_TAX_ADDRESS_TYPE') == 'id_address_delivery') {
    402:            $contextCountry = $this->context->country;
    403:        }
    404:
    405:        $orderStatus = new OrderState((int) $idOrderState, (int) $this->context->language->id);
    406:        if (!Validate::isLoadedObject($orderStatus)) {
    407:            Logger::addLog('PaymentModule::validateOrder - Order Status cannot be loaded', 3, null, 'Cart', (int) $idCart, true);
    408:            throw new PrestaShopException('Can\'t load Order status');
    409:        }
    410:
    411:        if (!$this->active) {
    412:            Logger::addLog('PaymentModule::validateOrder - Module is not active', 3, null, 'Cart', (int) $idCart, true);
    413:            die(Tools::displayError());
    414:        }
    415:
    416:        // Does order already exists ?
    417:        if (Validate::isLoadedObject($this->context->cart) && $this->context->cart->OrderExists() == false) {
    418:            if ($secureKey !== false && $secureKey != $this->context->cart->secure_key) {
    

    Stack trace

    1. modules/paybyphone/controllers/front/validation.php:46 source PaymentModuleCore->validateOrder(arguments)
    2. classes/controller/Controller.php:197 source paybyphoneValidationModuleFrontController->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()) {
    
    3. classes/controller/FrontController.php:253 source ControllerCore->run()
    234:     * @see     Controller::run()
    235:     * @since   1.0.0
    236:     *
    237:     * @version 1.0.0 Initial version
    238:     */
    239:    public function postProcess()
    240:    {
    241:    }
    242:
    243:    /**
    244:     * Starts the controller process
    245:     *
    246:     * Overrides Controller::run() to allow full page cache
    247:     *
    248:     * @since   1.0.7
    249:     */
    250:    public function run()
    251:    {
    252:        if (! PageCache::isEnabled()) {
    253:            return parent::run();
    254:        }
    255:
    256:        $debug = Configuration::get('TB_PAGE_CACHE_DEBUG');
    257:        $cacheEntry = PageCache::get();
    258:        if (! $cacheEntry->exists()) {
    259:            if ($debug) {
    260:                header('X-thirtybees-PageCache: MISS');
    261:            }
    262:            return parent::run();
    263:        }
    
    4. classes/Dispatcher.php:852 source FrontControllerCore->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:     *
    
    5. ./index.php:33 source DispatcherCore->dispatch()
    14: * If you did not receive a copy of the license and are unable to
    15: * obtain it through the world-wide-web, please send an email
    16: * to license@thirtybees.com so we can send you a copy immediately.
    17: *
    18: * DISCLAIMER
    19: *
    20: * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
    21: * versions in the future. If you wish to customize PrestaShop for your
    22: * needs please refer to https://www.thirtybees.com for more information.
    23: *
    24: *  @author    thirty bees <contact@thirtybees.com>
    25: *  @author    PrestaShop SA <contact@prestashop.com>
    26: *  @copyright 2017-2018 thirty bees
    27: *  @copyright 2007-2016 PrestaShop SA
    28: *  @license   http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
    29: *  PrestaShop is an internationally registered trademark & property of PrestaShop SA
    30: */
    31:
    32:require(dirname(__FILE__).'/config/config.inc.php');
    33:Dispatcher::getInstance()->dispatch()


     

  2. On 2/19/2020 at 9:09 AM, wakabayashi said:

    @movieseals are you using this module for speed optimization? I can only say this: thirtybees is quite fast without any external modules. You also don't need this "Full Page Cache" as @zen correctly pointed out. If your website is slow: check your hoster or the external modules.

    When I have performance issues in 95% the reason is due to a shitty external module.

    Hi!  Not it is not meant to speed up the site - I do have another module to do a full page cache and I have found that used in conjunction with the quite fast native TB help improve the speed of loading a little.  There is an option to punch holes in the full page caches for modules, so I did that and it fixed the issue!  Thank you so much.

  3. On 2/19/2020 at 5:47 AM, zen said:

    The problem seems to be not in the cross-selling module that works fine.. but from your module called :

    securitybooster

    this one, in order to work properly should not be cached, just try to not use the page cache at all.. I don't think you'll find it less fast than before, and don't be confused I am not talking about smarty cache, this one should still be engaged.

    You oriented me towards a solution.  Thank you very much!

  4. I have a module that sometimes works well and sometimes crashes with a 500 error - it appears to be smarty related issues related to caches specific to some modules such as @datakick revvs module and a few others.  Manually clearing the cache, ie going into the cache folder and flusing everything in both cache and compile folders sometimes brings it back to life, sometimes not.  I am using PHP 7.3.  As usual, any help or insight is appreciated.

    Here is an example of the error I get, in this case caused by a file in the cache from the crossselling module - the lines causing the issues are highlited in red:

    Decoded exception

    SplFileInfo::getSize(): stat failed for /home/zbookstore/public_html/cache/smarty/cache/crossselling/productfooter/28825

    in file modules/securitybooster/securitybooster.php at line 1676

    Source file: modules/securitybooster/securitybooster.php

    1657:        }
    1658:        if ((file_exists($pathTemplate)) && (file_exists($indexTemplate))) {
    1659:            return round(($bytestotal - filesize($indexTemplate)) / 1000, 0);
    1660:        } elseif ((file_exists($pathTemplate)) && (!file_exists($indexTemplate))) {
    1661:            return round($bytestotal / 1000, 0);
    1662:        } else {
    1663:            return $this->l('Folder is not found');
    1664:        }
    1665:    }
    1666:    
    1667:    protected function dirSizeSmartyCache($path)
    1668:    {
    1669:        $bytestotal = 0;
    1670:        $path       = realpath(_PS_ROOT_DIR_ . '/cache/smarty');
    1671:        $index      = _PS_ROOT_DIR_ . '/cache/smarty/index.php';
    1672:        $index2     = _PS_ROOT_DIR_ . '/cache/smarty/compile/index.php';
    1673:        $index3     = _PS_ROOT_DIR_ . '/cache/smarty/cache/index.php';
    1674:        if ($path !== false) {
    1675:            foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS)) as $object) {
    1676:                $bytestotal += $object->getSize();
    1677:            }
    1678:        }
    1679:        return round(($bytestotal - filesize($index) - filesize($index2) - filesize($index3)) / 1000, 0);
    1680:    }
    1681:    
    1682:    protected function dirSizeCacheFs($path)
    1683:    {
    1684:        $bytestotal   = 0;
    1685:        $path         = realpath(_PS_ROOT_DIR_ . '/cache/cachefs');
    1686:        $indexCacheFs = _PS_ROOT_DIR_ . '/cache/cachefs/index.php';
    

    Stack trace

    1. modules/securitybooster/securitybooster.php:1676 source SplFileInfo->getSize()
    1657:        }
    1658:        if ((file_exists($pathTemplate)) && (file_exists($indexTemplate))) {
    1659:            return round(($bytestotal - filesize($indexTemplate)) / 1000, 0);
    1660:        } elseif ((file_exists($pathTemplate)) && (!file_exists($indexTemplate))) {
    1661:            return round($bytestotal / 1000, 0);
    1662:        } else {
    1663:            return $this->l('Folder is not found');
    1664:        }
    1665:    }
    1666:    
    1667:    protected function dirSizeSmartyCache($path)
    1668:    {
    1669:        $bytestotal = 0;
    1670:        $path       = realpath(_PS_ROOT_DIR_ . '/cache/smarty');
    1671:        $index      = _PS_ROOT_DIR_ . '/cache/smarty/index.php';
    1672:        $index2     = _PS_ROOT_DIR_ . '/cache/smarty/compile/index.php';
    1673:        $index3     = _PS_ROOT_DIR_ . '/cache/smarty/cache/index.php';
    1674:        if ($path !== false) {
    1675:            foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS)) as $object) {
    1676:                $bytestotal += $object->getSize();
    1677:            }
    1678:        }
    1679:        return round(($bytestotal - filesize($index) - filesize($index2) - filesize($index3)) / 1000, 0);
    1680:    }
    1681:    
    1682:    protected function dirSizeCacheFs($path)
    1683:    {
    1684:        $bytestotal   = 0;
    1685:        $path         = realpath(_PS_ROOT_DIR_ . '/cache/cachefs');
    1686:        $indexCacheFs = _PS_ROOT_DIR_ . '/cache/cachefs/index.php';
    
    2. modules/securitybooster/securitybooster.php:286 source securityBooster->dirSizeSmartyCache(arguments)
    267:            } else
    268:                $conf = $this->l('Nothing that need to be cleaned');
    269:            $output .= $this->displayConfirmation($conf);
    270:            $this->getDataBaseSize();
    271:        }
    272:        if (((bool) Tools::isSubmit('submitCleanFullDb')) == true) {
    273:            self::cleanConections('connections');
    274:            $this->cleanDataBase1();
    275:            $this->getDataBaseSize();
    276:            $output .= $this->displayConfirmation($this->l('Data base has been fully cleaned.'));
    277:        }
    278:        if (((bool) Tools::isSubmit('submitFixPermisions')) == true) {
    279:            $this->directoryPermisions();
    280:            $output .= $this->displayConfirmation($this->l('755 permisions have been assigned to Prestashop directory.'));
    281:        }
    282:        
    283:        $this->context->smarty->assign('module_dir', $this->_path);
    284:        $this->context->smarty->assign('dirSizeTMP', $this->dirSizeTmp($path));
    285:        $this->context->smarty->assign('dirSizeThemeCache', $this->dirSizeThemeCache($path));
    286:        $this->context->smarty->assign('dirSizeSmartyCache', $this->dirSizeSmartyCache($path));
    287:        $this->context->smarty->assign('dirSizeCacheFs', $this->dirSizeCacheFs($path));
    288:        $this->context->smarty->assign('dirSizeTemplateCache', $this->dirSizeTemplateCache($path));
    289:        $this->context->smarty->assign('pathTemplate', $pathTemplate);
    290:        $this->context->smarty->assign('dataBaseSize', Configuration::get('SECURITYBOOSTER_DATABASE_SIZE'));
    291:        $this->context->smarty->assign('php_info', $this->getPhpInfo());
    292:        $this->context->smarty->assign('checkAbandonedCarts', $this->checkAbandonedCarts());
    293:        $this->context->smarty->assign('checkConnection', $this->checkConnection());
    294:        $this->context->smarty->assign('checkIntegrityDataBase', $this->checkIntegrityDataBase());
    295:        $this->context->smarty->assign('folderTotalSize', (($this->dirSizeCacheFs($path) + $this->dirSizeSmartyCache($path) + $this->dirSizeTemplateCache($path) + $this->dirSizeThemeCache($path) + $this->dirSizeTmp($path)) / 1000));
    296:        $this->context->smarty->assign('checkDataBase', Configuration::get('SECURITYBOOSTER_DATABASE_STATUS'));
    
    3. controllers/admin/AdminModulesController.php:1653 source securityBooster->getContent()
    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: 2020-02-04 09:43:33
    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. smtgitb9e0nbr7r0/index.php:63 source DispatcherCore->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();
  5. I would normally use the TB Stripe module but I need a subscription function for the magazines we sell.  I have a Stripe module that enables that but since switching to PHP 7.3, I get the following error in my php error log:

    count(): Parameter must be an array or an object that implements Countable in /home/zbookstore/public_html/modules/stripepro/stripepro.php on line 410

    Here is the code on and around line 410, where line 410 is in red:

     /**
         * [hookHeader => change add to cart button with subscribe button on home page as well as on product page]
         * @param  [type] $params [array containing information of the product]
         * @return [type]         [description]
         */
        public function hookHeader($params)
        {
                    
            if (Tools::getValue('controller') == 'product')
            {
                $product_id = Tools::getValue('id_product');
                if(!empty($product_id))
                {
                    $sub = Db::getInstance()->getValue('select `id_subscription_product` from `'._DB_PREFIX_.'stripepro_products` where `active` = 1 && `id_product_attribute`=0 && `id_product`= '.$product_id);
                    if($sub != '')
                    {
                        $this->context->smarty->assign('controller','product');
                        return $this->display(__FILE__, 'subscribe.tpl');
                    }
                }
            }
            else
            {
                /* Continue only if we are in the checkout process */
                if (Tools::getValue('controller') != 'order-opc' && (!($_SERVER['PHP_SELF'] == __PS_BASE_URI__.'order.php' || $_SERVER['PHP_SELF'] == __PS_BASE_URI__.'order-opc.php' || Tools::getValue('controller') == 'order' || Tools::getValue('controller') == 'orderopc' || Tools::getValue('step') == 3 || Tools::getValue('controller') == 'supercheckout' || Tools::getValue('pm') == 'stripepro'))){
                    
                    $subscribe_products = Db::getInstance()->executeS('select * from `'._DB_PREFIX_.'stripepro_products`  where `active`= 1 && `id_product_attribute`=0 ');
                    if (count($subscribe_products > 0))
                    {
                        $this->context->smarty->assign('subscriptions',$subscribe_products);
                        return $this->display(__FILE__, 'subscribe.tpl');
                    }
                
                } else {
                    
                    $nbProducts = $this->context->cart->nbProducts();
                    if ($nbProducts<=0)
                       return;
          
                    $this->smarty->assign($this->getPaymentVars());
                    $this->context->controller->addCSS($this->_path.'views/css/stripe-prestashop.css');
                    $this->context->controller->addJS("https://js.stripe.com/v2/");
                    $this->context->controller->addJS("https://js.stripe.com/v3/");
            
                    if(Configuration::get('STRIPE_CHKOUT_POPUP') || Configuration::get('STRIPE_ALLOW_BTC'))
                       $this->context->controller->addJS("https://checkout.stripe.com/checkout.js");
                       
                    return $this->display(__FILE__, './views/templates/front/vars_payment.tpl');
                }
            }
        }
        
        public function checkCurrency($cart)
        {
            $currency_order = new Currency($cart->id_currency);
            $currencies_module = $this->getCurrency($cart->id_currency);

            if (is_array($currencies_module)) {
                foreach ($currencies_module as $currency_module) {
                    if ($currency_order->id == $currency_module['id_currency']) {
                        return true;
                    }
                }
            }
            return false;
        }
     

    Any insights on how to fix this would be very appreciated.  Thanks!

  6. Hi!

    I am having an issue right now with the sitemap module.  Whenever I try to generate a sitemap, either by cronjob or manually, the module times out after roughly 20 seconds.  I checked the php ini, I have plenty of memory, max execution time is pretty high, and most other long scripts usually run fine on the site so I am at a loss as to why this is happening with this particular module.

  7. Hello all,

    I get an error 500 and the following exception when I click on customers in the customers section with TB 1.1.x

     

    Decoded exception

    Too few arguments to function okom_vip::printForm(), 2 passed in /home/zbookstore/public_html/modules/okom_vip/okom_vip.php on line 454 and exactly 3 expected

    in file modules/okom_vip/okom_vip.php at line 492

    Source file: modules/okom_vip/okom_vip.php

    473:                $exprired = false;
    474:            } else {
    475:                $exprired = true;
    476:            }
    477:        }
    478:
    479:        $product = new Product((int)Configuration::get('OKOM_VIP_IDPRODUCT'), true, $this->context->language->id);
    480:        $link = new Link();
    481:        //@TODO Fix Bad Link
    482:        $vip_product_url = $link->getProductLink($product);
    483:        $this->context->smarty->assign(array(
    484:            'customer_vip' => $customer_vip,
    485:            'exprired' => $exprired,
    486:            'is_vip' => $is_vip,
    487:            'vip_product_url' => $vip_product_url
    488:        ));
    489:        return $this->display(__FILE__, 'shopping-cart.tpl');
    490:    }
    491:
    492:    public function printForm($vip_add, $vip_end, $vip_cards)
    493:    {
    494:        $option = '';
    495:        
    496:        if ($vip_cards) {
    497:            foreach ($vip_cards as $vip_card) {
    498:                $option .= '<option data-add="'.$vip_card['vip_add'].'" data-end="'.$vip_card['vip_end'].'" value="'.$vip_card['id_vip'].'">'.$vip_card['id_vip'].' : '.$vip_card['vip_add'].' to '.$vip_card['vip_end'].'</option>';
    499:            }
    500:        }
    501:
    502:        $html = '';
  8. I could not make it work - I tried for weeks.  I eventually found a module called elastic search connector on Prestashop and with a bit of help from the dev managed to get it working under php 7.3 with the latest version (7) of elastic search but part of the module does not work, mostly the logging, but the search part works wonderfully.

    • Like 1
  9. 6 hours ago, Havouza said:

    Which graphic engine does 1.1 use to create images. I have imagick and imagemagic installed on the server but not Dekkers modul because it foes not work in 1.1

     

    What do you mean, it does not work?  What version of the module do you have?  Version 1.3.1 works fine with 1.1, at least for me.  Perhaps revisit the module if you have the same version as I do: there is a slider that needs to be put to on now in order for imagick to be activated.  Other than that, everything works fine.

  10. Hello everyone,

    I have a module that hide the TB Block Currency module and shows the currency according to the IP or country of visitor.  The hiding works fine on every and all pages that are actually from the theme itself.

    However, whenever a user goes to theme pages generated by a module (blog, a module for events, etc), then the block currency reverts to showing a selector with all the currencies available.

    Does anyone know why the module pages would not be affected - the code appears to be similar, the only thing changing is the nature of the links.  I would like to achieve the same effect on every pages, native or modules, for consistency sake.

    Thank you!

  11. Hello everyone,

    I am encountering a weird pagination issue on some pages when there is a lot of products.  The first and second pages repeat themselves, meaning clicking on page 1 or page 2 shows the exact same products.  To actually get on to the products on page 2, you need to click on page 3 and so on.  So basically, on some pages, an extra page with the exact same content is generated.  Anyone else experiencing this?  I believe it is an artefact created by the way pages are counted and when you reach a certain amount of pages, it just breaks.  If anyone as a clue as to how I could go about fixing this - it is very weird.

  12. 9 hours ago, datakick said:

    The problems with this kind of development is that, well,... there is not much you can say to the community. There is not big roadmap with flashy milestones. It's a boring, chore-like work. That's one of the reasons why nobody writes about that, here or in some blogposts.... 

    I speak for myself but I can already see the results of that work.  Even on Ps 1.6, I used to have all kinds of problems  and more often, they were due to bugs or other code issues - things have been night and day even from the early versions of TB up to now - I can see that each bugs that get fixed even help some modules that never worked properly from before.  So I am totally down and good with that approach.  When the base is stable, it will be easier to build on it.

  13. 8 hours ago, Traumflug said:

    All hints to this channel were removed already. No mentioning in the Readme ( = Github front page), no mentioning anywhere else. People appearing there either find it by googling or follow old links.

    I did test all my old PS modules with TB.  Some no longer work, usually due to outdated programming or aggressive overrides.  95% work as intended.  It takes time.  I understand wanting a turnkey solution that roars right off the bat.  The basic TB works fine for a lot of needs.  All I can say is that I spend less time fighting stupid bugs than when I was on the PS platform.

     

    That being said, fingers crossed for Lesley.  I hope things go well and you are back on your feet soon.

    • Like 1
  14. Well, the problem is back again.  Still do not know what is causing it but got more useful info in some logs:

    HP Fatal error:  Uncaught Error: Class 'Shop' not found in /home/zbookstore/public_html/classes/Configuration.php:376
    Stack trace:
    #0 /home/zbookstore/public_html/classes/Tools.php(5259): ConfigurationCore::get('PS_TIMEZONE')
    #1 /home/zbookstore/public_html/classes/db/Db.php(274): ToolsCore::getTimeZone()
    #2 /home/zbookstore/public_html/classes/Configuration.php(405): DbCore::getInstance(0)
    #3 /home/zbookstore/public_html/classes/Configuration.php(371): ConfigurationCore::loadConfiguration()
    #4 /home/zbookstore/public_html/classes/Encryptor.php(135): ConfigurationCore::get('PS_CIPHER_ALGOR...')
    #5 /home/zbookstore/public_html/classes/Encryptor.php(60): EncryptorCore::getCipherTool()
    #6 /home/zbookstore/public_html/classes/exception/PrestaShopException.php(98): EncryptorCore::getInstance()
    #7 /home/zbookstore/public_html/classes/ErrorHandler.php(132): PrestaShopExceptionCore->displayMessage()
    #8 [internal function]: ErrorHandlerCore->uncaughtExceptionHandler(Object(Error))
    #9 {main}
      thrown in /home/zbookstore/public_html/classes/Configuration.php on line 376
  15. On 12/15/2019 at 9:54 PM, lesley said:

    We cannot decode it without your cookie key.  It looks like that override could be the issue, I have not see that one before. Have you tried renaming it? 

    Ah! I see... 😞  I removed all the modules that were not TB and I reinstalled them one by one.  Seemed to have worked for now.

    • Like 1
  16. On 12/16/2019 at 8:40 AM, Kashir2000 said:

    @movieseals In admin panel, under settings there is "Logs" tab. You can uplad this file there, decode error and post error here. Only then we can tell/help you more. Or you may find out what's wrong yourself 🙂

    If I was able to login in the backend, I would have done it - I know where it is.  It's just that when you cannot login in the backend, you are kind of screwed...

  17. Only message in logs are these:
    Declaration of Link_000_webpgenerator::getImageLink($name, $ids, $type = NULL) should be compatible with LinkCore::getImageLink($name, $ids, $type = NULL, $format = 'jpg', $highDpi = false) in /home/zbookstore/public_html/override_multi/classes/Link_000_webpgenerator.php on line 0

    Declaration of Link_000_webpgenerator::getCatImageLink($name, $idCategory, $type = NULL) should be compatible with LinkCore::getCatImageLink($name, $idCategory, $type = NULL, $format = 'jpg', $highDpi = false) in /home/zbookstore/public_html/override_multi/classes/Link_000_webpgenerator.php on line 0

    and

    Undefined index: HTTP_USER_AGENT in /home/zbookstore/public_html/modules/ets_superspeed/classes/cache.php on line 31

    They look harmless for the most part.  Removing the modules and associated files does not fix the problem so I think those are unrelated.

    Unable to run the exception I download through the decoder, so I am at a loss as to what is causing this.  Everything was working fine.  Deleting htaccess does not work.  Rebooting server neither.

    I have tried disabling the overrides folders, to no effect. I also manually emptied all caches in case it was caused by a cache corruption.  No dice.

    I have attached my exception, if someone could kindly decode it and copy the results, it might give me an inkling of what is wrong.

    exception_2019121519436.txt

  18. Who cares if it is late a few weeks?  It is a small, dedicated team. I would rather it be late than buggy.  Worst comes to worst, you can always painlessly experiment with the 1.1.x version.  We are getting more than I ever got under the old model.  I can be patient.  I would rather have something that works than a mountain of hidden bugs like we used to get...

    The team here has its heart in the right place.  They are responsible and meticulous.  I am willing to be patient.  They will let us know when they are ready for prime time.

    • Like 3
  19. Hi again!

    I ran the module today and everything checked out except for one thing.  It said that there was one image missing.  It gave me the product ID.  I regenerated this image and re-ran the tests.

    Still got the error.

    So I click on the fix button in the module and ran the tests again - this time everything is A-OK.

    Just for my understanding, what does the module do that the regeneration of the product images did not?

×
×
  • Create New...