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

CommentFileSizeAuthor
#6 Missing_D6_D7_Upgrade-1359644-6.patch1019 bytesJamesOakley
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

behindthepage’s picture

This is probably happenning because you have a + in the url. You can only have a space, an underscore or a dash.

Regards
Geoff

ram0135’s picture

Hi 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

behindthepage’s picture

Hi 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

behindthepage’s picture

Status: Active » Closed (cannot reproduce)
JamesOakley’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
Priority: Normal » Major
Status: Closed (cannot reproduce) » Needs work

Well, 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.

JamesOakley’s picture

Status: Needs work » Needs review
FileSize
1019 bytes

For me, this fixed it.

behindthepage’s picture

Status: Needs review » Closed (fixed)
JamesOakley’s picture

Thanks @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.

behindthepage’s picture

Hi 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

JamesOakley’s picture

Thanks - 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!