In breakpoints.admin.inc, $form['base_name'] is set to have a size of 64 characters (line 640). The breakpoints_add_style_form_submit function sets the $new_style value to be a concatenation of base_name and the $breakpoint values.
Here is an example that causes a problem:
- Image style base name: customer_image-scale- (21 characters)
- Breakpoint name: breakpoints_theme_newtheme_smalltouch_landscape_1x (51 characters)
In this situation, the full length of the image style machine name generated by the Breakpoints module is 72 characters. This doesn't cause a problem when creating the image style, because the database supports up to 255 characters in the name field of the image_styles table.
However, as soon as I attempt to edit one of the Breakpoints-generated image styles and add a new image effect, I get the following error message:
Machine-readable name cannot be longer than 64 characters but is currently 72 characters long.
The "machine-readable name" field in image styles has a max character length of 64. The name created by Breakpoints is longer than this and is not supported.
To avoid this error, the breakpoints_add_style_form_validate function needs to check if any of the $new_style values is greater than 64 characters. If it is, the add_style process should display an error.
Comments
Comment #1
sgdev commentedAlso worth mentioning for anyone who encounters this issue...
If you need to modify the machine-readable name in image styles to make it less than 64 characters, it will break the connection between the image styles and groups in the Picture module configuration (/admin/config/media/picture). These will need to be reset to allow the responsive images to work again.
Comment #2
attiks commentedComment #3
jelle_sFixed in the latest dev version.