Contact_Form Broken on Submit

Testing my contact form - filling out the required fields and then hitting submit causes the following error to appear

Fatal error: Call to undefined function getparentpages() in /home/lensfra1/public_html/zenphoto/zp-core/plugins/zenpage/zenpage-template-functions.php on line 2261

Has this been seen before, and I am just searching for the wrong thing? I can not find this problem anywhere, nor the fix for it.

Comments

  • acrylian Administrator, Developer
    Which theme did you use, zenpage default? Actually the contact form does not use that function but the page menu in that theme does. That function is defined in `zp-core/plugins/zenpage/zenpage-functions.php` and should be available. Anyway, I will took a look at that.
  • zenpage-default, the css has been recolored to my liking.

    you can take a look at the site i'm building - here is a direct link to the contact form:

    http://www.lensframe.com/zenphoto/pages/contact-form
  • Should there be some includes of some sort at the top of the form.php page? As it is now, I see no includes which could be attributing to the problem.
  • acrylian Administrator, Developer
    No, actually not, the form.php is included within the contact_form plugin file. I had no chance to take a look at this issue, but I will soon try to reproduce it. Last time I tried it worked..
  • Any luck on reproducing the error?
  • Just curious, is there any particular reason for embedding the contact form in a zenpage page? From the looks of it you could just as easily place it in a separate script and make that scrupt look like what you have. Probably just copy the index.php script, remove the album stuff and insert the `printContactForm()` in its place.
  • Just to see how hard this would be to do I have implemented the contact form for Zenpage-default in the development stream. Available in tonight's build. There is a new script--`contact.php` and some changes to `sidebar.php` These two files are compatible with the base 1.2.5 release. Other changes to the theme might not be, though, so use just those two files.

    The change places the contact link in the sidebar. If you want it somewhere else, then you do not need `sidebar.php`.
  • acrylian Administrator, Developer
    That is the actually intended way. The codeblocks each Zenpage pages or articles has are meant to be used to include extra functions like the contact_form. Of course the page must have that codeblock # on its pages.php page.

    Right now Zenpage-default has codeblock #1 right below the actual page content. That way you can manage your contact page via the Zenpage backend as a normal page and add other data like a real adress or an about text. An extra page in my opinion is a little against the concept of Zenpage. This worked for me the last time I tried.
  • Using the contact.php that sbillard added it still generated the same error. Any other ideas?
  • acrylian Administrator, Developer
    Is the sendmail extension installed on your server? It does work on my server without any error. The function you get an error does not have anything to do with the contact form actually..
  • I get this error message on my site as well. I talked to tech support at my hosting company and they said sendmail was configured on my server with no problem. I don't think this is a problem with the contact form though, it looks to be a problem in the breadcrumb links (as that's where the call to the "undefined function" is being made).

    To fix this, I just took out the call to the ParentPagesBreadcrumb function in the breadcrumb div on the pages.php page in my theme folder:
    `<?php if(!isset($ishomepage)) { printParentPagesBreadcrumb(" » ",""); } ?>`
  • acrylian Administrator, Developer
    I have not seen that on any of my installations. That function is a normal Zenpage function and I don't know how that could be undefined. We will investigate that.
  • I second Arduino's findings. If I comment out the line specified my contact form starts working. However when you hit submit it does not fully render the confirm page. The confirm button is visible, works, and sends the mail, however the remainder of the page is broken.

    Under where the Menu block would normally be the following error is displayed:
    Fatal error: Call to undefined function getpages() in /home/lensfra1/public_html/zenphoto/zp-core/plugins/zenpage/zenpage-template-functions.php on line 2297
  • I've repaired the page by excluding the breadcrumb, and making it automatically confirm and redirect to the gallery page. While I would love to see a proper fix, my workaround will have to do for now as the site has been live for a month with no contact form.
  • Please refresh the data on this problem:

    arduino is commenting out a line on the pages.php script of zenpage-default. That would indicate that he is not using the contact.php script implementation. Is that the case for you?

    If so, please describe exactly the implementation you have made.
  • Correct, I am still using the codeblock implementation.
  • You should upgrade to the nightly build. There was a problem with how zenpage loaded some scripts that is probably the root cause of this issue.
  • Fotos Member
    Thanks, the actual nightly build works.
Sign In or Register to comment.