Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

max length bug core_config_data #102

Open
EFvS opened this issue Aug 16, 2023 · 2 comments
Open

max length bug core_config_data #102

EFvS opened this issue Aug 16, 2023 · 2 comments

Comments

@EFvS
Copy link

EFvS commented Aug 16, 2023

In the system.log file, I see the following error:

[2023-08-02T18:16:34.803839+00:00] main.ERROR: {"error":"Attempt to assign property \"B00125009\" on null","description":"Unable to handle response from invitations API","platform":"Magento2","version":"2.6.580","method":"handleSingleResponse","variables":{"storeId":1}} [] []

When I navigate to "Stores > Configuration > Trustpilot > General" I encounter the following exception:

1 exception(s): Exception #0 (Exception): Warning: foreach() argument must be of type array|object, null given in /var/www/src/vendor/trustpilot/module-reviews/Helper/PastOrders.php on line 147 Exception 
#0 (Exception): Warning: foreach() argument must be of type array|object, null given in /var/www/src/vendor/trustpilot/module-reviews/Helper/PastOrders.php on line 147 <pre>
#1 Trustpilot\Reviews\Helper\PastOrders->getPastOrdersInfo() called at [vendor/trustpilot/module-reviews/Block/System/Config/Admin.php:66] 
#2 Trustpilot\Reviews\Block\System\Config\Admin->getPastOrdersInfo()

This issue arises because the value for trustpilot/trustpilot_general_group/failed_orders is stored in core_config_data and the value exceeds the limit of a text field. The maximum value for a text field in MySQL is 65535 (2^16 - 1) characters.

A more effective solution would involve saving the value in a new table using mediumtext or longtext data types, which can accommodate larger amounts of text.

Can you please fix this?

@pixiejohn
Copy link

pixiejohn commented Sep 28, 2023

This is also a problem for one of our clients sites.
Ive had to fix the truncated json data just so we can load the config page again.
This has obviously resulted in data loss and i suppose its going to happen again in the future.

Please can someone have a look at this with some urgency?

@stefanskotte
Copy link

This module is pretty much a trainwreck. Installed on Magento 2.4.5-p1, just times out when loading the website/storeview scoped settings page.

I also find the whole approach half-assed by just including iframes from trustpilot's own system directly into the magento backend.

Will advice my customer to skip this completely. The observer that gets hit when saving (any order - not checking if the module is enabled) is also deprecated and generally discouraged to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants