After upgrade from previous version, nodes with nodeblock field can't be saved, because of error:
field_block cannot be longer than 128 characters but is currently 136 characters long.
field_block cannot be longer than 128 characters but is currently 131 characters long.
field_block cannot be longer than 128 characters but is currently 147 characters long.
field_block cannot be longer than 128 characters but is currently 143 characters long.
field_block cannot be longer than 128 characters but is currently 132 characters long.
field_block cannot be longer than 128 characters but is currently 137 characters long.
field_block cannot be longer than 128 characters but is currently 148 characters long.
It's because input field have value logner than maxlength:
input aria-autocomplete="list" autocomplete="OFF" id="edit-field-block-und-0-moddelta" name="field_block[und][0][moddelta]" value="(Nodeblock: Basic page): Megafestival Weekend Festival Baltic taas Pärnu rannas! [nodeblock:6272]" size="60" maxlength="128" class="form-text form-autocomplete" type="text"
How to fix this?
Comments
Comment #2
Johnny vd Laar commentedWhat module provides this field because nodeblock doesn't have a "moddelta" field?
I assume that it is blockreference module. It is not an error that nodeblock generates, so not a problem that nodeblock can repair.
Moving this ticket to blockreference.
Comment #3
rudiedirkx commentedThanks Johnny.
Drupal's textfields are apparently 128 max by default. Your block label + moddelta is more.
The db field is max 129 (don't ask), which should be enough.
Will fix.
Comment #5
rudiedirkx commented@egontinno Can you try this patch and let me know if that fixes it?
If it does, I'll create a new release. It's time.
Comment #6
egontinno commentedYes, patch fixes the problem. Thank you!
Comment #7
rudiedirkx commentedExcellent. I'll make a new release.
Comment #9
Chris CharltonSorry to bug about this ticket but the commit added'#maxlength' => 999so how does that help control a 128 character limit?What is the real (or sane) limit? because I doubt it's
999characters, which is what the patch allows.Comment #10
rudiedirkx commentedThere's no limit, technically, because the input's value isn't used or saved entirely. You could have block info's of 3000 chars. Very unlikely though. 999 is good enough for me. If it's not good enough for you, you can widget alter or form alter another limit.