'main_comments' block not saving comments
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:
Not working:
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:
Works for me.
All I can think is maybe you have nested <form> elements causing fields to not be sent correctly.
All I can think is maybe you have nested <form> elements causing fields to not be sent correctly.
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}.
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.
Hmm, not sure. All I can say is when I use this:
…comments are saved but can only be viewed after I clear the caches.
If I use:
(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.
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.
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.
I just did a test on your site in an admin template and it worked okay.
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.
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.
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.
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.
From “Re: Reply to ticket: Deanager.co.uk (ticket-ID: 4363_5c5976885ebc5)”, 6th Feb 2019
I removed cache=0 and it's still working for me
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. 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.
1 guest and 0 members have recently viewed this.

0 reviews: Unrated
There have been no comments yet