'main_comments' block not saving comments

Post

Posted
Rating:
#5051 (In Topic #1131)
Joe
Avatar
Standard member
Joe is in the usergroup ‘Honoured member’
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:
{$BLOCK,block=main_comments,page=h_blogs,reverse=1,invisible_if_no_comments=0,reviews=1,max=-1,explicit_allow=1}
Online now: No Back to the top

Post

Posted
Rating:
#5056
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Works for me.

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


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#5061
Joe
Avatar
Standard member
Joe is in the usergroup ‘Honoured member’
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}.
Online now: No Back to the top

Post

Posted
Rating:
#5100
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
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.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#5107
Joe
Avatar
Standard member
Joe is in the usergroup ‘Honoured member’
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.
Online now: No Back to the top

Post

Posted
Rating:
#5122
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
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.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#5126
Joe
Avatar
Standard member
Joe is in the usergroup ‘Honoured member’
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.
Online now: No Back to the top

Post

Posted
Rating:
#5130
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
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.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#5131
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’

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.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#5132
Joe
Avatar
Standard member
Joe is in the usergroup ‘Honoured member’

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.
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Forum statistics:
  • 2,052 topics, 7,195 posts, 10,827 members
  • Our newest member is LowfareMart
Back to Top