I have a content type in OpenAtrium that uses a Panelizer layout with full-page override. In the Content section for the node, I have Rendered Node using view mode "Full Content", and I use a .tpl.php to render the node content.

So what I'm trying to do is add a comment reply form to this content type. Comments are enabled for the content type already. When I click the cog and click "Add Content," I select Comment and add the reply form. Then, when I load a node page, it gives me a "This webpage has a redirect loop" error. And when I go back to the "Add Content" screen, I get dozens of Drupal messages that all say, "This discussion is closed: you can't post new comments." Removing the Comments reply form fixes the issue.

How can I fix this?

Comments

pjohn created an issue. See original summary.

mpotter’s picture

Priority: Major » Normal

Should probably first try upgrading to the latest 2.45 version since many bugs are fixed in each new version. You can look at the Panelizer layouts for the Atrium content types such as Document Page for examples of comment form usage.

Also, FYI, you shouldn't mark support requests with a priority other than Normal.

pjohn’s picture

I was able to figure it out. The redirect loop happens when comments are disabled on a node (which was my fault). Now I can add the comment form and it works fine (to add the form, I also had to disable previews as detailed at https://www.drupal.org/node/2268103).

One question remains: when I add a comment form, it redisplays the entire node content before the form. As I'm already doing this on the node's page, I don't need all that shown twice. How can I eliminate the duplicate content and simply show the form and threaded comments?

Edit: I also notice that when I create a new comment, it doesn't show up (although it says it's been posted). How do I show those too?

wizonesolutions’s picture

Argus’s picture

Status: Active » Closed (fixed)

@pjohn Your issue was solved right? Closing then, your additional questions may relate to your custom .tpl.php. Please open new issues for those.

pjohn’s picture

Status: Closed (fixed) » Active

@Argus, no, the issue is not resolved. The related issue above does not address my situation, which is that:

  1. I'm getting an entire duplicate of the node content when I include a comment form, which I can't turn off, and
  2. Adding the comment form does not also include existing threaded comments.

Does anyone know how to solve one, or both of these issues? Please don't close until we either find a specific solution or agree that there is not one at present.

mpotter’s picture

Did you try my advice in #2 to look at the Panelizer layout for the Document Page content type and do the same for your custom content?

wizonesolutions’s picture

Status: Active » Fixed

@mpotter: Thanks, Document Page inspired me to nose around more, and I found the "Comments and comment form" element in Page Content. We had not noticed this before. This integrates perfectly with tasks, and it gets us the desired functionality. Not sure what other tweaks might be needed (since we made several), but we can figure that out on our own.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.