Prodej projektu Duchod.cz - cena 550 tis Kč. Dále MojeFinance.cz, DuchodovaReforma.cz
Zobrazují se odpovědi 1 až 1 z 1

PS 1.7 při editaci popisu produktů error 500

  1. Dobrý den,

    prosím o pomoc, při editaci popisu produktů to po jejich uložení háže 500 Internal Server Error v administraci Presty (v. 1.7.4.2), ostatní záložky v menu v adminovi fungují, jen se nelze dostat zpět do produktů.

    Měl jsem otevřený jeden produkt v jedné záložce a v druhé záložce druhý produkt a z jednoho jsem kopíroval údaje do druhého, po stisknutím na Uložit to uložilo, ale při kliknutí na Katalog-Produkty se již začala zobrazovat chyba 500.

    V ladícím režimu se to rozběhne, tak jsem v něm tyto dva poslední produkty vymazal, chyba ale přetrvává.

    V logu z PS je jako poslední operace toto: Product catalog filters stored.

    Po smazání těch dvou produktů se nedá nyní dostat ani do toho katalogu z adminu a píše to výpis erroru ze Symphony, poradí prosím někdo co s tím, děkuji:

    Uncaught Warning: include_once(/domena.cz/modules/groupinc/classes/GroupincConfiguration.php): failed to open stream: No such file or directory
    Show context Hide trace
    {▼
    /mnt/data/accounts/m/marketing/data/www/domena.cz/override/classes/Product.php:34 {▼
    › if (Module::isEnabled('groupinc')) {
    › include_once(_PS_MODULE_DIR_.'groupinc/classes/GroupincConfiguration.php');
    › $groupinc = new GroupincConfiguration();
    }
    /domena.cz/classes/Product.php:3164 {▶}
    /domena.cz/src/Adapter/Product/AdminProductDataProvider.php:351 {▶}
    /domena.cz/src/PrestaShopBundle/Controller/Admin/ProductController.php:181 {▶}
    /domena.cz/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151 {▶}
    /domena.cz/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68 {▶}
    /domena.cz/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200 {▶}
    /domena.cz/admin650t0p4kv/index.php:88 {▶}
    }
    CRITICAL
    14:47:43
    request Uncaught PHP Exception Symfony\Component\Debug\Exception\ContextErrorExce ption: "Warning: include_once(/domena.cz/modules/groupinc/classes/GroupincConfiguration.php): failed to open stream: No such file or directory" at /domena.cz/override/classes/Product.php line 34
    Show context Hide trace
    {▼
    /domena.cz/override/classes/Product.php:34 {▼
    › if (Module::isEnabled('groupinc')) {
    › include_once(_PS_MODULE_DIR_.'groupinc/classes/GroupincConfiguration.php');
    › $groupinc = new GroupincConfiguration();
    }
    /domena.cz/classes/Product.php:3164 {▶}
    /domena.cz/src/Adapter/Product/AdminProductDataProvider.php:351 {▶}
    /domena.cz/src/PrestaShopBundle/Controller/Admin/ProductController.php:181 {▶}
    /domena.cz/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151 {▶}
    /domena.cz/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68 {▶}
    /domena.cz/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200 {▶}
    /domena.cz/admin650t0p4kv/index.php:88 {▶}
    }



    ****************************************


    Problém byl identifikován v: domena.cz/override/classes/Product.php
    -kde v té samé době, kdy se error 500 zobrazil, přibyl tento kód odkazující na neexistující modul v adresáři:

    /*
    * module: groupinc
    * date: 2018-08-02 11:55:58
    * version: 1.3.8
    */
    public static function priceCalculation($id_shop, $id_product, $id_product_attribute, $id_country, $id_state, $zipcode, $id_currency,
    $id_group, $quantity, $use_tax, $decimals, $only_reduc, $use_reduc, $with_ecotax, &$specific_price, $use_group_reduction,
    $id_customer = 0, $use_customer_price = true, $id_cart = 0, $real_quantity = 0, $id_customization = 0)
    {
    static $address = null;
    static $context = null;
    if ($address === null) {
    $address = new Address();
    }
    if ($context == null) {
    $context = Context::getContext()->cloneContext();
    }
    if ($id_shop !== null && $context->shop->id != (int)$id_shop) {
    $context->shop = new Shop((int)$id_shop);
    }
    if (!$use_customer_price) {
    $id_customer = 0;
    }
    if ($id_product_attribute === null) {
    $id_product_attribute = Product::getDefaultAttribute($id_product);
    }
    $configs_without_taxes = array();
    $configs_with_taxes = array();
    $configs_with_discounts = array();
    if (Module::isEnabled('groupinc')) {
    include_once(_PS_MODULE_DIR_.'groupinc/classes/GroupincConfiguration.php');
    $groupinc = new GroupincConfiguration();
    if (in_array($context->controller->controller_type, array('admin'))) {
    $configs_with_taxes = $groupinc->getAdminGIconfigurations($id_shop);
    } else {
    $taxes = false;
    $configs_without_taxes = $groupinc->getGIConfigurations($id_shop, $id_product, $id_customer, $id_country, $id_state, $id_currency, $context->language->id, $taxes);
    $taxes = true;
    $configs_with_taxes = $groupinc->getGIConfigurations($id_shop, $id_product, $id_customer, $id_country, $id_state, $id_currency, $context->language->id, $taxes);
    $configs_with_discounts = $groupinc->getGIConfigurations($id_shop, $id_product, $id_customer, $id_country, $id_state, $id_currency, $context->language->id, $taxes, true);
    }
    }
    if (!Module::isEnabled('groupinc') || (!isset($configs_with_taxes) && count($configs_with_taxes) == 0) ||
    (!isset($configs_without_taxes) && count($configs_without_taxes) == 0) ||
    (!isset($configs_with_discounts) && count($configs_with_discounts) == 0)) {
    return parent::priceCalculation($id_shop, $id_product, $id_product_attribute, $id_country, $id_state, $zipcode, $id_currency,
    $id_group, $quantity, $use_tax, $decimals, $only_reduc, $use_reduc, $with_ecotax, $specific_price, $use_group_reduction,
    $id_customer, $use_customer_price, $id_cart, $real_quantity, $id_customization);
    }
    $cache_id = (int)$id_product.'-'.(int)$id_shop.'-'.(int)$id_currency.'-'.(int)$id_country.'-'.$id_state.'-'.$zipcode.'-'.(int)$id_group.
    '-'.(int)$quantity.'-'.(int)$id_product_attribute.'-'.(int)$id_customization.
    '-'.(int)$with_ecotax.'-'.(int)$id_customer.'-'.(int)$use_group_reduction.'-'.(int)$id_cart.'-'.(int)$real_quantity.
    '-'.($only_reduc?'1':'0').'-'.($use_reduc?'1':'0').'-'.($use_tax?'1':'0').'-'.(int)$decimals;
    $specific_price = SpecificPrice::getSpecificPrice(
    (int)$id_product,
    $id_shop,
    $id_currency,
    $id_country,
    $id_group,
    $quantity,
    $id_product_attribute,
    $id_customer,
    $id_cart,
    $real_quantity
    );
    if (isset($configs_with_discounts) and is_array($configs_with_discounts) and count($configs_with_discounts) > 0) {
    $specific_price = $groupinc->getGroupincReduction($configs_with_discounts, $id_product, $specific_price);
    }
    if (isset(self::$_prices[$cache_id])) {
    return self::$_prices[$cache_id];
    }
    $cache_id_2 = $id_product.'-'.$id_shop;
    if (!isset(self::$_pricesLevel2[$cache_id_2])) {
    $sql = new DbQuery();
    $sql->select('product_shop.`price`, product_shop.`wholesale_price`, product_shop.`ecotax`');
    $sql->from('product', 'p');
    $sql->innerJoin('product_shop', 'product_shop', '(product_shop.id_product=p.id_product AND product_shop.id_shop = '.(int)$id_shop.')');
    $sql->where('p.`id_product` = '.(int)$id_product);
    if (Combination::isFeatureActive()) {
    $sql->select('IFNULL(product_attribute_shop.id_product_ attribute,0) id_product_attribute, product_attribute_shop.`price` AS attribute_price, product_attribute_shop.default_on');
    $sql->leftJoin('product_attribute_shop', 'product_attribute_shop', '(product_attribute_shop.id_product = p.id_product AND product_attribute_shop.id_shop = '.(int)$id_shop.')');
    } else {
    $sql->select('0 as id_product_attribute');
    }
    $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
    if (is_array($res) && count($res)) {
    foreach ($res as $row) {
    $array_tmp = array(
    'price' => $row['price'],
    'ecotax' => $row['ecotax'],
    'wholesale_price' => $row['wholesale_price'],
    'attribute_price' => (isset($row['attribute_price']) ? $row['attribute_price'] : null)
    );
    self::$_pricesLevel2[$cache_id_2][(int)$row['id_product_attribute']] = $array_tmp;
    if (isset($row['default_on']) && $row['default_on'] == 1) {
    self::$_pricesLevel2[$cache_id_2][0] = $array_tmp;
    }
    }
    }
    }
    if (!isset(self::$_pricesLevel2[$cache_id_2][(int)$id_product_attribute])) {
    return;
    }
    $result = self::$_pricesLevel2[$cache_id_2][(int)$id_product_attribute];
    if (!$specific_price || $specific_price['price'] < 0) {
    $price = (float)$result['price'];
    } else {
    $price = (float)$specific_price['price'];
    }
    if (!$specific_price || !($specific_price['price'] >= 0 && $specific_price['id_currency'])) {
    $price = Tools::convertPrice($price, $id_currency);
    if (isset($specific_price['price']) && $specific_price['price'] >= 0) {
    $specific_price['price'] = $price;
    }
    }
    $wholesale_price_without_taxes = (float)$result['wholesale_price'];
    if (is_array($result) && (!$specific_price || !$specific_price['id_product_attribute'] || $specific_price['price'] < 0)) {
    $attribute_price = Tools::convertPrice($result['attribute_price'] !== null ? (float)$result['attribute_price'] : 0, $id_currency);
    if ($id_product_attribute !== false) {
    $price += $attribute_price;
    $wholesale_price_without_taxes += $attribute_price;
    }
    }
    if ((int)$id_customization) {
    $price += Customization::getCustomizationPrice($id_customiza tion);
    }
    $address->id_country = $id_country;
    $address->id_state = $id_state;
    $address->postcode = $zipcode;
    $tax_manager = TaxManagerFactory::getManager($address, Product::getIdTaxRulesGroupByIdProduct((int)$id_pr oduct, $context));
    $product_tax_calculator = $tax_manager->getTaxCalculator();
    $retail_price_without_taxes = $price;
    $retail_price_with_taxes = $product_tax_calculator->addTaxes($price);
    $wholesale_price_with_taxes = $product_tax_calculator->addTaxes($wholesale_price_without_taxes);
    if ($use_group_reduction) {
    $reduction_from_category = GroupReduction::getValueForProduct($id_product, $id_group);
    if ($reduction_from_category !== false) {
    $group_reduction = $price * (float)$reduction_from_category;
    } else { // apply group reduction if there is no group reduction for this category
    $group_reduction = (($reduc = Group::getReductionByIdGroup($id_group)) != 0) ? ($price * $reduc / 100) : 0;
    }
    }
    $use_group_reduction_override = true;
    if ((isset($configs_without_taxes) and is_array($configs_without_taxes) and count($configs_without_taxes) > 0) || (isset($configs_with_taxes) and is_array($configs_with_taxes) and count($configs_with_taxes))) {
    if (isset($configs_without_taxes) and is_array($configs_without_taxes) and count($configs_without_taxes) > 0) {
    foreach ($configs_without_taxes as $giconfig) {
    if (!empty($specific_price) || $group_reduction) {
    if (!$giconfig['skip_discounts']) {
    $id_gi_config = $giconfig['id_groupinc_configuration'];
    $price = $groupinc->getPriceModified($id_gi_config, $retail_price_with_taxes, $retail_price_without_taxes, $wholesale_price_with_taxes, $wholesale_price_without_taxes);
    $retail_price_without_taxes = $price;
    $wholesale_price_without_taxes = $price;
    }
    } else {
    $id_gi_config = $giconfig['id_groupinc_configuration'];
    $price = $groupinc->getPriceModified($id_gi_config, $retail_price_with_taxes, $retail_price_without_taxes, $wholesale_price_with_taxes, $wholesale_price_without_taxes);
    $retail_price_without_taxes = $price;
    $wholesale_price_without_taxes = $price;
    }
    if ($giconfig['override_discounts']) {
    $use_group_reduction_override = false;
    }
    if ($giconfig['first_condition']) {
    break;
    }
    }
    if ($use_tax) {
    $price = $product_tax_calculator->addTaxes($price);
    }
    }
    if (isset($configs_with_taxes) and is_array($configs_with_taxes) and count($configs_with_taxes) > 0) {
    foreach ($configs_with_taxes as $giconfig) {
    if (!empty($specific_price) || $group_reduction) {
    if (!$giconfig['skip_discounts']) {
    $id_gi_config = $giconfig['id_groupinc_configuration'];
    $price = $groupinc->getPriceModified($id_gi_config, $retail_price_with_taxes, $retail_price_without_taxes, $wholesale_price_with_taxes, $wholesale_price_without_taxes);
    $retail_price_with_taxes = $price;
    $wholesale_price_with_taxes = $price;
    }
    } else {
    $id_gi_config = $giconfig['id_groupinc_configuration'];
    $price = $groupinc->getPriceModified($id_gi_config, $retail_price_with_taxes, $retail_price_without_taxes, $wholesale_price_with_taxes, $wholesale_price_without_taxes);
    $retail_price_with_taxes = $price;
    $wholesale_price_with_taxes = $price;
    }
    if ($giconfig['override_discounts']) {
    $use_group_reduction_override = false;
    }
    if ($giconfig['first_condition']) {
    break;
    }
    }
    if (!$use_tax) {
    $price = $product_tax_calculator->removeTaxes($price);
    }
    }
    } else {
    if ($use_tax) {
    $price = $product_tax_calculator->addTaxes($price);
    }
    }
    if (($result['ecotax'] || isset($result['attribute_ecotax'])) && $with_ecotax) {
    $ecotax = $result['ecotax'];
    if (isset($result['attribute_ecotax']) && $result['attribute_ecotax'] > 0) {
    $ecotax = $result['attribute_ecotax'];
    }
    if ($id_currency) {
    $ecotax = Tools::convertPrice($ecotax, $id_currency);
    }
    if ($use_tax) {
    $tax_manager = TaxManagerFactory::getManager(
    $address,
    (int)Configuration::get('PS_ECOTAX_TAX_RULES_GROUP _ID')
    );
    $ecotax_tax_calculator = $tax_manager->getTaxCalculator();
    $price += $ecotax_tax_calculator->addTaxes($ecotax);
    $wholesale_price_with_taxes += $ecotax_tax_calculator->addTaxes($ecotax);
    } else {
    $price += $ecotax;
    $wholesale_price_with_taxes += $ecotax;
    }
    }
    $apply_taxes_after = false;
    $price_to_apply = -1;
    if (isset($configs_with_discounts) and is_array($configs_with_discounts) and count($configs_with_discounts) > 0) {
    foreach ($configs_with_discounts as $giconfig) {
    if ($giconfig['price_calculation'] == 0) {
    $price = $wholesale_price_without_taxes;
    }
    if ($giconfig['price_calculation'] == 1) {
    $price = $retail_price_without_taxes;
    }
    if ($giconfig['price_calculation'] == 2) {
    $price = $wholesale_price_with_taxes;
    }
    if ($giconfig['price_calculation'] == 3) {
    $price = $retail_price_with_taxes;
    }
    if ($giconfig['price_application'] == 0) {
    $price_to_apply = $wholesale_price_without_taxes;
    $apply_taxes_after = true;
    }
    if ($giconfig['price_application'] == 1) {
    $price_to_apply = $retail_price_without_taxes;
    $apply_taxes_after = true;
    }
    if ($giconfig['price_application'] == 2) {
    $price_to_apply = $wholesale_price_with_taxes;
    }
    if ($giconfig['price_application'] == 3) {
    $price_to_apply = $retail_price_with_taxes;
    }
    break;
    }
    }
    $specific_price_reduction = 0;
    if (($only_reduc || $use_reduc) && $specific_price) {
    if ($specific_price['reduction_type'] == 'amount') {
    $reduction_amount = $specific_price['reduction'];
    if (!$specific_price['id_currency']) {
    $reduction_amount = Tools::convertPrice($reduction_amount, $id_currency);
    }
    $specific_price_reduction = $reduction_amount;
    if (!$use_tax && $specific_price['reduction_tax']) {
    $specific_price_reduction = $product_tax_calculator->removeTaxes($specific_price_reduction);
    }
    if ($use_tax && !$specific_price['reduction_tax']) {
    $specific_price_reduction = $product_tax_calculator->addTaxes($specific_price_reduction);
    }
    } else {
    $specific_price_reduction = $price * $specific_price['reduction'];
    }
    }
    if ($price_to_apply > -1) {
    $price_to_apply -= $specific_price_reduction;
    $price = $price_to_apply;
    } else{
    $price -= $specific_price_reduction;
    }
    $override_discounts = false;
    if (isset($configs_with_discounts) and is_array($configs_with_discounts) and count($configs_with_discounts) > 0) {
    if ($configs_with_discounts[0]['override_discounts'] == 1) {
    $override_discounts = true;
    }
    if ($use_tax and $apply_taxes_after) {
    $price = $product_tax_calculator->addTaxes($price);
    }
    }
    if ($use_group_reduction && $use_group_reduction_override) {
    $reduction_from_category = GroupReduction::getValueForProduct($id_product, $id_group);
    if ($reduction_from_category !== false) {
    $group_reduction = $price * (float)$reduction_from_category;
    } else { // apply group reduction if there is no group reduction for this category
    $group_reduction = (($reduc = Group::getReductionByIdGroup($id_group)) != 0) ? ($price * $reduc / 100) : 0;
    }
    $price -= $group_reduction;
    }
    if ($only_reduc) {
    return Tools::ps_round($specific_price_reduction, $decimals);
    }
    $price = Tools::ps_round($price, $decimals);
    if ($price < 0) {
    $price = 0;
    }
    self::$_prices[$cache_id] = $price;
    return self::$_prices[$cache_id];
    }
    Naposledy upravil BuzekJirka : 02.08.2018 v 16:27

  2. Co se právě děje na Webtrhu?
Hostujeme u Server powered by TELE3