Okay
  Public Ticket #2040534
New York Theme - Faceted Search Error "Uncaught RuntimeException: Trying to unset the index id of the LazyArray"
Closed

Comments

  • Stefano started the conversation

    Hi,

    I have New York Theme installed on my website with Prestashop 1.7.5.2, since the last updates of the faceted search module (the last is 3.0.3) the filters doesn't work.


    In Chrome Dev Tools I receive error 500 and in the error_log_php the error is:
    PHP Fatal error:  Uncaught RuntimeException: Trying to unset the index id of the LazyArray PrestaShopPrestaShopAdapterPresenterProductProductListingLazyArray already defined by a method is not allowed in /home/public_html/src/Adapter/Presenter/AbstractLazyArray.php:370

    Stack trace:
    #0 /home/public_html/override/classes/controller/ProductListingFrontController.php(20): PrestaShopPrestaShopAdapterPresenterAbstractLazyArray->offsetUnset('id')
    #1 /home/public_html/classes/controller/ProductListingFrontController.php(506): ProductListingFrontController->prepareProductArrayForAjaxReturn(Array)
    #2 /home/public_html/controllers/front/listing/CategoryController.php(159): ProductListingFrontControllerCore->getAjaxProductSearchVariables()
    #3 /home/public_html/classes/controller/ProductListingFrontController.php(541): CategoryControllerCore->getAjaxProductSearchVariables()
    #4 /home/public_html/controllers/front/listing/CategoryController.php(137): ProductListingFrontController in /home/public_html/src/Adapter/Presenter/AbstractLazyArray.php on line 370


    I tried to edit the file override/classes/controller/ProductListingFrontController.php commenting line 20 where it's the unset function and it worked, but I don't know if it's the correct solution

  •  1,588
    Criss replied

    Hi Stefano

    We're sorry for our late reply because we had 2 weekend days off.

    Please provide us FTP credentials and Back Office access of your site.

    We will handle the problem to help you.

    Best Regards,
    Criss - FieldThemes

  • Zsolt replied

    I have identical problem!


  • Zsolt replied

    2019/06/15 09:29:12 [error] 1305#1305: *8990 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught RuntimeException: Trying to unset the index id of the LazyArray PrestaShop\PrestaShop\Adapter\Presenter\Product\ProductListingLazyArray already defined by a method is not allowed in /srv/www/SITE/src/Adapter/Presenter/AbstractLazyArray.php:370
    Stack trace:
    #0 /srv/www/SITE/override/classes/controller/ProductListingFrontController.php(20): PrestaShop\PrestaShop\Adapter\Presenter\AbstractLazyArray->offsetUnset('id')
    #1 /srv/www/SITE/classes/controller/ProductListingFrontController.php(506): ProductListingFrontController->prepareProductArrayForAjaxReturn(Array)
    #2 /srv/www/SITE/controllers/front/listing/CategoryController.php(159): ProductListingFrontControllerCore->getAjaxProductSearchVariables()
    #3 /srv/www/SITE/classes/controller/ProductListingFrontController.php(541): CategoryControllerCore->getAjaxProductSearchVariables()

  •  1,588
    Criss replied

    Hi Zsolt

    We're sorry for our late reply because we had 2 weekend days off.

    You uninstall modules and install my new modules under the attached file.

    Best Regards,
    Criss - FieldThemes

  • Zsolt replied

    Hello, 

    Attached file is not a module it is an TPL file only. I have changed this file in module, but it not solve the problem.

    Thank You

  •  1,588
    Criss replied

    Hi Zsolt

    Sorry the mistake from me. 

    I resend you modules for you to reinstall.

    Best Regards,
    Criss - FieldThemes