Hi, thanks a lot for this work

I tested it in OA beta 7 and beta 8. Installing the module, patching the mark module and enabling the og_privacity_atrium with drush.

when i click to add a post in a blog, for example (group/node/add/blog) I have a white screen and this error in the apache log:

PHP Fatal error: Call to undefined function mark_remove_mark_from() in /var/www/atriumb8/sites/all/modules/og_privacy/features/og_privacy_atrium/og_privacy_atrium.module on line 80

it also happens with other content types of the OA features.

the problematic line is in the hook form alter (marked with an arrow):

/**
* Implementation of hook_form_alter().
*/
function og_privacy_atrium_form_alter(&$form, &$form_state, $form_id) {
if ($form['#id'] != 'node-form') {
return;
}

$space = spaces_get_space();
if (!og_is_group_post_type($form['#node']->type) || $space->group->og_privacy != OG_PRIVATE_GROUPS_ALWAYS) {
------> mark_remove_mark_from_from($form, 'og_privacy_atrium_public_node', 'node', $form['#node']);
return;
}

_og_privacy_atrium_add_privacy_guidance_form($form);
_og_privacy_atrium_apply_group_form_settings($form);

if (!empty($form['mark'])) {
$mark = $form['mark']['og_privacy_atrium_public_node'];
mark_remove_mark_from_form($form, 'og_privacy_atrium_public_node', 'node', $form['#node']);
$mark['#parents'] = array('mark', 'og_privacy_atrium_public_node');
$form['spaces']['mark']['og_privacy_atrium_public_node'] = $mark;
}
}

thanks a a lot.

Comments

Grayside’s picture

Wow, good catch. Not sure how that got by me. I will be working on this module more tomorrow, and this fix will be the first thing I put in place.

Grayside’s picture

Status: Active » Postponed (maintainer needs more info)

Are you saying it's a typo, or a WSOD because of the function itself?

I'm not seeing the double 'from' you explain in "mark_remove_mark_from_from".

lloydpearsoniv’s picture

Version: 6.x-1.0-alpha1 » 6.x-1.0-alpha2

I am using alpha2 & i tired the dev snapshot and i get the same error except this time its on the dev snapshot, it says

Fatal error: Call to undefined function mark_remove_mark_from_form() in /var/aegir/platforms/atrium/atrium-1-0-beta9/sites/all/modules/og_privacy/features/og_privacy_atrium/og_privacy_atrium.module on line 88

on the alpha2 it says line 82

gberm’s picture

Same Problem.

Any suggestions how to fix it?

eileen’s picture

Same problem. When I clicked "create group" for the first time, I got this fatal error. Has it been resolved yet?

I don't see a double "from" like the OP does, but I can't find any function called "mark_remove_mark_from_form" either.

This is the error:

Fatal error: Call to undefined function mark_remove_mark_from_form() in .... /html/sites/all/modules/og_privacy/features/og_privacy_atrium/og_privacy_atrium.module on line 82

And line 82:
mark_remove_mark_from_form($form, 'og_privacy_atrium_public_node', 'node', $form['#node']);

eileen’s picture

Priority: Normal » Major
Status: Postponed (maintainer needs more info) » Needs review

(changing status)

Grayside’s picture

Status: Needs review » Active

Needs Review is for issues with potentially working patches.

Setting this to active. I do not currently have time to investigate this issue, so do not expect this to be resolved soon unless someone else comes forward.

eileen’s picture

Priority: Major » Normal
Status: Active » Needs review

Thanks for the reply, Grayside. This module is great work and I appreciate your responsiveness. And, I have some good news.

I discovered the problem was the mark.module patch. I applied the patch by hand because terminal was giving me hell, and now I see why. The patch linked in your README.txt file is old.....and the instructions in the README.txt file are a little off, too. I should have paid closer attention to details!

README currently says:

In addition to all standing requirements for og_privacy_atrium, you must use a patched version of the Mark module. http://drupal.org/files/issues/mark.868764-5.patch

Apply this patch by downloading it to the directory of the Mark module, and, from within that directory, running:
`> patch < mark.868764-4.patch`

I made the mistake of cutting and pasting the patch command "mark.868764-4.patch" without noticing it wasn't the same file I downloaded - "mark.868764-5.patch" (see the -5 vs. -4?)

The patch that currently works is #6, and it's discussed here: Patch to mark.module for feature og_privacy_atrium and the working patch is here: mark.868764-6.patch

So, it was a comedy of errors. My bad. I hope this post saves somebody else an afternoon of agony....