Url field is too small
Permalink Browser Info Environment
The "Url" type generated a db.xml entry with ['type' => 'C', 'size' => 255]. But Url are supported in all browsers up to 2000 characters and the norm allows for 8kb URL. So there is an error message when the editors attempt to add a long Url :
SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'link_url' at row 1
SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'link_url' at row 1
Type: | Ticket |
---|---|
Status: | Resolved |
Hi, I tried to add a Url field, but it causes SQL error.
The type C doesn't allow more than 255 characters.
Please change it to type X.
The type C doesn't allow more than 255 characters.
Please change it to type X.
$fields = [ [ 'name' => $field->getSlug(), - 'type' => 'C', + 'type' => 'X', 'size' => 2000, ], ];
Hi there,
Thanks for pointing this out. I changed the type to the aforementioned type and it should be good to go now. The new version is ready for download.
Let me know if this fixed it for you!
Kind regards
Ramon
Thanks for pointing this out. I changed the type to the aforementioned type and it should be good to go now. The new version is ready for download.
Let me know if this fixed it for you!
Kind regards
Ramon
I've just updated the Add-On. The new version 1.2.2 should give you the 2000 maximum characters now. Can you confirm after updating your Add-On and Block Type?
Kind regards,
Ramon