Jump to content
thirty bees forum

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


Recommended Posts

Posted

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

Posted
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 [email protected] so we can send you a copy immediately.
14:*
15:* DISCLAIMER
16:*
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.
20:*
21:*  @author PrestaShop SA <[email protected]>
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
25:*/
26:
27:if (!defined('_PS_VERSION_'))
28:	exit;
29:
30:class GridHtml extends ModuleGridEngine
31:{
32:	private $_values;
33:	private static $_columns;
34:
35:	function __construct($type = null)
36:	{
37:		if ($type != null)
38:			parent::__construct($type);
39:		else
40:		{
Posted

There is a module with that name, has somesting to do with statistics. But I cant deactivate it to test when I cant access the module page and I cant see it in the module list in the db

Posted

Looks to me like you have uploaded gridhtml folder in some way. I don't have this module. On github it's archived. 

I would just backup this folder and then delete it. I would expect it to work afterwards.

Posted

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

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...