When creating a user edit context from a user object (for example on the account view page), the user_category_edit_form_from_user relationship plugin fails to either provide a default category or allow one to be set on the relationship. Instead, it requires that one is set on the user object ($context->data->user_category), and if it is not, the relationship silently fails. This property will only ever be set by page manager on user/*/edit pages, meaning that this relationship will fail everywhere else.

Attached patch lets the relationship work on all pages (defaulting to the account category), and lets you override the category in a configuration form.

CommentFileSizeAuthor
ctools-user_edit_relationship.patch1.79 KBrbayliss
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Bram Tassyns’s picture

Issue summary: View changes

Any reason why this hasn't been commited so far?

asherry’s picture

Status: Needs review » Reviewed & tested by the community

This works great for me, the relationship is honestly pretty useless without this patch seeing as though you could just as easily override the profile form with the core url by using pm_existing_pages.

This patch was the only way I could put it on a custom url.

I'm going to go out on a limb and set this to RTBC.

rbayliss’s picture

I just hit this bug, googled it, and was surprised to find this old issue with my patch from above. Can we get this committed? It still applies.

mpgeek’s picture

I'm using this patch in a builds today. Really close to 3 years reviewed and teted. Did this one get missed somehow?

mpgeek’s picture

I'm using this patch in builds today. Really close to 3 years reviewed and teted. Did this one get missed somehow?

rivimey’s picture

Original patch applies cleanly to 7.x-1.x.

Patch code looks good and has been tested by multiple people.

I realize there aren't many, but I've run the patch through the existing simpletests and it passes them all.

  • japerry committed 313d9bd on 7.x-1.x authored by rbayliss
    Issue #2087105 by rbayliss: user_edit_form relationship does not work on...
japerry’s picture

Status: Reviewed & tested by the community » Fixed

Easy fix. Committed.

Status: Fixed » Closed (fixed)

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