Closed (fixed)
Project:
Display Suite
Version:
7.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Jun 2011 at 16:58 UTC
Updated:
20 Oct 2014 at 08:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mrfelton commentedThe problem seems to stem from the fact that comment.module only loads the comments onto the node if you are on the node view page, and so when viewing the node in a views listing they don't get loaded.
In the Views module, there is an option to include the commets in either teaser of full mode which basically causes the comments to be loaded with comment_node_page_additions() in template_preprocess_views_view_row_node(). If I set my view to use Content instead of Display suite as the row style, comments are loaded as expected.
If however I set the row style to Display suite, and select my build mode (full in this case), comments do not load. The attached patch resolves this.
Comment #2
mrfelton commentedOops, wrong patch. This is the one I meant!
Comment #3
swentel commentedShouldn't this be optional also with some sort of checkbox ? Seems overhead to load comments in case you don't want to display them ?
Comment #4
mrfelton commentedThe comments field is available for use in display suite layouts by default. I guess that we could check to see if the field has been included in a region and only load the comments if they have.
Also, as a sidenote, the comments field doesn't seem to be available for use for Teaser build modes, only Full mode (possibly custom modes too, I haven't checked those). I would have though that the comments field should be available foe use in all build modes.
Comment #5
swentel commentedYeah, the comment field is limited to default and full, see ds.ds_fields_info.inc because somehow that seems natural to me, might be wrong of course.
Comment #6
mrfelton commentedSeems wrong to me. When you are building a View using a normal Node display (without Display Suite), you have the option from within the Views UI to include the comments in both Full mode and Teaser mode. Display should also allow this flexibility IMO.
Comment #7
mrfelton commentedRemoving that line in ds.ds_fields_info.inc gets that working for me - now I can display comments in teaser mode too.
Comment #8
swentel commentedWell, I agree it should be available on all view modes, but comment.module itself does this:
so they won't be available when just called with node_view() and a different view mode. I'll check tonight to get this option in the views UI however.
Comment #9
bryancasler commentedsubscribe
Comment #10
swentel commentedCommitted to dev - with an option in the UI as well. Thanks!
Comment #12
bassplaya commented@swentel: Does this mean we have to deploy the dev version of DS to have comments to show up in a View?
I'm using comments to set a message for moderation purposes of a collaborator's content and so I need the comments to show on my custom view mode.
Also, there is the option in views to show comments or not so I'm not getting why the comments are not loaded then if the option is there.
In Views I see this:

Comment #13
bassplaya commented@swentel, I'd like to know if the fix will be moved into the beta version.
Comment #14
bassplaya commented@swentel, I'd like to know if the fix will be moved into the beta version.
Comment #15
swentel commentedIt's in DEV, there won't be a new beta version anymore, there will be a new release though soon.
Comment #16
bassplaya commentedThanks!
Comment #17
bassplaya commented@swentel I've downloaded the dev version as you said it was in the DEV version but it still doesn't show up. Then I tried with a clean install:
- created a custom view mode
- created a view for articles in an HTML list
- saved it
- set the style to Display Suite
- selected my view mode
- kept the "load comments" ticked
- generated 50 articles with comments,
- comment display has no particular comment display suite view mode and shows "comments"
If I check each node separately or even the front page, all comments show but not in my view.
I used DS 7.x-2.6+29-dev (which should be the latest dev version) and Views 7.x-3.8 in Drupal 7.32
Do I still need to apply this patch that was talked about or is that integrated in the DEV release specified in my post here?
Thanks for getting back to this.