I have panel, where there are nodes and one of the nodes is "context -> node".
In panel I have "node->comments" and "node->comment form"

While viewing panel if comment is posted, Panel page is redirected to node's page and not to panel's page.
How could I setup Panels properly?

Comments

clashar’s picture

Status: Active » Closed (fixed)

workaround: using Flatcomments module I could disable reply to comments.
But when posting in "comment form" still redirects to node and not to Panel page.

clashar’s picture

Status: Closed (fixed) » Active
clashar’s picture

for me it seems so obvious that user after comment posting should be redirected to Panel and not to Node inside. Isn't it some simple settings?

makeapage’s picture

Clashar... I'm looking for exactly the same solution... My node is actually a mediaplayer (popup), for every NID i have a Panel with some extra information and a place where people can place comments...

Kinda odd when people get redirected to the node after they submit the comment.

Looking for some elegant hacking codes :P

Should be possible, right?

apmsooner’s picture

I set up a view (views pane) of comments with content id from url as default argument. I'm displaying the comments with format of unformatted with the "show" option set to comment. I have the show links option checked yes and under pane settings I have "use panel path" set to yes. This works great for me so maybe it will help others. When clicking reply, it opens the comment form and when saving, returns to the panel with my updated comment.
The nice thing about using a view is that you can set custom sort as well as exposed filters that refresh automatically with ajax (optional). I can also limit the number of comments and include pagers to ensure fast loading for that pane. You can easily embed the comment form in another pane and when you save, you will see your comments updated without ever leaving the panel. Hope that helps...

apmsooner’s picture

For clarification, i'm using the panels node template to override the normal node view for that given content type.

makeapage’s picture

alright! sounds promising, I'll give it a try! Was lost there for a moment.

apmsooner’s picture

Sounds like a lot to setup but its not too bad if you know views. way more flexible than any other comments type module i've seen.

makeapage’s picture

biggest problem is that you cant use arguments in the "panel nodes" mode (for the urls). or am i wrong?

apmsooner’s picture

I don't use panel nodes. I enable the node template and specify a selection rule for the content type i want to override. That basically allows the panel to take over the normal node view. You can pass arguments from views to the node for urls just like you normally would so you can embed a views block, content pane, etc...

you can do similar things with the taxonomy template and user profile template to override those pages just the same way and pass arguments from views.

Letharion’s picture

Title: comment redirects to node » New node comment redirects to node, not originating panel page
Status: Active » Fixed

What apmsooner suggests in #10 is, in my opinion the correct solution, as it makes the original problem moot. Since noone else has commented since, I consider this fixed.

If you wanna hack around this, a hook_form_alter could change the destination of the submit, but I don't recommend it.

Status: Fixed » Closed (fixed)

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

heretic381’s picture

The question is: How this is going to work if you make a new custom view to organize a collection of node variants?
For example, I need to set a pager for user to navigate through certain nodes. This can be done with views only.

Submitting comment in that custom view will probably redirect to the original node, even if it is a panel variant.

apmsooner’s picture

See #6, the point is if you use the built in node template, the panel IS the original node at that point based on the context and selection rules you define in the variant.

heretic381’s picture

Ok, I understand that Panel is a node variant which takes place of the original one. As I'm not really a Panels expert, I would like to know if this can solve the problem of having a navigation for organized node content and commenting functionality without redirect. Think for example of node gallery with navigation links(or images) organized in albums, and comments.
When you set view gallery, submitting comments will redirect to node view, out of the gallery.
Thanks in advance.

apmsooner’s picture

hmm.... not sure i completely understand but my thought is that if you created a view of comments with the add comment link as field within the view, i would think the redirect would go back to the view itself or i guess you could set the destination parameter yourself to go where you want it. The answer may be to not use the core comments display at all in the node view and instead attach a comments views display via context with argument on nid set as default content id from url. The redirect would still default back to the views display which is embedded in the panel node so i don't know if that at all makes sense or answers your issue but again... i'm still maybe a little confused on the functionality you're after.

heretic381’s picture

Ok, thanks for the quick reply.
I'll try to describe it as simple as possible.
My purpose is to build a node gallery. Most of drupal 7 existing modules works for field galleries.
That means no comments on each item.
We must use nodes instead if we want to keep commenting functionality.
But then we get stack because there's no way to organize, sort, list nodes, except by using views. By using views we can add navigation, filters, etc.
But then we loose comments, because they get us out of the view.
Hope that's clear :)