On my system, if I add multiple values to "limit" field of custom field edit form ( /admin/structure/ds/fields/manage_custom/field_name ) like:
article|*
blog|*
then the field won't show for "article" content type.
I believe the issue is that when I add new line from my Windows machine in input field, I add \r\n - and the code only "explodes" based on \n character, so \r stays on the end of first line.

Adding trim() fixes this - patch attached in comment.

Comments

lklimek’s picture

Title: Multiple values in "limit" field of custom code fields don't work properly » Multiple values in "limit" field of custom code fields doesn't work properly
StatusFileSize
new550 bytes

Attached patch against 7.x-2.0 (but based on source code the issue is also the same in 7.x-2. branch)

swentel’s picture

Hmm, there was already patch over at #1823400: Limit field (ui_limit) not parsed correctly regarding this, so that didn't fix it completely ?

Also, make sure comment chars don't exceed over 80.

swentel’s picture

Version: 7.x-2.0 » 8.x-2.x-dev

Ok, makes sense anyway, committed and pushed, thanks! Moving to 8.x-2.x

swentel’s picture

Status: Active » Closed (fixed)

Committed to 8.x branch