Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I get this:
Fatal error: Call to undefined function contact_site_page() in /.../modules/contact_form_on_node/contact_form_on_node.module on line 149
and this:
Notice: Undefined variable: enabledTypes in contact_form_on_node_node_view() (linea 141 di /....../modules/contact_form_on_node/contact_form_on_node.module).
after installing the module and trying to view a page node..
I set the module to display a site-wide contact form on a node (full view)
Comment | File | Size | Author |
---|---|---|---|
#5 | contact_form_on_node-make_module_work_wD7-1140114-5.patch | 12.39 KB | oadaeh |
Comments
Comment #1
franravi CreditAttribution: franravi commentedcontact_site_page() function no longer exists in contact module, for drupal 7. I suggest to call drupal_get_form('contact_site_form') instead.
About $enabledTypes, it just happens that this value is being assigned for only one case inside a switch, I suggest moving it out so it is available for all others. Check line 112 of contact_form_on_node.module to see what I am speaking about.
I am sorry I don't know how to write a patch for this, but even so, I am just suggesting where the problem may be. I hope this will be helpful.
Comment #2
liveflow CreditAttribution: liveflow commentedI have the same problem. WSOD after loading the node with contact form.
"Undefined variable: enabledTypes in contact_form_on_node_node_view() (linea 141 ..."
Add string "$enabledTypes = array();" in line 99 after function description.
Comment #3
Khumbu CreditAttribution: Khumbu commentedanyone has a solution for this, can't seem to figure this one out...
thx
Comment #4
KirstenLangholz CreditAttribution: KirstenLangholz commented@franravi
You suggestion at least let's us see the node, but no form anywhere....
Comment #5
oadaeh CreditAttribution: oadaeh commentedSince this is the oldest issue that I believe is relevant, I'm posting here.
Attached is a patch that makes the 7.x-1.x version of this module with with Drupal 7.
It might apply to the 7.x-1.1 version, since it's mostly the same.
Comment #6
oadaeh CreditAttribution: oadaeh commentedUpdating title.
Comment #7
oadaeh CreditAttribution: oadaeh commentedMarked
as duplicates of this issue.
Comment #8
royerd CreditAttribution: royerd commentedThe line of code:
at the end of the node.tpl.php file works to get the form to appear at the bottom of the proper nodes, but it does not allow the option to "display link" only. Can that be fixed so that this will work (fully) in D7?
Comment #9
Metasequoia CreditAttribution: Metasequoia commentedI can't get this module to work with D7 (D7.15). No user's contact form below the designated content types... The patch from #5 is not working (error: patch does not apply) and with the solution in #8 I had no success, too.
Can someone who got this working explain the neccessary steps?
Comment #10
F8LERROR CreditAttribution: F8LERROR commentedThis is the error I get. Below is the line in question (114):
my coding skills are VERY rusty to say the least, please any help is greatly appreciated.
Comment #11
oadaeh CreditAttribution: oadaeh commentedThere is now a public dev release that includes the patch I attached in #5 (and some other fixes and updates). Check it out and let me know what doesn't work.
I'll give it a few weeks, then I'll create a new stable release.
Comment #12
Khumbu CreditAttribution: Khumbu commentedDid a quick test on a dev site and played with the settings.....everything seems to work.
Thanks and keep up the great work :)
Comment #13
espirates CreditAttribution: espirates commentedI tried both the dev and regular release and neither is showing up in Drupal 7
Comment #14
oadaeh CreditAttribution: oadaeh commented@espirates, you will need to provide more information than that, if you want any help.
There are some guidelines, here: https://drupal.org/node/73179 (especially in the Issue Details section).
Comment #15
oadaeh CreditAttribution: oadaeh commentedIt's been way more than a few weeks, but I've finally created a new stable release. Version 7.x-1.2 is now available.
Comment #16
oadaeh CreditAttribution: oadaeh commentedI missed an issue. Version 7.x-1.3 is now available.