Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
13 Jan 2011 at 10:34 UTC
Updated:
3 Jan 2014 at 02:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jhodgdonHmmmm....
The maximum length of the array key on the return value (the "delta") is 32 bytes, as you can see from block_schema():
I think that is what you are talking about, since you mention a value of 'pending_user_notification'. That would typically be a block delta, not a 'info' element. I agree this maximum should be documented, and it isn't currently.
I don't think there's really a maximum length for the 'info' element of the return value though -- that is the default human-readable title for the block, and it is not stored in the database as far as I can tell. I looked through _block_rehash(), which builds the block list for the block admin page, and I'm not seeing any usage of the 'info' component that would have a maximum length.
There is also a maximum length for the human-readable title that someone configures in the user interface, which is apparently 64 bytes:
So I'm assuming you meant the array key and not the 'info' component? If not, what error are you getting?
Comment #2
jaypanYes, I am referring to the delta, the key of the array. 32 bytes actually seems a little small to me (because of namespacing), but if it's going to be 32, then it should at least be documented. I was able to debug it from the error message and seeing the size in the database, but I know error messages like that can be confusing for some people, particularly when learning a new system.
Comment #3
jhodgdonAgreed, the 32 byte limit of delta needs to be documented. Good project for a novice doc contributor.
Comment #4
rschwab commentedThis patch adds "The maximum length for delta values is 32 characters." to the paragraph describing delta values.
Comment #5
jaypanLooks good to me.
Comment #6
jhodgdonThe maximum length is 32 *bytes*, not 32 characters. Not the same thing in, for instance, Japanese.
Comment #7
jaypanHeh, I'm in Japan and should have realized that!
Comment #8
rschwab commentedOops! This one changes 'characters' to 'bytes'.
Comment #9
jhodgdonLooks fine, thanks!
Comment #10
jhodgdon#8: 1025372.patch queued for re-testing.
Comment #11
dries commentedCommitted to CVS HEAD. Thanks.
Comment #14
donquixote commentedSee also #2182201: block_schema(): Change block.delta from varchar(32) to varchar(64)