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

Bundle field should be longer #191

Open
oriolroger opened this issue Aug 13, 2024 · 2 comments
Open

Bundle field should be longer #191

oriolroger opened this issue Aug 13, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@oriolroger
Copy link

oriolroger commented Aug 13, 2024

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!

@yorkshire-pudding yorkshire-pudding added the enhancement New feature or request label Aug 13, 2024
@yorkshire-pudding
Copy link
Contributor

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
chrome_Mynikluyao

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.

@laryn
Copy link
Member

laryn commented Aug 16, 2024

@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:

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

No branches or pull requests

3 participants