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

#2091399: [META] Remove menu_get_object()
#244090: Tie help into menu router

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andypost’s picture

Status: Active » Needs review
Issue tags: +Needs tests
FileSize
627 bytes

Needs test in NodeTranslationUITest or NodeFieldMultilingualTestCase

andypost’s picture

Steps to reproduce:
1) enable second language and enable translation of article content body field
2) add node and add translation
3) try to edit

dawehner’s picture

Related issue: #1831846: Help block is broken with language path prefixes

The better way would be to get the request object on there.

dawehner’s picture

The other issue fixes the same problem.

larowlan’s picture

Assigned: Unassigned » larowlan

adding tests

larowlan’s picture

fail/pass?

larowlan’s picture

Issue tags: -Needs tests

we have tests now

Status: Needs review » Needs work
Issue tags: -Quick fix, -D8MI

The last submitted patch, hook-help-translation-2092641.pass_.patch, failed testing.

larowlan’s picture

Status: Needs work » Needs review
Issue tags: +Quick fix, +D8MI
dawehner’s picture

As 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.

larowlan’s picture

Status: Needs review » Closed (duplicate)