Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When viewing an individual contact page (http://www.site.com/contact/John+Smith) the following error messages appear:
Notice: Undefined property: stdClass::$page_title in contact_forms_form_alter()
(line 134 of /home/x/drupal7/sites/all/modules/contact_forms/contact_forms.module).
Notice: Undefined property: stdClass::$page_info in contact_forms_form_alter()
(line 138 of /home/x/drupal7/sites/all/modules/contact_forms/contact_forms.module).
Using Drupal version 7.9
Comment | File | Size | Author |
---|---|---|---|
#6 | Missing_D6_D7_Upgrade-1359644-6.patch | 1019 bytes | JamesOakley |
Comments
Comment #1
behindthepage CreditAttribution: behindthepage commentedThis is probably happenning because you have a + in the url. You can only have a space, an underscore or a dash.
Regards
Geoff
Comment #2
ram0135 CreditAttribution: ram0135 commentedHi Geoff,
I tried replaced the "+" with a space, dash and underscore, all of which produced the same error message.
The contact form itself looks to generate properly and works as well, but the error message persists..
Any help would be greatly appreciated.
Thank you,
Ramon
Comment #3
behindthepage CreditAttribution: behindthepage commentedHi Ramon,
This is really weird. I haven't been able to replicate this with PHP and MySQL.
What version of PHP and what database are you using?
Regards
Geoff
Comment #4
behindthepage CreditAttribution: behindthepage commentedComment #5
JamesOakleyWell, I have just reproduced it, so it isn't just Ramon's site.
The problem is that the Contact Forms 6.x-1.x does not make any modifications to the Contact table. Contact Forms 7.x-1.x adds two additional columns, which are then removed upon uninstallation. If someone is migrating their site from Drupal 6.x, that installation routine never gets called. contact_forms.install needs up update_7001 function to add those extra columns. Without that, anyone who has installed Contact Forms 7.x-1.x by upgrading from D6 will get errors because the database is missing those columns.
Comment #6
JamesOakleyFor me, this fixed it.
Comment #7
behindthepage CreditAttribution: behindthepage commentedComment #8
JamesOakleyThanks @behindthepage
Out of interest, which commit fixed this issue? After working to resolve something, I'm always interested to have a look and see what the final solution was.
Comment #9
behindthepage CreditAttribution: behindthepage commentedHi James,
Actually this hasn't been fixed. I should have fixed this ages ago. Thank you for following it up.
commit 991a3faba66d75062c31bd15288d2418ee85b4c8
Issue #1359644 by JamesOakley,behindthepage: Added contact_forms_update_7000() to add D7 columns
I have added the code that you suggested and released a new version.
Thanks
Geoff
Comment #10
JamesOakleyThanks - all my sites are now running on D7, but I'm sure there are others still moving D6 sites over, and there'll be another batch when D8 is released. Good to have that one plugged!