• Priority: 0
  • Status: Closed
  • Theme: Alysum
  • Assigned To: Fred
  • Private: No
  • Open Date: 31.05.23, 02:23
  • Opened by: Caleb Coffie
  • Closed by: Anonymous Submitter
  • Closed on:
  • Reason: Not a bug

Ticket #24723 - The Product Tabs Module is giving 500 Errors

Whenever I enable a product tab, I get the following error on my admin product pages:

Twig\Error\RuntimeError:
An exception has been thrown during the rendering of a template ("Warning: Uninitialized string offset 1").

  at src/PrestaShopBundle/Resources/views/Admin/Product/ProductPage/product.html.twig:32
  at Twig\Template->displayBlock()
     (var/cache/dev/twig/6e/6e9db138d72f7a6bde88b78b98b10e0f.php:3115)
  at __TwigTemplate_2fbd020a61de5d2a1eb9880f9a526fea->doDisplay()
     (vendor/twig/twig/src/Template.php:394)
  at Twig\Template->displayWithErrorHandling()
     (vendor/twig/twig/src/Template.php:367)
  at Twig\Template->display()
     (vendor/twig/twig/src/TemplateWrapper.php:47)
  at Twig\TemplateWrapper->display()
     (var/cache/dev/twig/8c/8cd94e56f97a978581135b92bb0f2d77.php:63)
  at __TwigTemplate_c21fec1586fe3ef5ed1b56a186b034e8->doDisplay()
     (vendor/twig/twig/src/Template.php:394)
  at Twig\Template->displayWithErrorHandling()
     (vendor/twig/twig/src/Template.php:367)
  at Twig\Template->display()
     (var/cache/dev/twig/2a/2a1270b745e95f7c26abd6aa6d567596.php:68)
  at __TwigTemplate_768a6ec3f179f772924c11db07f5ea7c->doDisplay()
     (vendor/twig/twig/src/Template.php:394)
  at Twig\Template->displayWithErrorHandling()
     (vendor/twig/twig/src/Template.php:367)
  at Twig\Template->display()
     (vendor/twig/twig/src/Template.php:379)
  at Twig\Template->render()
     (vendor/twig/twig/src/TemplateWrapper.php:40)
  at Twig\TemplateWrapper->render()
     (vendor/twig/twig/src/Environment.php:277)
  at Twig\Environment->render()
     (vendor/sensio/framework-extra-bundle/src/EventListener/TemplateListener.php:115)
  at Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener->onKernelView()
     (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php:126)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:264)
  at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch()
     (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:239)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:73)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php:168)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:174)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:81)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:201)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (admin816nzsw7qdrdv3nk9es/index.php:81)     

Comments

Fred 31 May 2023, 21:28

Hi, Caleb Coffie.
Please update credentials in your profile https://support.promokit.eu/myprofile to access to your FTP Server

And back office link is also wrong

Caleb Coffie 31 May 2023, 21:31

Oh sorry. The domain is now new.thecoffiecutters.com. Everything else should be the same.

Fred 31 May 2023, 22:19

Still not able to connect to your FTP

Status:      	Connected to 193.29.63.134
Error:         	FATAL ERROR: Received unexpected end-of-file from SFTP server
Error:         	Could not connect to server
Caleb Coffie 31 May 2023, 22:44

Hmm… I’m not sure what’s going on with ftps. If you’re able to use sftp, That should work with the same credentials.

Fred 31 May 2023, 22:52

I have tried all options.
Try to upload this fixed file into the folder

/modules/pkextproduct/views/templates/admin/form

Attachments:

Caleb Coffie 31 May 2023, 22:59

I swapped in the file and now I’m getting the following error:

Twig\Error\
RuntimeError
in src/PrestaShopBundle/Resources/views/Admin/Product/ProductPage/product.html.twig (line 32)
{% block stylesheets %}  <link rel="stylesheet" href="{{ asset('themes/new-theme/public/product' ~ rtl_suffix ~ '.css') }}" type="text/css" media="all">{% endblock %}{% block content %}  {% set hooks = renderhooksarray('displayAdminProductsExtra', { 'id_product': id_product }) %}  <div class="header-toolbar d-print-none">    {{ multistoreHeader() }}  </div>  <form name="form" id="form" method="post" class="form-horizontal product-page row justify-content-md-center" novalidate="novalidate">
Fred 02 Jun 2023, 17:24

Sorry for the delay.
Ok, I just logged in to your back office, but I can’t find where is thew issue? The module product tab is enabled

Caleb Coffie 02 Jun 2023, 17:50

It happens when you enable one of the product tabs from the product tabs extension page. I disabled them so we can have a working shop.

Fred 03 Jun 2023, 10:12

Ok, I see.
I don’t have permissions to update files, so please try yourself

/modules/pkproducttabs/views/templates/admin

Attachments:

product.tpl (4.5 KiB)
Caleb Coffie 05 Jun 2023, 01:54

That seemed to fix it but now to page seems pretty slow and the tab becomes unresponsive at times.

Fred 05 Jun 2023, 09:06

I’m not sure it’s related somehow. I just fix small syntax error there.
Try to clear cache and reload page a couple of times to refresh it