When I used it in my site i got this error:

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'logpath' at row 1: INSERT INTO {events_logging} (uuid, langcode, user_id, name, status, created, changed, type, operation, logpath, ref_numeric, description, info, ip, ref_title) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13, :db_insert_placeholder_14); Array ( [:db_insert_placeholder_0] => 5221d836-0d24-4b7c-af7a-49709cd5affe [:db_insert_placeholder_1] => es [:db_insert_placeholder_2] => 1 [:db_insert_placeholder_3] => [:db_insert_placeholder_4] => 1 [:db_insert_placeholder_5] => 1580932126 [:db_insert_placeholder_6] => 1580932126 [:db_insert_placeholder_7] => block_content_insert [:db_insert_placeholder_8] => insert [:db_insert_placeholder_9] => /block/add/container_agenda?destination=/node/1550/layout%23layout_builder/choose/block/overrides/node.1550/1/left_content&path=layout_builder/choose/block/overrides/node.1550/1/left_content&_wrapper_format=drupal_modal&ajax_form=1&_wrapper_format=drupal_ajax [:db_insert_placeholder_10] => 108 [:db_insert_placeholder_11] => user admin (uid 1) performed insert operation on entity Bloque personalizado (id 108) [:db_insert_placeholder_12] => [:db_insert_placeholder_13] => 172.18.0.2 [:db_insert_placeholder_14] => ) en Drupal\Core\Entity\Sql\SqlContentEntityStorage->doSaveFieldItems() (line 973 of /var/www/html/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

and

Errors in saving entity Array ( [type] => Array ( [0] => Array ( [value] => block_content_insert ) ) [operation] => Array ( [0] => Array ( [value] => insert ) ) [logpath] => Array ( [0] => Array ( [value] => /block/add/container_agenda?destination=/node/1550/layout%23layout_builder/choose/block/overrides/node.1550/1/left_content&path=layout_builder/choose/block/overrides/node.1550/1/left_content&_wrapper_format=drupal_modal&ajax_form=1&_wrapper_format=drupal_ajax ) ) [ref_numeric] => Array ( [0] => Array ( [value] => 108 ) ) [name] => Array ( [0] => Array ( [value] => ) ) [description] => Array ( [0] => Array ( [value] => user admin (uid 1) performed insert operation on entity Bloque personalizado (id 108) ) ) [ip] => Array ( [0] => Array ( [value] => 172.18.0.2 ) ) [ref_title] => Array ( [0] => Array ( [value] => ) ) ) : SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'logpath' at row 1: INSERT INTO {events_logging} (uuid, langcode, user_id, name, status, created, changed, type, operation, logpath, ref_numeric, description, info, ip, ref_title) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13, :db_insert_placeholder_14); Array ( [:db_insert_placeholder_0] => 5221d836-0d24-4b7c-af7a-49709cd5affe [:db_insert_placeholder_1] => es [:db_insert_placeholder_2] => 1 [:db_insert_placeholder_3] => [:db_insert_placeholder_4] => 1 [:db_insert_placeholder_5] => 1580932126 [:db_insert_placeholder_6] => 1580932126 [:db_insert_placeholder_7] => block_content_insert [:db_insert_placeholder_8] => insert [:db_insert_placeholder_9] => /block/add/container_agenda?destination=/node/1550/layout%23layout_builder/choose/block/overrides/node.1550/1/left_content&path=layout_builder/choose/block/overrides/node.1550/1/left_content&_wrapper_format=drupal_modal&ajax_form=1&_wrapper_format=drupal_ajax [:db_insert_placeholder_10] => 108 [:db_insert_placeholder_11] => user admin (uid 1) performed insert operation on entity Bloque personalizado (id 108) [:db_insert_placeholder_12] => [:db_insert_placeholder_13] => 172.18.0.2 [:db_insert_placeholder_14] => ) 
CommentFileSizeAuthor
#6 3111465-6.patch1.35 KBrpayanm
#3 3111465-2.patch695 byteseaajithe
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rpayanm created an issue. See original summary.

rpayanm’s picture

Issue summary: View changes
eaajithe’s picture

StatusFileSize
new695 bytes

This patch should solve the issue. It changes the field type of logpath field to text.

gargsuchi’s picture

Status: Active » Needs review
rpayanm’s picture

Issue summary: View changes
rpayanm’s picture

StatusFileSize
new1.35 KB

Thank you @eaajithe this patch works fine for me.

I made it a little bit modifications.
I changed text to blob and set case_sensitive to this field, because we're going to save urls.
I added this change to the entity definition as well.

Please review.

mikat’s picture

The description field could also be a blob.

andrechun’s picture

Version: 8.x-1.4 » 2.0.0-beta1
Status: Needs review » Needs work

Let's also try to update the description field type and apply it to 2.0.x branch

andrechun’s picture

Status: Needs work » Needs review

  • andrechun committed 54630f7f on 2.0.x
    Issue #3111465 by rpayanm, andrechun, eaajithe, gargsuchi, MikaT: Data...
andrechun’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

emircanerkul’s picture

@eaajithe Shouldn't be there any entity update hook for existing entries?

I was trying to update entities and got an error

The SQL storage cannot change the schema for an existing field (logpath in events_logging entity) with data.