Jump to content
thirty bees forum

Access level to GridHtml::$_values must be protected (as in class ModuleGridEngine) or weaker


Recommended Posts

This suddenly show up when I after dinner came back to computer and should go on translating a module.

I can go everywhere in Backoffice but when I try to go to Modules I get a 500 error.

I attach the decrypted error message

TB say version 1.5 but I have installed 1.4 what I remember

Any input velcome

Skärmbild från 2023-01-25 17-52-38.png

Link to comment
Share on other sites

Fatal Error

Access level to GridHtml::$_values must be protected (as in class ModuleGridEngine) or weaker

in file /home/jv80/public_html/modules/gridhtml/gridhtml.php at line 30

Source file: /home/jv80/public_html/modules/gridhtml/gridhtml.php

11:* If you did not receive a copy of the license and are unable to
12:* obtain it through the world-wide-web, please send an email
13:* to license@prestashop.com so we can send you a copy immediately.
17:* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
18:* versions in the future. If you wish to customize PrestaShop for your
19:* needs please refer to http://www.prestashop.com for more information.
21:*  @author PrestaShop SA <contact@prestashop.com>
22:*  @copyright  2007-2015 PrestaShop SA
23:*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
24:*  International Registered Trademark & Property of PrestaShop SA
27:if (!defined('_PS_VERSION_'))
28:	exit;
30:class GridHtml extends ModuleGridEngine
32:	private $_values;
33:	private static $_columns;
35:	function __construct($type = null)
36:	{
37:		if ($type != null)
38:			parent::__construct($type);
39:		else
40:		{
Link to comment
Share on other sites

gridhtml module is not compatible with thirty bees since version 1.0.4 - its functionality was merged into core. 

This module was probably uninstalled in the past, but was still present on filesystem in /modules/ directory.

Unfortunately, thirty bees sometimes have to load and instantiate even non-installed modules.

For example, when module's config.xml file is missing, or if language-specific version of this xml file is missing (config_cs.xml, config_nl.xml,....). This config.xml file is sort of a cache that contains basic information about module (name, description, author).  When you open Modules page in admin, system opens all these config.xml files in order to display information about modules that are available on your system. If config file is missing in module directory, system have to instantiate the module and extract info from module instance properties.

This is very stupid approach, and also very dangerous. Because it actually loads module main php file, and executes any executable code. The code may be malicious. In this case, the main module file contains class that can no longer be instantiated. Thus the exception. And it's also explains why store owner didn't encounter the issue -- they may use different language than you do. 

We know and track this issue. However, it's very hard to fix. The alternative is static analysis of module main php file during runtime. That is very, very complicated.

  • Thanks 2
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...