Conversation Block, Not working when added to Page Type - 8.5.5
Permalink
Hi, what am I missing here, I want guests to be able to post to my comments block and then approve before they are visible, however I can't seem to get the block to be visible unless i'm logged in?
Where do I need to set as guest can contribute? I have Guests can Add Message to Conversation in the Conversation Permissions, but can't see anything else obvious.
Thanks
Where do I need to set as guest can contribute? I have Guests can Add Message to Conversation in the Conversation Permissions, but can't see anything else obvious.
Thanks
Ok, so it would appear it is because I have added it in the Page Type Output, which is odd as one would assume adding a comments section to blog posts via the Page Types Output section would make the most sense. Any ideas, i'm struggling to find anything recent on the forums, C5 or elsewhere.
Thanks to the feedback from John & Enlil, unfortunately the only way that this seems possible is to manually add the conversation block to a new blog post page. All other ways so far seem to have joined up identity issues. Even by detaching the block from the Page Type Default, I found that it was still linked and each page had the same comments.
Core team, if we have missed something, please let us know!
Core team, if we have missed something, please let us know!
I'm not able to reproduce this with a fresh install of 8.5.5. Are you using any custom blocks or overrides?
Very simply, I:
* created a new page type
* edited the output for it
* added three blocks: page title, content, and conversations
* then I created two new pages using that page type
* viewed the pages as guest
* commented on each page as guest (with different comments)
* reloaded the pages
* each page shows the expected comments
Are you doing something different?
Very simply, I:
* created a new page type
* edited the output for it
* added three blocks: page title, content, and conversations
* then I created two new pages using that page type
* viewed the pages as guest
* commented on each page as guest (with different comments)
* reloaded the pages
* each page shows the expected comments
Are you doing something different?
Hi, thanks for taking a look, I have now started again and as yours is setup it does work, so I will go through adding one step at a time and see where the issue lies. The annoying thing is I used a marketplace add-on to add the blog settings which may have been the issue and it may have inadvertently corrupted something, this has been removed but the issue remains. Thanks for looking.
What does the browser debug console report?
Are you loading the necessary assets in your block controller?
Are you loading the necessary assets in your block controller?
Thanks John
I think so, bar style.css.map which i've never worked out but have had issues with it on other sites too.
https://www.atticusfinancialplanning.co.uk/blog/what-are-my-pension-...
The block itself is near the bottom between the two bars of gold and blue.
This is where the development site is. When it comes to the console I use chrome dev tools, is there a specific are aI should be looking in?
I think so, bar style.css.map which i've never worked out but have had issues with it on other sites too.
https://www.atticusfinancialplanning.co.uk/blog/what-are-my-pension-...
The block itself is near the bottom between the two bars of gold and blue.
This is where the development site is. When it comes to the console I use chrome dev tools, is there a specific are aI should be looking in?
Actually when logged in, it almost looks like its adding the block twice?
The main thing is no errors - which appears OK. Then check in the network tab that expected scripts are loaded - again looks OK.
Looking at the script, $('div[data-conversation-id=10]') is looking for an element with that ID and you appear to have such an element, so again OK.
In the XHR tab you can see the script is then trying to ajax load that conversation id and you are getting 200 OK response. But the response body is empty.
Does a conversation thread with that ID actually exist? The ID and thread would normally be created by a conversation block controller.
The data passed contains no xss validation code. I don't know if it needs it. If it does need the code, perhaps you are being black holed as a prospective spambot.
It is loading AJAX from a tools URL. These are deprecated, through still used by many core functions. As you have recently updated, check the core conversation script and html for 8.5.5. It could be you started developing on 8.5.4 and the core has moved on.
Also try adding a regular conversation block in there and see if that works.
Looking at the script, $('div[data-conversation-id=10]') is looking for an element with that ID and you appear to have such an element, so again OK.
In the XHR tab you can see the script is then trying to ajax load that conversation id and you are getting 200 OK response. But the response body is empty.
Does a conversation thread with that ID actually exist? The ID and thread would normally be created by a conversation block controller.
The data passed contains no xss validation code. I don't know if it needs it. If it does need the code, perhaps you are being black holed as a prospective spambot.
It is loading AJAX from a tools URL. These are deprecated, through still used by many core functions. As you have recently updated, check the core conversation script and html for 8.5.5. It could be you started developing on 8.5.4 and the core has moved on.
Also try adding a regular conversation block in there and see if that works.
Ok, John this is interesting, when you said 'does a conversation thread with that ID actually exist?' it got me thinking, so...
When I detached the block from the page type (i.e. by editing it) it worked, it created a thread for id 10:
https://www.atticusfinancialplanning.co.uk/blog/art-tax-efficient-in...
but the page that is still linked to the page type is still not working:
https://www.atticusfinancialplanning.co.uk/blog/what-are-my-pension-...
I have also created a new blank page 'Test' that I have just added conversation block to and that works fine.
So it is something to do with it linking via the page types, is there a way to add this hardcoded into the template? or to disconnect the block on page creation?
As for the AJAX tools etc... I haven't touched anything on these block in the underlying code, only styled it using pure CSS.
Where will I find 'core conversation script and html for 8.5.5' and what am I looking for?
I thought it might be the addon blog-module which I had used so I have uninstalled that, but nothing yet. Ideas welcome! Thank you
Ben
When I detached the block from the page type (i.e. by editing it) it worked, it created a thread for id 10:
https://www.atticusfinancialplanning.co.uk/blog/art-tax-efficient-in...
but the page that is still linked to the page type is still not working:
https://www.atticusfinancialplanning.co.uk/blog/what-are-my-pension-...
I have also created a new blank page 'Test' that I have just added conversation block to and that works fine.
So it is something to do with it linking via the page types, is there a way to add this hardcoded into the template? or to disconnect the block on page creation?
As for the AJAX tools etc... I haven't touched anything on these block in the underlying code, only styled it using pure CSS.
Where will I find 'core conversation script and html for 8.5.5' and what am I looking for?
I thought it might be the addon blog-module which I had used so I have uninstalled that, but nothing yet. Ideas welcome! Thank you
Ben
Am I correct in assuming you're setting up the conversation block on the page type defaults page, and therefore they are populating to each page of that type? Your finding the blocks don't work until you edit and save them on each page and then they seem to work? I recall running into this somewhere along the lines a while ago and de-prioritized the issue. There's def something wrong going on there!
I had a look at the database structure. Conversations are tied to both a cnvID and a cID.
I suspect the page type is tying the conversation to the page type's cID. Hence when its used in a page, the cID does not match any conversation.
I suspect the page type is tying the conversation to the page type's cID. Hence when its used in a page, the cID does not match any conversation.
Certainly makes sense. I remember blocks displaying identical comments and frustrating the CRUD out of me. I recall thinking something along those lines but it was well before I was confidently versed enough in v8 to do any worthwhile investigating.
Ok, thank you both, any idea if there is a solution? Thank you
You could try putting it in a stack and adding the stack to the Page Type (is that even possible?). However, I suspect that will suffer from the same end problem.
You could also try coding a page template with a global area and putting it in the global area. That would cut out the Page Type, but may still suffer a crisis of identity.
You could also try coding a page template with a global area and putting it in the global area. That would cut out the Page Type, but may still suffer a crisis of identity.
Thanks John, will try.
Franz et al, would this not be a prime usage case for blog development? Are we all missing something on how to dynamically add a conversation block to a new page?
Thanks
Ben
Franz et al, would this not be a prime usage case for blog development? Are we all missing something on how to dynamically add a conversation block to a new page?
Thanks
Ben
Please please help, its the only thing stopping me putting this site live. Thank you