Closed (fixed)
Project:
Entity API
Version:
7.x-1.x-dev
Component:
Core integration
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Feb 2013 at 00:29 UTC
Updated:
3 Apr 2014 at 17:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jeff h commentedTested and working fine here.
Any maintainers got a few minutes to roll this patch in?
Comment #2
alexander allen commentedI created a manual test by calling
drupal_get_form('user_register_form');andentity_metadata_form_user($user);separately, and running a diff between the resulting form arrays.The first big difference that I noticed is that when the profile2 module is enabled, it attaches it's own form api callbacks to the form's #validate and #submit parameters:
Example:
User Register form:
User Profile form:
The second big difference was that on the user register form, a profile2 entity got attached to the form under the profile_main key.
This means that integration with Entity API is broken for Profile2 users because they don't get profile entity fields attached to the anonymous user form - at least for this use case.
Example attached profile2 entity:
Other minor changes include:
- User profile form (user_profile_form) shows Time Zone options, registration form (user_register_form) does not.
- Form submit button on user_register_form reads: "Create new account".
- Form submit button on user_profile_form reads: "Save"
Based on this test, committing that patch would be at least beneficial for Profile2 users. But I can see how it's probably affecting any module that depends on the
entity_metadata_form_userfunction.I've attached a small file with an "informal" test case.
Comment #3
alexander allen commentedRe-rolled patch against a clean Entity API 7.x-1.x-dev. Lines changed from @@ -873,10 to 899, no conflicts.
Comment #4
alexander allen commentedMarking as RTBC.
Comment #5
fagoUnnecessary whitespace.
Comment #6
sonictruth commentedHow's this?
Comment #8
sonictruth commentedOops. This should be better.
Comment #9
fagoThanks, committed.
Comment #10
fago