Prestashop: Problem displaying products on prestashop 1.7.6

Created on 20 Jul 2019  路  19Comments  路  Source: PrestaShop/PrestaShop

Hello,

Every 7 days, I encountered the same error at log level which is the following error:

AH01071: Got error 'PHP message: PHP Fatal error: Access level to ProductController :: $ quantity_discounts must be protected (as in class ProductControllerCore) or weaker in /htdocs/xxx.com/override/controllers/front/ProductController.php on line 229 \ n ', referer: https://xxx.com/index.php?category_rewrite=our-products&controller=category

renaming the file to ProductController.old and then renaming it back to initial, it no longer has the 500 error.

I do not understand why every 7 days there is the same mistake?

Thanks in advance ,

Regards ,

1.7.6.0 Bug Can't Reproduce Products

All 19 comments

Same here, I changed private to protected and works fine

Same here, I changed private to protected and works fine

hello, I do not order you, you tell me what? thank you in advance, best regards

Hi @jasonchemama,

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

  • server setup and configuration
  • PrestaShop version (source)
  • debug mode report
  • PHP error logs
  • apache error log
  • javascript console log
  • screenshots

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!

Hi @jasonchemama,

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

  • server setup and configuration
  • PrestaShop version (source)
  • debug mode report
  • PHP error logs
  • apache error log
  • javascript console log
  • screenshots

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!

hello, here are the infos
F3E5A1D3-895F-477B-9F5B-E69EB6803CB9
497BE83A-04EC-4E96-B1F0-312B51519092
E65CC8D5-D614-435B-AF80-149B4646F1F0
F23731B4-846C-4F9A-AED5-B647FDD37688

@jasonchemama, you have an override of the Productcontroller.phpwith a fatal error.
image
You check this override is provided by each module & check the issue with module author.
Thanks to check & feedback.

@jasonchemama, you have an override of the Productcontroller.phpwith a fatal error.
image
You check this override is provided by each module & check the issue with module author.
Thanks to check & feedback.

can you see in the file? here is the file: thanks in advance
net2ftp-1563802959.zip

@jasonchemama, I couldn't extract your file.
There was an error with this zip file.
Thanks to check & feedback.

@jasonchemama, I couldn't extract your file.
There was an error with this zip file.
Thanks to check & feedback.

here is line 229
6F8CF78C-0E2F-4D1E-BE20-EF7AF7CE762D

@jasonchemama, this is your file overrode?

Thanks!

@jasonchemama, this is your file overrode?

Thanks!

I do not understand you, what is it? thanks in advance

@jasonchemama, the screenshot provided in your previous comment, is from your override file Productcontroller.php?

Thanks!

@jasonchemama, the screenshot provided in your previous comment, is from your override file Productcontroller.php?

Thanks!

Yes, Thanks

Hey!

If we see the first post the error is

/htdocs/xxx.com/override/controllers/front/ProductController.php

So that override controller has $quantity_discounts (in my case in line 28), I changed
private $quantity_discounts;
to
protected $quantity_discounts;

Can you try to do this?

Regards

Edit: in original file located in controllers / front / ProductController.php that attribute has been declared as protected

Hey!

If we see the first post the error is

/htdocs/xxx.com/override/controllers/front/ProductController.php

So that override controller has $quantity_discounts (in my case in line 28), I changed
private $quantity_discounts;
to
protected $quantity_discounts;

Can you try to do this?

Regards

Edit: in original file located in controllers / front / ProductController.php that attribute has been declared as protected

I can not find line 28 to change.
ADD4D19D-9962-4BC1-AC95-E69629D29838

Regards

Line 28 in /htdocs/xxx.com/override/controllers/front/ProductController.php remember in folder override attribute $quantity_discounts.

Regards

I do not understand you. I'm sorry, I'm a beginner. What do I do with that?

I do not understand you. I'm sorry, I'm a beginner. What do I do with that?

Don't worry, go to /htdocs/xxx.com/override/controllers/front/ProductController.php look for the following line:
private $quantity_discounts
and change it to
protected $quantity_discounts

@jasonchemama,

Your issue is not a PrestaShop's core bug but a customization problem (override/controllers/front/ProductController.php)
I close the issue, feel free to open a new one when needed.

Thanks!

Yes it works, thank you very much

Have a good day
cordially

Was this page helpful?
0 / 5 - 0 ratings