Skip to content

max length bug core_config_data #102

@EFvS

Description

@EFvS

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions