Hi Guys,

Great module!, My question is why comments cannot be "panelizer", I think this is another entity very similar to nodes. I know it should be for a good reason but I just want to ask.

Thanks!

Comments

merlinofchaos’s picture

WIth Panelizer 3.x, it would probably be relatively easy to write a module that allows panelizing comments.

I think such a module should probably be separate. It's really rare for anyone to actually want to panelize comments, but I can imagine a use case, particularly for sites with a lot of fields on comments (like, using comments for user reviews or the like) that might make some amount of sense; but for most sites, the option would likely just get in the way.

Still, it is completely worth thinking about.

luksak’s picture

Would be a nice feature...

dixon_’s picture

Version: 7.x-3.0-rc1 » 7.x-3.x-dev
Status: Active » Needs review
StatusFileSize
new0 bytes

Here's a quick patch that should work pretty well.

dixon_’s picture

Let's try again ;)

Here's a quick patch that should work pretty well.

dixon_’s picture

I think such a module should probably be separate. It's really rare for anyone to actually want to panelize comments, but I can imagine a use case, particularly for sites with a lot of fields on comments (like, using comments for user reviews or the like) that might make some amount of sense; but for most sites, the option would likely just get in the way.

I think the patch is so small and simple to not be worth putting in a separate module. And IMO there are plenty of good reasons to panelize a comment, even without many fields :)

dixon_’s picture

Sorry for spamming the comment here today, but I want to cross reference a useful CTools patch when panelizing comments: #2058501: Provide comment links content type plugin

luksak’s picture

If I come across this issue again, I will test the patch... Im sorry, I cant do it right now.

lonehorseend’s picture

Work pretty well, except there is no delete, edit, and reply links and the only comment date I've found so far is a token, which I can't format.

dixon_’s picture

lonehorseend’s picture

Thanks!

One thing to note, on my site at least, you have to use Full Comment and not Default for comments.

damienmckenna’s picture

It might be worth adding a note to the README.txt file about the limitations of the Comments integration.

damienmckenna’s picture

FYI #2147795: Update UI / documentation to indicate view mode displays must be enabled before they can be Panelized is a problem when using this patch, can someone else please review it?

damienmckenna’s picture

damienmckenna’s picture

Status: Needs review » Fixed

This is good enough for now, though we need some follow-up items for adding more complete versions of the basic entity values - author, date, etc, rather than just tokens.

damienmckenna’s picture

BTW my rationale for including this in the main Panelizer module vs a submodule was that I believe all user-viewable entities provided by core should be panelizable, including comments.

damienmckenna’s picture

FYI I've added a follow-on issue to further improve the functionality: #2203631: Add more Comment panes for basic entity values

peacog’s picture

Hi, I've just tried the latest dev and it's throwing an error if the comment module is disabled:

Notice: Undefined index: view modes in PanelizerEntityDefault->hook_menu() (line 298 of .../sites/all/modules/panelizer/plugins/entity/PanelizerEntityDefault.class.php).

rei’s picture

Confirmed #17
I also have these error on the latest dev. just 'flush all cache' will throw the error.
if comment module enable then the error gone.

    Notice: Undefined index: view modes in PanelizerEntityDefault->hook_menu() (line 298 of .../sites/all/modules/panelizer/plugins/entity/PanelizerEntityDefault.class.php).
    Warning: Invalid argument supplied for foreach() in PanelizerEntityDefault->hook_menu() (line 298 of .../sites/all/modules/panelizer/plugins/entity/PanelizerEntityDefault.class.php).
    Notice: Undefined index: view modes in PanelizerEntityDefault->add_admin_links() (line 389 of .../sites/all/modules/panelizer/plugins/entity/PanelizerEntityDefault.class.php).
    Warning: Invalid argument supplied for foreach() in PanelizerEntityDefault->add_admin_links() (line 389 of .../sites/all/modules/panelizer/plugins/entity/PanelizerEntityDefault.class.php).
fubhy’s picture

@see #2204483: Notices when comment module is not enabled which has a patch for that issue.

chris burge’s picture

The patch from #4, which was committed in revision 'a75c0e5bb05d1cbb2bc9f3c06569fb2ebcea3c5c' appears to cause the path to 'admin/structure/types/manage/%/panelizer' to be inaccessible. I have opened a new issue: #2206155: Path 'admin/structure/types/manage/%/panelizer' is inaccessible.

damienmckenna’s picture

I've committed a fix for the small fubar, sorry for not testing that prior to committing it.

Status: Fixed » Closed (fixed)

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