Updated: Comment #0
Problem/Motivation
When site is multilingual and languages are using path prefix for language negotiation node_help()
trying to load node from wring arg[1]
Fatal error: Call to a member function bundle() on a non-object in /home/andypost/www/core8/core/modules/node/node.module on line 134
Proposed resolution
use menu_get_object()
as quick fix
Related Issues
#2091399: [META] Remove menu_get_object()
#244090: Tie help into menu router
Comment | File | Size | Author |
---|---|---|---|
#6 | hook-help-translation-2092641.fail_.patch | 931 bytes | larowlan |
#6 | hook-help-translation-2092641.pass_.patch | 1.54 KB | larowlan |
#1 | drupal8.node-module.2092641-1.patch | 627 bytes | andypost |
Comments
Comment #1
andypostNeeds test in
NodeTranslationUITest
orNodeFieldMultilingualTestCase
Comment #2
andypostSteps to reproduce:
1) enable second language and enable translation of article content body field
2) add node and add translation
3) try to edit
Comment #3
dawehnerRelated issue: #1831846: Help block is broken with language path prefixes
The better way would be to get the request object on there.
Comment #4
dawehnerThe other issue fixes the same problem.
Comment #5
larowlanadding tests
Comment #6
larowlanfail/pass?
Comment #7
larowlanwe have tests now
Comment #9
larowlan#6: hook-help-translation-2092641.pass_.patch queued for re-testing.
Comment #10
dawehnerAs said on #2092641-3: node_help() does not allows to edit node translations, this fix is fine, though this just solves the symptoms not the actual bug, as $arg has still the wrong values.
Comment #11
larowlanDuplicate of #1831846: Help block is broken with language path prefixes