Jump to content

Recommended Posts

Posted

Hello,

I recently started making a blog using Processwire and since i'm completely new, I struggle with a few things.
I'm trying to make a comment section in my blog post, so I followed the tutorial and pasted the two code lines in my template.

18		echo $page->comments->render(); 
19	 	echo $page->comments->renderForm(); 

 

but now I have this error on my page :

Error: Call to a member function render() on null (line 18 of C:\wamp64\www\processwire\site\assets\cache\FileCompiler\site\templates\Post.php) 

 

Am I missing something?

Thanks for your help.

Posted

Hi and welcome to the forum @paulb.

 

To me, it look like you forgot to add the field to your template (I don't see this step in the tutorial).

In the admin, go to Setup > Templates > your_template, add the field comments to it then save.

 

comments.thumb.png.abe8a954da753fa1407c156a10531c6e.png

 

  • Like 3
  • Thanks 1
Posted

Hey!

Thanks for your fast reply.
It seems like everything is alright with my comment field,

I just wrote "Comments" instead of "comments" and completely forgot it was case sensitive.

Thanks again!

  • Like 2

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
×
×
  • Create New...