Dont have the comment settings (open/closed) when I create a new page. On old pages there is still a comment area and possible to add comments but the comment settings in admin view is still gone. Tried to add a comment area by using the "Customize this page" button and click on comments and get an error message

CommentFileSizeAuthor
#18 Test_space__.jpg200.31 KBwaliur

Comments

Argus’s picture

Try reverting all features: https://drupal.org/node/582680

If the problem still exists after that please provide more info: which content type? Is this a virgin OA installation? If not, What changes did you make?

Niklas.G’s picture

Issue summary: View changes
Niklas.G’s picture

Thanks Argus for helping out

I use pantheon and they dont support drush 6.x (only 5.x) so the revert command dont seem to work.

Itś a virgin OA install with x numbers of upgrades from version 2.x. Dont know when comments stop working but it must have been after upgrading to 2.16, 2.17 or 2.18.

Any more ideas how to fix this?

Argus’s picture

Manually revert through the UI?

mpotter’s picture

Category: Bug report » Support request
Status: Active » Postponed (maintainer needs more info)

The command:

drush fra

should work fine in Drush 5 (using 5.8 here). Being able to revert features is a key part of upgrading open atrium, so you'll definitely want to learn how to do this, either via Drush or via the Features UI.

jkingsnorth’s picture

Status: Postponed (maintainer needs more info) » Fixed

Solutions have been offered and we haven't heard back so I'm marking this as fixed. Please reopen the issue if you require further support. Thanks.

socialnicheguru’s picture

I couldn't find comment settings on the section page.
I had to comment out the following:

/**
 * Implements hook_form_FORM_ID_alter().
 */
function oa_core_form_oa_group_node_form_alter(&$form, &$form_state, &$form_id) {
  _oa_core_hide_comment_settings($form);
}

Status: Fixed » Closed (fixed)

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

adiaaira’s picture

Version: 7.x-2.18 » 7.x-2.19

i just wanted to share what worked for me as an additional option to anyone else that may be having this problem.

i solved it by changing 'FALSE' to 'TRUE' on line 1037 in oa_core.module (/profiles/openatrium/modules/contrib/oa_core/oa_core.module)

Before:

 1032 /**
 1033   * Alters a node edit form to hide comment settings.
 1034   */
 1035 function _oa_core_hide_comment_settings(&$form) {
 1036    if (isset($form['comment_settings'])) {
 1037      $form['comment_settings']['#access'] = FALSE;

After:

 1032 /**
 1033   * Alters a node edit form to hide comment settings.
 1034   */
 1035 function _oa_core_hide_comment_settings(&$form) {
 1036    if (isset($form['comment_settings'])) {
 1037      $form['comment_settings']['#access'] = TRUE;

i attempted "drush fra" first (with no success), not sure if that had an impact on this working.
i only came across "$form['comment_settings']['#access'] = FALSE;" because i was looking for where to make the changes SocialNicheGuru suggested, and had to search my whole folder for "hide_comment_settings"

i hope this is helpful.

socialnicheguru’s picture

Status: Closed (fixed) » Needs review

The fix in #9 worked for me.
There is a fix but no patch.

jkingsnorth’s picture

Status: Needs review » Needs work

The solution in #9 might 'fix' this but the approach isn't very logical: You would have a function called 'oa_core_hide_comment_settings' that shows the comment settings. Comment #7 is a more logical solution, but it is still a hack.

You would be better off writing your own module/code to show the desired comment settings form on the node types you want to show it on.

socialnicheguru’s picture

@John, how do I write a function to override an override?

So if I write my_module_form_oa_group_node_form_alter to address the comments issue how does it override function oa_core_form_oa_group_node_form_alter?

Do I have to manipulate the weights of each?

hosais’s picture

I made a simple test. A clean new installation of oa2 will have this error. I suppose that oa2 needs to solve the problem, and I think it is a bug.

@SocialNicheGuru Yes. Weights of each module would need to take care of.

This module will do: https://www.drupal.org/project/modules_weight
Or use hook_module_implements_alter()
https://api.drupal.org/api/drupal/modules%21system%21system.api.php/func...

hosais

hosais’s picture

Category: Support request » Bug report
freakanika’s picture

This issue seems similar to this one: https://www.drupal.org/node/2345265 perhaps they should be combined?

Argus’s picture

adamtyoung’s picture

I am having this problem with a new content type that I am trying to add to the section context. The view does not seem to be panelizing properly.

waliur’s picture

StatusFileSize
new200.31 KB

I too am having the same issue as the original poster of this thread. However I am hosting with Acquia Cloud and have a local DevDesktop environment and get the same issue with both when trying to add/enable comment functionality to a "Space" or to a "Discussion" within a space. I have tried using a fresh installation of both "7.x-2.26" & "7.x-2.30-rc3"

I tried the suggested fix in #9 but no luck.

See attached screenshot

waliur’s picture

Steps to quickly & easily reproduce the issue:

  1. Download DevDesktop (i'm using Mac)
  2. Create a "New Drupal site" and choose Open Atrium from the list of Drupal distributions
  3. Create a "Space"
  4. Go into the new "Space"
  5. Click "Customise this page"
  6. Click on one of the "plus" signs to add a new Pane
  7. Click on "Comment" on the left hand side to try and enable comments
  8. You will see this error
hefox’s picture

Title: Comments not working » Support core comments
Category: Bug report » Support request
Status: Needs work » Active

Please see the link for what statuses mean -- needs review/needs works need a patch generally.

Argus’s picture

Category: Support request » Feature request
Issue summary: View changes

Currently OA doesn't support Drupal comments. So this is a feature request, right?

hefox’s picture

Aye, not sure why I clicked support. Thanks

mpotter’s picture

Status: Active » Fixed

Just to clarify for people: The "fix" in #9 does not work.

Sites need to decide why they need comments. In Open Atrium we use Discussion Posts & Replies rather than comments. They are more secure and less subject to spam. In 2.30 you can add a "related discussion" to any node, including spaces, sections, etc. This allows comment-like functionality for spaces.

Enabling the Drupal comments will require custom code to override the hooks in OA that hide the comments. You also need to enable comments on the content-types themselves. This setting will need to be saved to a Feature Override to prevent it from getting reset everytime you revert features during an Atrium upgrade.

The specific error issue with clicking on the Comments tab in the Panelizer add-content + menu is that it will error if you don't have comments enabled and Panopoly widget previews are enabled. Panopoly is trying to render the Drupal Comment Reply form, but in ctools if the content-type->comment setting doesn't have comments allowed it generates an error and tries to redirect back to the node page. Basically, the comment form wasn't really designed to be "previewed" like this. This is a panelizer/ctools/comments issue and not something to be fixed in OA2. Once you have comments enabled on a content type then you should be able to use the Comments widget.

Do turn off Panopoly previews, go to admin/panopoly/settings/panopoly_magic and set the "Enable previews when adding panes" to Disabled.

Status: Fixed » Closed (fixed)

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

pjohn’s picture

@mpotter, can you elaborate on which hooks in OA can be overridden to show core comments? Where are they located?

mpotter’s picture

Please do not reply to really old issues like this which are closed. Core comment support was added to v2.4x of Open Atrium, so this issue is no longer relevant.