Dan Gavrila Posted May 1, 2023 Share Posted May 1, 2023 (edited) I have this error, Prestashop v. 8.0.4, PHP 7.4, when I try to edit an product in backend I have "500 Internal Server Error" Thank you very much for your help! Edited May 1, 2023 by Dan Gavrila (see edit history) Link to comment Share on other sites More sharing options...
Dan Gavrila Posted May 2, 2023 Author Share Posted May 2, 2023 I really need your help here! Can someone help me please? Link to comment Share on other sites More sharing options...
ComGrafPL Posted May 2, 2023 Share Posted May 2, 2023 Hello, Debug show more issues? Is it only on one, specific product? Any changes / updates before issue? Have you tried to switch to PHP 8? ( as it is recommended for PS 1.8+ ) Link to comment Share on other sites More sharing options...
Dan Gavrila Posted May 2, 2023 Author Share Posted May 2, 2023 18 minutes ago, ComGrafPL said: Hello, Debug show more issues? Is it only on one, specific product? Any changes / updates before issue? Have you tried to switch to PHP 8? ( as it is recommended for PS 1.8+ ) Hello, Thank you for your reply. This is the only one, and if I create a new product it works. I'll try to switch to php 8. Link to comment Share on other sites More sharing options...
Dan Gavrila Posted May 2, 2023 Author Share Posted May 2, 2023 23 minutes ago, ComGrafPL said: Hello, Debug show more issues? Is it only on one, specific product? Any changes / updates before issue? Have you tried to switch to PHP 8? ( as it is recommended for PS 1.8+ ) I updated to php 8.2, nothing changed. If I duplicate the product is working, I attached prod.log to see the errors. prod.log Link to comment Share on other sites More sharing options...
TiaNex Shopping Posted May 2, 2023 Share Posted May 2, 2023 maybe you can try to modify the parameter to be optional or have a default value, i don't have a prestashp instance, now, public function __construct( string $isbn ='', string $upc='', string $ean13='', string $mpn='', string $reference='', ) Link to comment Share on other sites More sharing options...
Dan Gavrila Posted May 2, 2023 Author Share Posted May 2, 2023 4 hours ago, TiaNex Shopping said: maybe you can try to modify the parameter to be optional or have a default value, i don't have a prestashp instance, now, public function __construct( string $isbn ='', string $upc='', string $ean13='', string $mpn='', string $reference='', ) It worked! Thanks a lot! This is the final code: declare(strict_types=1); namespace PrestaShop\PrestaShop\Core\Domain\Product\QueryResult; /** * Holds product details */ class ProductDetails { /** * @var string|null */ private $isbn; /** * @var string|null */ private $upc; /** * @var string|null */ private $ean13; /** * @var string|null */ private $mpn; /** * @var string|null */ private $reference; /** * @param string|null $isbn * @param string|null $upc * @param string|null $ean13 * @param string|null $mpn * @param string|null $reference */ public function __construct( ?string $isbn = null, ?string $upc = null, ?string $ean13 = null, ?string $mpn = null, ?string $reference = null ) { $this->isbn = $isbn; $this->upc = $upc; $this->ean13 = $ean13; $this->mpn = $mpn; $this->reference = $reference; } /** * @return string|null */ public function getIsbn(): ?string { return $this->isbn; } /** * @return string|null */ public function getUpc(): ?string { return $this->upc; } /** * @return string|null */ public function getEan13(): ?string { return $this->ean13; } /** * @return string|null */ public function getMpn(): ?string { return $this->mpn; } /** * @return string|null */ public function getReference(): ?string { return $this->reference; } } Link to comment Share on other sites More sharing options...
TiaNex Shopping Posted May 3, 2023 Share Posted May 3, 2023 ok, you are welcome Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now