Closed (won't fix)
Project:
Drupal core
Version:
8.0.x-dev
Component:
database update system
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
13 Feb 2013 at 19:31 UTC
Updated:
29 Jul 2014 at 21:54 UTC
Jump to comment: Most recent file
Comments
Comment #1
andypostThe code from drupal.org/sandbox/larowlan/1790736 branch comment-fieldapi4
Attached patch from current version
Comment #2
andypostPostponed for new bugs
Comment #3
sunComment #4
andypostAnd again... after my try to minimize a key length according #1852896: Throw an exception if a schema defines a key that would be over 1000 bytes in MySQL
Same error http://qa.drupal.org/pifr/test/445168
Comment #5
andypostAfter digging into this problem with jthorson we found that we have no ability to use
get_t()withinhook_update_N()see #1907960-61: Helper issue for "Comment field" and #68 where this was fixed.So simple we should change docs for
hook_update_N()to avoid this confusion.Comment #6
andypostTagging
Comment #7
podarok#5 simple
looks good
Comment #8
dwwFWIW the "update.module" is specifically about the Update Manager (previously Update Status), while "database update system" is about hook_update_N(), update.php and friends.
Comment #9
catchWe don't need to point out it's broken now, instead we should update the docs of get_t() to indicate that it shouldn't be used during code run in updates.
Comment #10
aroq commentedPatch attached to update get_t() docs as noted at #9.
Comment #11
xjmThanks @aroq!
Two minor notes on the patch:
hook_update_N().I have another question: What should be used in place of
get_t()? We should provide that information as well, I think.Comment #12
aroq commentedUpdated patch as noted in #11.
Comment #14
aroq commented#12: doc.fix-1916556-12.patch queued for re-testing.
Comment #16
aroq commentedUpdated patch attached.
Comment #17
aroq commentedIssue status updated.
Comment #18
berdirWe removed the word please from the UI, I guess we shouldn't use it in docs either? So just "use t() instead".
Comment #19
aroq commentedUpdated as said at #18.
Comment #20
berdirNot 100% sure if t() is really what you should use but hook_update_N() says so, although we also have example that don't translate at all in core. @catch should probably look at this.
Comment #21
webchickMoving over to him, per Berdir.
Comment #22
catchI think we should change the docs in hook_update_N() and not use any of these there - same as other API functions that potentially invoke hooks etc.
Comment #23
dcam commentedhttp://drupal.org/node/1427826 contains instructions for updating the issue summary with the summary template.
The summary may need to be updated with information from comments.
Comment #24
gábor hojtsyOMG no, don't tell people to use t() in update functions, that could very well be a death spell too. The db behind t() changes in the D8 update process for example. #1813762: Introduce unified interfaces, use dependency injection for interface translation may or may not help with that at the end.
Downgrading because I have not seen this appearing anytime recently as well as because the suggested solution is a one line comment expansion.
Comment #25
jair commentedNeeds reroll
Comment #26
albert volkman commentedget_t() doesn't exist anymore.
https://drupal.org/node/2021435