You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, we're getting some errors when creating a paragraph with a long machine name. The error we get is: PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'bundle' at row 1: INSERT INTO {paragraphs_item}
Currently, the fields "bundle" and "field_name" in the "paragraphs_item" database table are defined as Varchar(32), but we've seen that in most of the tables the "bundle" field is at least Varchar(128), and even 255 long in some tables (like "relation_bundles").
We're adding a patch in our site, on the function paragraphs_schema(), but we wonder if this should be something to be fixed in this module.
Thanks!
The text was updated successfully, but these errors were encountered:
I'm fairly sure that field is right. As in core, if you try to add a field machine name longer than 32 it won't let you
I also get exactly the same result for the bundle field in creating a new paragraph so it looks like this is by design as the form there is limited to 32. How did you get that error? Did you create the paragraph type programmatically and then add a paragraph of that type?
If there is a genuine need for some paragraph types to have a longer bundle name, then there probably needs to be a documented use case/user story.
@oriolroger Can you provide a bit more context and some of the examples you mention? In referring to the node module in core, I see that the schema for type is 32:
Hi, we're getting some errors when creating a paragraph with a long machine name. The error we get is:
PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'bundle' at row 1: INSERT INTO {paragraphs_item}
Currently, the fields "bundle" and "field_name" in the "paragraphs_item" database table are defined as Varchar(32), but we've seen that in most of the tables the "bundle" field is at least Varchar(128), and even 255 long in some tables (like "relation_bundles").
We're adding a patch in our site, on the
function paragraphs_schema()
, but we wonder if this should be something to be fixed in this module.Thanks!
The text was updated successfully, but these errors were encountered: