When I try to use the "Flag Friend Links" in Panels I can't confirm the add to a pane. The popup for the configuration form comes up but there are no buttons and not title overwrite. I'm running the latest versions of Ctools (03/27) and Panels (03/28). I found those too error messages:

Warning: Parameter 1 to flag_friend_flag_friend_links_content_type_edit_form() expected to be a reference, value given in drupal_retrieve_form() (Line 771 von /Users/xxx/Sites/drupal/xxx/includes/form.inc).

"Theme „panels_edit_display_form“ not found."

Comments

Anonymous’s picture

I digged a bit more into this and found that the function:

<?php
function flag_friend_flag_friend_links_content_type_edit_form(&$form, &$form_state) {
  // Does nothing!
}
?>

needs to be modifed a bit to work:

<?php
function flag_friend_flag_friend_links_content_type_edit_form($form, &$form_state) {
  $settings = ctools_custom_content_type_get_conf($form_state['subtype'], $form_state['conf']);
  $form_state['settings'] = $settings;

  if ($settings['custom_type'] == 'fixed') {
    return $form; // no form for this case.
  }
}
?>

1. the $form is not a reference (as seen in ctools)
2 I added a default form that renders the title overwrite as well as the argument (borrowed from ctools)

Now the form gets rendered and it saves the values. What's missing is any rendering in the panel. That's what I'm checking right now.

Anonymous’s picture

Rendering works too. I missed the point that sending a friend request to myself is not the primary use case. ;)

Anonymous’s picture

Status: Active » Needs review
StatusFileSize
new1.61 KB

Here is a patch with my changes to the form.

Sylense’s picture

this patch worked for me using the latest dev (Jun 11). this should be committed

mikl’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new2.02 KB

Here’s a Git-formatted re-roll of #3. It does the exact same thing, but can be applied directly with git am, rather than patch -5 < file.patch.

I’ve tested this on a couple of installations, and it works great.

sirkitree’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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