'main_comments' block not saving comments

Post

Posted
Rating:
#4730 (In Topic #954)
Joe
If I add the block to the page via the block helper, comments are saved and to the appropriate forum. However, if I add the block inside a template being used within the page, comments are not saved at all.

Working:

Code

[block page="h_blogs" reverse="1" invisible_if_no_comments="0" reviews="1" max="-1" explicit_allow="1"]main_comments[/block]

Not working:

Post

Posted
Rating:
#4734
Works for me.

All I can think is maybe you have nested <form> elements causing fields to not be sent correctly.

Post

Posted
Rating:
#4739
Joe
Ok, I think what was happening - I had caching enabled, so after trying to add another comment, it didn't appear to be saving. I just had to add a cache=0 parameter to {$BLOCK}.

Post

Posted
Rating:
#4770
The cache parameter shouldn't do anything for this block, it doesn't support caching. The only exception is if quick_cache=1 was also set (in which case an arbitrary cache signature is determined for you), but that doesn't seem to be the case here.

Post

Posted
Rating:
#4777
Joe
Hmm, not sure. All I can say is when I use this:

Code

{$BLOCK,block=main_comments,page=h_blogs,reverse=1,invisible_if_no_comments=0,reviews=1,max=-1,explicit_allow=1,forum=12}

…comments are saved but can only be viewed after I clear the caches.

If I use:

Code

{$BLOCK,block=main_comments,page=h_blogs,reverse=1,invisible_if_no_comments=0,reviews=1,max=-1,explicit_allow=1,forum=12,cache=0}

(with cache=0), I can see comments on the page right after posting it.

Strange indeed! I can also tell you that within the block helper, there are options for changing cache settings for this block.

Post

Posted
Rating:
#4792
What template are you trying to add it to? Can you show me it not working on your site somehow?
I just did a test on your site in an admin template and it worked okay.

Post

Posted
Rating:
#4796
Joe
Line 174 of CATALOGUE_HELP_SUPPORT_FIELDMAP_ENTRY_WRAP on the 'island' theme.

Remove cache=0 from the end of {$BLOCK} and try to post a comment here. You'll notice when the page redirects after submission, the comment doesn't show up. It's saved to the DB, but you can't see it unless the caches are cleared.

Place cache=0 back and try adding another comment; you can see the comment immediately on the page after submission.

Post

Posted
Rating:
#4800
Ok thanks. Btw, did you get an email notification for my reply? I'm wondering if email is not working on our new server for all, or just me as I have an email on a server-hosted domain.

Post

Posted
Rating:
#4801

Joe said

Line 174 of CATALOGUE_HELP_SUPPORT_FIELDMAP_ENTRY_WRAP on the 'island' theme.

Remove cache=0 from the end of {$BLOCK} and try to post a comment here. You'll notice when the page redirects after submission, the comment doesn't show up. It's saved to the DB, but you can't see it unless the caches are cleared.

Place cache=0 back and try adding another comment; you can see the comment immediately on the page after submission.


I removed cache=0 and it's still working for me   :o . Tested multiple times on Chrome, and Firefox.

Post

Posted
Rating:
#4802
Joe

Chris Graham said

Ok thanks. Btw, did you get an email notification for my reply? I'm wondering if email is not working on our new server for all, or just me as I have an email on a server-hosted domain.

Yes, I received multiple emails today regarding replies to numerous topics, so it must just be you.

Chris Graham said

I removed cache=0 and it's still working for me   :o . Tested multiple times on Chrome, and Firefox.

Sometimes I think Composr likes making me look crazy. I swear it wasn't working lol.

I'll leave out the cache=0 for now but will keep a close eye on this!

Thanks.
6 guests and 0 members have recently viewed this.