The Primary Links patch brought to light that we're not initializing any of the content that the menu items are pointing to. This issue is about auto-populating the contact form.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 143806_dot_contact_form_3.patch | 4.09 KB | aclight |
Comments
Comment #1
webchickNot sure why this doesn't work, but it should be pretty close:
Comment #2
sirkitree commentedanyone ever figure this out? I'm trying something similar, using macro module to try and create categories and change settings, but it looks like contact module does some arg() checking in the _submit handler and that is why the INSERT is not happening.
Comment #3
aclight commented@sirkitree: Thanks for the information.
Attached patch successfully creates contact information and is based on webchick's code in comment 1. It gets around the problem in contact_admin_edit_submit() by doing direct db manipulation. I wrote an extensive comment about why it's necessary and also noted that I don't believe this will be necessary in the D6 version of the profile, as it looks like contact_admin_edit_submit() no longer uses arg().
Those of you with eagle eyes and who read the messages after installation might notice that the following looks a bit weird:
Mainly that the contact is updated before it is added. This again is due to the strange behavior in contact_admin_edit_submit(), and the call to drupal_set_message() that says a contact has been updated isn't dependent on the contact actually being added in the db_query() call in the line above.
I don't think there's any way around this unless we go without calling drupal_execute() at all in the D5 version of the profile. Personally, I would say to just live with those messages looking a bit strange for now.