Closed (fixed)
Project:
Party
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Jul 2012 at 15:42 UTC
Updated:
17 Jul 2012 at 18:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
rerooting commentedThis actually works for me, kinda. It creates a new fieldset for every attached user. Not sure why. But it seems to work (after the other user entity attachment patch you just made), only error messages I get are related to username label plugin.
Comment #2
joachim commentedWeird.
I get:
Are you adding a user at party/1/user/add?
Comment #3
joachim commentedI suspect that part of the problem is that party_attached_entity_edit_form() is based on the idea that you are either:
- attaching and creating a new entity
- editing an existing attached entity
Whereas what we want here is:
- attach an existing entity
Comment #4
rerooting commentedHuh, i dont get a party/1/user/add uri...
I am at party/2/party/edit which presents the form above.
If it helps, I am using the #1612368: Clean up old controller uses #9 patch and not the commit? The last commit in my log is
Issue #1644336 by andrewbelcher: Fixed party_user for removal of party bundles.. I patched using the #9 mentioned and have been working from that, created a fresh install based on testing that patch.Comment #5
joachim commentedMy suspicion therefore is that we need to know that sometimes party_attached_entity_edit_form() is in the 'attach existing' case instead of 'attach new'.
And that this distinction is a property of the *data set*. Ie, if you're working with users, you're attaching one rather than creating one. Though I can see a case for an admin creating new user accounts...arg.
So okay, it's a property of the data set that you can have the 3rd action available. (Because for P2, you can't.)
Does that seem to make sense?
Comment #6
joachim commentedOr really, attaching existing should be a whole other form from party_attached_entity_edit_form(), because it's based on finding something exsting so will need different fields.
So data sets need to say:
- ui for attaching existing?
- ui for creating new?
Comment #7
joachim commentedAh, I see this idea is in party_user_form_user() (which is the data set form callback -- see #1669942: clean up (or at least document) nests of forms for an explanation!)
Could do to be moved further up I think.
Comment #8
rerooting commentedYes, i think it makes alot of sense. Use cases abound.
Attach new is not available though. It would be nice to allow a toggle between attach existing and attach new - say with a combo box.
Quick sketch:
[ Existing User [V]]
[ Autocomplete Field O ]
(switch combo option, AJAX form update)
[ New User [V]]
[ Text Input Field ]
Comment #9
rerooting commentedOk I have a better idea, wireframing....
Comment #10
joachim commentedLet's leave AJAX stuff for another day...
I'm not sure what you're seeing that's different. You probably need to clear caches a few times; I made some changes today. Regarding patches -- best is to be on HEAD.
Comment #11
joachim commentedIt looks like we get to PartyDefaultDataSet::Save() TWICE for the user data set, setting the correct user ID the first time and then clobbering it with NULL the second!
Comment #12
joachim commentedFinally got it.
Saving in party_user_form_user_submit() isn't needed; rather, we should be dosing up the form state so the central party_attached_entity_edit_form_submit() can take care of it.
Comment #13
joachim commentedFollow-ons:
#1669980: party_view_data_set() broken
#1669982: Data Set Actions System
Comment #14
rerooting commentedWorks fine
Comment #15
rerooting commentedWorks fine
Comment #16
rerooting commentedoops shoulda looked at the commit log already been committed. yeah it works!
Comment #17
rerooting commentedOn a fresh install, with the latest 7.x-1.x branch (includes commit of patch #12 above), I get this error when adding a party:
Specifically this happens when I refer to a user that does not already exist at party/add. It looks like it tries to create user 1 again?
FYI I only have party and party_user enabled.
Comment #18
rerooting commentedOk actually, it doesnt work with existing users either.
Same error output:
Note that this is all happening on add/party. This was 'kind of' working before the latest commit, with the funny output above.
Comment #19
rerooting commentedBy the way, I can find the uri you were talking about above, e.g. party/1/user/add which looks the same as the form on pary/1/edit. Submitting that form does attach the specified existing user, however the immediate result is a WSOD with a label related error message
Notice: Undefined property: stdClass::$delta in party_view_data_set() (line 360 of [..]/party/party.pages.inc).which is different from when I add or register users, which displays that error as a status message after returning to /admin/community.Also, worth nothing that party/1/edit form still looks like the screenshot above. Am I missing something? This is on my fifth fresh install (thank bejeezus for drush si!). Remember I only have party and party_user installed, so possibly that factor could explain it. It's good to see that /user/add works (despite label plugin issues) but I don't see how in the UI someone would get there as it looks with a fresh install.
Comment #20
joachim commented> however the immediate result is a WSOD with a label related error message Notice: Undefined property: stdClass::$delta in party_view_data_set()
Yup, that's the follow-on bug.
The edit form is totally broken on my install, from before I started tinkering with stuff.
Comment #21.0
(not verified) commentedUpdated issue summary.