Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 297457

node_load called from wrong url arg, with language detection from url, for translated content(in node_help & probably elsewhere)

$
0
0

Steps to Reproduce:
create an article. add a translation. edit the translation.
this error is produced:
Fatal error: Call to a member function bundle() on a non-object in /var/www/drupal8/core/modules/node/node.module on line 136

Here is the code:

    case 'node/%/edit':
      $node = node_load($arg[1]);
      $type = node_type_load($node->bundle());

In this case, the url would be /<langcode>/node/<nid>/edit, so the $arg[1] would return "node".

Viewing all articles
Browse latest Browse all 297457

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>