I have four languages on my Website. When i unpuplish one Node (translation) then i get a weird redirect when i want to access the forntpage. I made some debug test and this are my (shorten) debug_backtrace results:

#0  drupal_goto(node/140, Array ([language] => stdClass Object ...  entity_translation_upgrade.module:121
#1  entity_translation_upgrade_redirect(140, en) called at entity_translation_upgrade.module:49
#2  entity_translation_upgrade_access(stdClass Object ... 
#3  call_user_func_array(entity_translation_upgrade_access, Array ([0] => stdClass Object ... includes/menu.inc:637
#4  _menu_check_access(Array ([menu_name] => main-menu ... includes/menu.inc:927
#5  _menu_link_translate(Array ([menu_name] => main-menu ... includes/menu.inc:2646
#6  menu_link_load(4910) called at sites/all/modules/menu_firstchild/menu_firstchild.module:65
#7  _menu_firstchild_get_firstchild_href(2648) called at sites/all/modules/menu_firstchild/menu_firstchild.module:50
...

I think its a Bug in the entity_translation_upgrade sub-Module. The function "entity_translation_upgrade_access" should only returns a boolean an not make a redirect. See my patch. For me it works, but i don't now if its the right way to fix it.

Sorry for my english

CommentFileSizeAuthor
redirect-if-node-is-unpublished-0.patch643 bytesCogax
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

plach’s picture

Status: Needs work » Closed (works as designed)

Thanks for the patch, but this behavior makes sense in many situations. If it's not working for you, disabling Entity Translation Upgrade should be enough, as it's needed only to migrate translations from the D6 model (one node for each translation).