Jump to content

Recommended Posts

Posted

I followed this guide to add comments

<?php echo $page->comments->render();

And I get this error

Fatal Error: Uncaught Error: Call to a member function render() on null

renderAll and renderForm same

Can you help me solve this error please?

Posted

Seems like the field isn't set up correctly. render() on null means the variable doesn't have a valid object or instance associated with it.

You likely haven't added the field to your template.
Go to Setup => Templates, add the "comments" field you just created to your template where you want them to appear.

  • Like 3
Posted
10 hours ago, qubism said:

Seems like the field isn't set up correctly. render() on null means the variable doesn't have a valid object or instance associated with it.

You likely haven't added the field to your template.
Go to Setup => Templates, add the "comments" field you just created to your template where you want them to appear.

Yes, I haven't added the field to template. Thank you!

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...