PrestaShop / PrestaShop

PrestaShop is the universal open-source software platform to build your e-commerce solution.
https://www.prestashop-project.org/
Other
8.2k stars 4.81k forks source link

Can't delete product item or product image #12029

Closed rafaviana closed 5 years ago

rafaviana commented 5 years ago

After the update to 1.7.5.0 it's not possible to do some tasks, for example: remove a product item or remove an image from a product. Check image attached to see the error I get

Anyone can help with this?

pastedgraphic-2
khouloudbelguith commented 5 years ago

Hi @rafaviana,

Could you please provide us with more info? We need more details to understand how we can reproduce your issue:

Don't you know how to get this information? Please read the following article: http://build.prestashop.com/howtos/misc/how-to-create-bug-report/

Thanks!

rafaviana commented 5 years ago

@khouloudbelguith here are some more info, I hope it can help

screen shot 2019-01-04 at 2 35 09 pm

I don't know which path I can find the PHP log related with this issue… I'm sending the one there is in the root folder error_log.txt server log.txt

Debug from catalog page: notice undefined index manufacturer_rule 500 internal server error

Debug from product page: notice undefined index manufacturer_rule 500 internal server error 1

Prestashop version: 1.7.5.0

Thanks!

khouloudbelguith commented 5 years ago

@rafaviana, you have problems with the configurator module. Thanks to disable it, try to clear cache manually by deleting all the folder into var/cache (prod & dev). Thanks to check and feedback!

rafaviana commented 5 years ago

@khouloudbelguith configurator module is disabled and I clear the cache as you suggested but it's still not working. I forgot to mention this error in browser console:

Uncaught ReferenceError: $ is not defined
    at override-autocomplete.js:165
    at override-autocomplete.js:61
khouloudbelguith commented 5 years ago

@rafaviana, could you please check in your folder path if you have any overrides(controller/classes/modules..) which are not compatible with PS1.7.5. You can find in the /ProjectFolder/overrides/ Thanks!

rafaviana commented 5 years ago

@khouloudbelguith that it very hard for me to know, I don't have enough knowledge of PHP to check that :/

khouloudbelguith commented 5 years ago

@rafaviana, in your ProjectFolder, you can check if you have any new overrides created. https://github.com/PrestaShop/PrestaShop/tree/develop/override/classes ( => by default) https://github.com/PrestaShop/PrestaShop/tree/develop/override/controllers ( => by default) https://github.com/PrestaShop/PrestaShop/tree/develop/override/modules ( => by default)

Thanks!

rafaviana commented 5 years ago

So I asked the developer of configurator module and he fix something related with the module. There are no PHP errors right now.

But the fact that I can't delete an image is still there… I will share a video to help understand the issue AwesomeScreenshot-2019-01-04T17-18-47-063Z.webm.zip

In the video it's not possible to see but I was with the browser inspector opened and when I click "remove" a class "modal-open" is added to the body and the console is empty

rafaviana commented 5 years ago

Debug mode for product page: notice undefined index manufacturer_rule 500 internal server error 2

notice undefined index manufacturer_rule 500 internal server error 3

khouloudbelguith commented 5 years ago

Hi @rafaviana,

For this product, have you any manufacture assigned for this product, you can find it in the Product details => Options Tab, on the bottom page? you have this error "undefined index: manufacturer_rule", have you any module related to this error? Thanks!

rafaviana commented 5 years ago

Hi @khouloudbelguith There's no manufacture on that page… I can't figure out what's wrong with this PS installation :/

rafaviana commented 5 years ago

So, let's keep things organized. I'm sorry for all the messages.

The problem is: I have some products to delete and I can't do it. When I click to delete the product prestashop freezes, I'm forced to refresh the page. I have the following error in the browser console:

Uncaught Error: Syntax error, unrecognized expression: [here goes product descritption]
    at Function.t.error (main.bundle.js:formatted:40355)
    at t.tokenize (main.bundle.js:formatted:40679)
    at t.select (main.bundle.js:formatted:40696)
    at Function.t [as find] (main.bundle.js:formatted:39917)
    at De.fn.init.find (main.bundle.js:formatted:40793)
    at new De.fn.init (main.bundle.js:formatted:40814)
    at De (main.bundle.js:formatted:39733)
    at i (main.bundle.js:formatted:51902)
    at e.value (main.bundle.js:formatted:51914)
    at new e (main.bundle.js:formatted:51890)

This error is only visible in the pages I can't delete

khouloudbelguith commented 5 years ago

@rafaviana, those products which you can not delete them, are they created manually or imported by csv file? Have you tried to do the same action when debug mode is enabled? is there any exception displayed? Thanks!

rafaviana commented 5 years ago

@khouloudbelguith I created the products manually When I tried to enable debug mode I can't open any page, I got this error: screen shot 2019-01-23 at 11 30 44 am

I need to solve that issue first, I think…

Thanks!

rafaviana commented 5 years ago

Error log from admin folder:

[23-Jan-2019 11:35:02 Europe/Lisbon] PHP Fatal error:  Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Cannot use object of type Symfony\Component\HttpFoundation\ParameterBag as array in /home/temosonline/public_html/src/Adapter/Security/Admin.php:91
Stack trace:
#0 /home/temosonline/public_html/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php(111): PrestaShop\PrestaShop\Adapter\Security\Admin->onKernelRequest(Object(Symfony\Component\HttpKernel\Event\GetResponseEvent), 'kernel.request', Object(Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher))
#1 /home/temosonline/public_html/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php(212): Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(Object(Symfony\Component\HttpKernel\Event\GetResponseEvent), 'kernel.request', Object(Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher))
#2 /home/temosonline/public_html/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php(44): Symfon in /home/temosonline/public_html/src/Adapter/Security/Admin.php on line 91
[23-Jan-2019 11:38:03 Europe/Lisbon] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/temosonline/public_html/modules/jscomposer/include/classes/shortcodes/vc-row.php on line 61
khouloudbelguith commented 5 years ago

@rafaviana, as I expected before you have an override which not compatible, it is not a PrestaShop core. You need to navigate to your Project_Folder/override/classes/ => you will find an override of the Dispatcher.php class. image

By default, doesn't exist https://github.com/PrestaShop/PrestaShop/tree/develop/override/classes, you should remove it.

Despite our several trials, we could not reproduce your issue with the provided information. It seems that your issue is not a PrestaShop's core bug but most likely a customization problem. Thanks!!

RajatYadavIndia commented 3 years ago

Disable Advanced Stock Managment for the Product or set the stock to zero.