This is a bug when menu_link module is active.
On a Content-type with menu_link field, create a node with some content on fields (or just body).
After saving it, you are redirect on the node display, but no fields display. Debugging node and entity show entity is not build completely (fields are empty).
Debugging redirect module, i see problem come from entity_load call on redirect_load_entity_from_path function which is called on redirect_url_inbound_alter.
The strange part : redirect_load_entity_from_path is called but not used. So i think this code should be deleted (line 217).
// Redirect from default entity paths to the proper entity path.
if ($path_entity = redirect_load_entity_from_path($path)) {
if ($uri = entity_uri($path_entity['entity_type'], $path_entity['entity'])) {
if ($path != $uri['path']) {
//return redirect_redirect(array('redirect' => $uri['path'], 'redirect_options' => $uri['options'], 'type' => 'global'));
}
}
}
Comments
Comment #1
klaasvw commentedRenaming the title to better reflect the issue (it's not related to menu link module only).
I also encountered this with a custom filter that uses a theming function to generate its output. Because
themewas called the theme layer was initialized without callinghook_custom_theme. In combination with a theme switching module (in my case domain_theme) the default theme is used after a cache clear instead of the one defined in ahook_custom_themeimplementation.The problem is indeed the
entity_loadcall inredirect_url_inbound_alter.hook_url_inbound_alteris called very early in the bootstrap causingentity_loadto behave unexpectedly.Because the code in
redirect_url_inbound_alteris just a stub I'm suggesting to remove it for now. In the meantime we could look for a better solution in #905914: Merge global redirect functions into Redirect module that doesn't useentity_load.Comment #2
klaasvw commentedComment #3
alan d. commentedDuplicate of #1370964: Redirect interferes with hook_custom_theme.