Running Drupal 7.8, PHP 5.2
After enabling module, receive error:
DatabaseSchemaObjectExistsException: Table contact_fields already exists. in DatabaseSchema->createTable() (line 652 of /home/alguire/public_html/includes/database/schema.inc).
Then, upon visiting the manage fields tab I get 12 errors, including:
Notice: Undefined index: #title in _set_core_fields() (line 361 of ... /sites/all/modules/contrib/contact_field/contact_field_admin.inc).
Notice: Undefined index: #required in _set_core_fields() (line 367 of ... /sites/all/modules/contrib/contact_field/contact_field_admin.inc).
Comments
Comment #1
beautifulmindHello,
Thank you for your concern and using the module.
If you have checked with the release note, its advised that not to use this release. You can examine the code, howerver.
Regards.
Comment #2
freeform.steph commentedThanks for the quick response - indeed I should have read the notes first!
Comment #3
jonathan_hunt commentedI ran into the same error above.
Some suggestions:
1. Remove unnecessary @author attributions for each function.
2. Add useful documentation regarding each function rather than restating the function name.
3. Adhere to Drupal code standards (e.g. whitespace, no tabs, etc.)
4. Many variables seem to have meaningless prefixes, e.g. ss__, am__ etc. For example, _get_fields() makes more sense if $om__result is renamed to $field and $am__settings is renamed to $field_settings.
5. Be careful with your function naming. Names like _get_fields() way too generic IMHO and will result in collisions if other modules are also loose with naming. Use _contact_field_get_fields() or similar to avoid polluting global namespace.
6. Operations link paths should map to admin/structure/contact/ instead admin/build/contact/
Some changes:
a. t() is default title callback so you don't need to specify it.
b. I suggest suffix any form definition functions with form (e.g. contact_field_form)
c. Run the form through a theme function - do your table-based layout in the theme function (see menu_overview_form and theme_menu_overview_form and refer to http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_ad... where it is recommended that this functionality be added via the theme layer)
d. db_result() is not available in D7.
I started delving into the code but found so many issues with the Drupal 7 version that I'm considering writing my own version of this module. Do you have any specific timeframe for completing the Drupal 7 port?
Comment #4
beautifulmindThanks for your suggestion and consideration.
As you can see, the module is under development, and its not suggested to use the current devlopment release in 7.x branch. So, when there is a stable version in this branch, its likely that all the current issues would have been fixed.
Regards.
Comment #5
hershel commentedThis line:
Should be:
HTH
Comment #6
beautifulmindPlease note that the portin is underway, and there are lots of issues. Pointing out one by one will only make this thread longer. You can post your issues once there is a stable release.
Regards.
Comment #7
summit commentedHi,
Is this module maintained on D7?
I got still the same errors:
Is there may be an alternative for D7? How to proceed adding fields to side wide contactform on D7?
Thanks a lot in advance for your reply!
Greetings, Martijn
Comment #8
beautifulmindYes, the module is maintained and is under development. But the development process is slower than 6.x branch. I have been making lot of changes to this module. There will be a stable release soon.
I appreciate your co-opration and using the module.
Regards.
Comment #9
summit commentedHi Beatifulmind, glad to hear!
Looking forward to stable release. So not investigating alternatives.
greetings,
Martijn
Comment #10
beautifulmindHello,
The stable release in 7.x branch will be published after Diwali.
Regards.
Comment #11
szt commentedHi,
actually it's a very long Diwali... :)
I'd like to test the 7.1-1.0! ;)
Comment #12
tefnut commentedHi, I really need this to, can you hurry up and fix it?
Many thanks X
Comment #13
Nick Robillard commentedI just upgraded my d6 site to d7 and sadly this is still not usable. :( I have not seen any progress lately so I will have to abandon this module and do this manually. Too bad.
Comment #14
drupalina commentedSeriously! When is this module going to be available in D7 in any working condition?
I've got a client who absolutely insists that that the contact form should have a simple "Your Telephone" text field. And there is no other way to add that field but use this module (which doesn't work at all.)
Comment #15
szt commentedSince the module really unusable, bumping to critical...
Comment #16
kenorb commentedThe same problem here.
Enabled contact_listfield for the first time:
Comment #17
kenorb commentedComment #18
kenorb commentedComment #19
kenorb commentedAnd 2nd patch with proposed changes by jonathan_hunt in #3.
Comment #20
kenorb commentedCommitted the proposed fixes and many other into my fork.
Please consider merging them.
Comment #21
kenorb commented