Jump to content

[Solved] Getting Error: Call to a member function render() on string after adding Content-Element


Recommended Posts

I just reinstall Processwire with latest RockPageBuilder (6.5.2). After adding a Content-Element (Afred oder Backend) I get an error:

 

Error:


Call to a member function render() on string search►
RockDevTools LiveReload is active    

File: .../modules/RockPageBuilder/RockPageBuilder.module.php:1596

1586:      }
1587:    
1588:      /**
1589:       * Render content of blocks field
1590:       */
1591:      public function render($renderPlus = true)
1592:      {
1593:        $page = $this->wire->page;
1594:        $field = $page->getFormatted(self::field_blocks);
1595:        if (!$field) return;
1596:        $html = $field->render($renderPlus);
1597:        $rf = $this->wire->rockfrontend;
1598:        if ($rf) return $rf->html($html);
1599:        return $html;
1600:      }

In Latte-Template:

{if $modules->isInstalled('RockPageBuilder')}
<main sortable>
  {$rockpagebuilder->render(true)}
</main>
{else}

If I delete the Content-Element it works like expected.

Link to comment
Share on other sites

6 minutes ago, jensweigel said:

Call to a member function render() on string search►

Sounds like $field in line 1596 is a string and should not be.

6 minutes ago, jensweigel said:

If I delete the Content-Element it works like expected.

I don't understand exactly. Could you please be more specific with your descriptions? Can you please add examples so that I can better understand what you are doing and what works and what does not? Could you also please describe what you mean by "works as expected"? Thx!

Link to comment
Share on other sites

Okay I tried to find out what is wrong. And finaly I found it. The problem was the "Option A: front-edit editable fields" under the Module Front-End Page Editor. Don't know why but I enabled the Option a for rockpagebuilder_blocks. So the error occure. Uncheck and all is fine … (Note to myself: Read the warning …)

Link to comment
Share on other sites

  • jensweigel changed the title to [Solved] Getting Error: Call to a member function render() on string after adding Content-Element

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...