1

I'm new to Drupal, but I couldn't find an answer for my problem in any other thread.

I've installed and configured Author Pane and I'm able to see it in places like a node page or advanced forum topic.

Now I'm creating a View that returns a list of nodes, and configured one of its Display Suite view modes for displaying each result (this view mode includes the Author Pane block for that content type).

The list of nodes is displayed OK, but the Author Pane is not being shown. The section of the view mode layout where the Author Pane should be displayed is empty.

I've already tried making a relationship with Author and setting the Author:name as one of the view's fields (I've read sth like that in some other posts), but nothing changed. It's like Author Pane cannot find any user context information.

Can someone help me with this issue ?

As a (maybe) related issue, I have another view that ends up in a block, which should also display the Author pane. This block appears at the bottom of a node page, which also has Author Pane configured. In that view block, Author Pane is actually being display for each results but always with the information of the user of the page's node! So, every secondary node related with the primary node displays the same Author information as the primary node, instead of its own author's information. I think both issues are related. There is some problem with Author Pane trying to get user information from views.

Thanks everybody in advance!

  • have you added the author pane block in your display suit view mode? – Ahmad Dec 22 '14 at 11:44
  • Yes, its a two columns layout view mode, and if I configure it as the default view mode for the node page, the Author Pane gets displayed. The problem is when I try to display it using Views. – Ariel C. Dec 22 '14 at 12:19
0

For anyone who ends up in my same situation, I will post the answer.

Author Pane is only prepared to be displayed on full view nodes, but not in View's lists or Display Suite custom view modes. This is because calling the function "menu_get_object()" will not retrieve anything.

What you need to do is to alter Author Pane's function "author_pane_get_block()" or find a way to implement a hook to do the same thing properly.

I quickly edit the first condition removing the numerical condition of arg(1) and after $node = menu_get_object() line, I check if node is not set, and in that case, I assign $node variable the current view node from somewhere in the context. (in my case, I could get it from Display Suite context, but you can get it from anywhere, including (in the worst case) the stacktrace arguments.

Hope this helps someone!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.