Call to a member function displaySubmitted() on null

Created on 5 May 2016, over 8 years ago
Updated 30 March 2023, over 1 year ago

i'm creating a node in D8, then i try to point SimpleTest to it.

       $this->user = $this->drupalCreateUser(array('access content'));
        $this->drupalLogin($this->user);

        $title = "test page";
        $settings = array(
         'type' => 'page',
         'promote' => 1,
        );

        $settings['body'] = array(
        'value'  => 'Ono is a cable firm. Telefonica is a phone firm. Vodafone also is a phone firm.',
        'format' => 'filtered_html',
        );

        $node = $this->drupalCreateNode($settings);
        $this->test_nid = $node->id();

        $this->drupalGet("node/" . $this->test_nid);
        $this->assertResponse(200);

SimpleTest gets this error when viewing the node:
Fatal error: Call to a member function displaySubmitted() on null in /home/leandro/public_html/drupal8.dev/core/modules/node/node.module on line 606

am i doing something wrong or is this a bug?

💬 Support request
Status

Fixed

Version

8.3 ⚰️

Component
Simpletest 

Last updated about 2 months ago

Created by

🇪🇸Spain leandro713 🇪🇸 Madrid 🤠

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024