WordPress.org

Ready to get started?Download WordPress

Forums

Grunion Contact Form
Fatal error: Call to undefined function akismet_http_post() (18 posts)

  1. Clifford Paulick
    Member
    Posted 3 years ago #

    I got this error on my test site (which has search engines blocked and doesn't have Akismet installed):

    Fatal error: Call to undefined function akismet_http_post() in /home/username.../test.cliffpaulick.com/1/wp-content/plugins/grunion-contact-form/grunion-contact-form.php on line 497

    This was my code:
    [contact-form to="to1@email.com,to2@email.com,to3@email.com" show_subject="yes"]

    I also tried this and got the same error:
    [contact-form to="to4@email.com" show_subject="yes"]

    NOTE: email addresses changed (i.e. not actually what I entered in my code)

    P.S. I didn't see any "Settings" page within the backend.

    Thanks for this plugin. I'm hoping to get it working soon! :)

  2. Doug
    Member
    Posted 3 years ago #

    Are you absolutely sure that you don't have Akismet active? contact_form_init() registers a filter that fires if akismet_http_post() exists, i.e. Akismet is present and active.

    Please do the following (assuming you're using a *NIX box):

    1. cd to the root of your WP install
    2. Run "grep -R akismet_http_post *"
    3. Report back with the results.

    Thanks!

  3. Clifford Paulick
    Member
    Posted 3 years ago #

    Before I wrote this, I made sure Akismet was neither active nor inactive. I also tried this plugin on another domain (both hosted by DreamHost) that definitely has Akismet active. I got the same error message...

    Let me know if you still want me to do your instructions; however, I won't be able to do that until later.

    Thanks.

  4. Doug
    Member
    Posted 3 years ago #

    It works just fine on my DreamHost accounts.

    Let's see what the grep turns up. You don't have Akismet in wp-content/mu-plugins by any chance?

  5. Joseph Scott
    Member
    Plugin Author

    Posted 3 years ago #

    I was able to re-produce this on my test WP install of -trunk. When the Akismet plugin is deactivated I get that same error when the form is submitted. When the Akismet plugin is activated the form submission works fine.

    I'll dig into this and see what is going on.

  6. Joseph Scott
    Member
    Plugin Author

    Posted 3 years ago #

    Found a spot where we weren't checking to see if Akismet was available or not. I've committed a fix, so it will be taken care of in the next version.

    If you can't wait until then you can see what I changed at http://plugins.trac.wordpress.org/changeset/325516

  7. Clifford Paulick
    Member
    Posted 3 years ago #

    From the WP Install that doesn't have Akismet ACTIVE (although it is INACTIVE) in the list of plugins -- sorry for the error in the initial post.......

    [servername]$ pwd

    /home/username/test.cliffpaulick.com/1

    [servername]$ grep -R akismet_http_post *

    wp-content/plugins/grunion-contact-form/grunion-contact-form.php: $response = akismet_http_post( $query_string, $akismet_api_host, '/1.1/comment-check', $akismet_api_port );

    wp-content/plugins/grunion-contact-form/grunion-contact-form.php: $response = akismet_http_post( $query_string, $akismet_api_host, '/1.1/submit-'.$as, $akismet_api_port );

    wp-content/plugins/grunion-contact-form/grunion-contact-form.php: if ( function_exists( 'akismet_http_post' ) )

    wp-content/plugins/si-contact-form/si-contact-form-process.php: if($si_contact_opt['message_type'] != 'not_available' && $message != '' && function_exists('akismet_http_post') && get_option('wordpress_api_key') ){

    wp-content/plugins/si-contact-form/si-contact-form-process.php: $response = akismet_http_post($query_string, $akismet_api_host, '/1.1/comment-check', $akismet_api_port);

    wp-content/plugins/si-contact-form/si-contact-form-process.php: } // end if(function_exists('akismet_http_post')){

    wp-content/plugins/akismet/admin.php: $response = akismet_http_post($query_string, $akismet_api_host, "/1.1/submit-ham", $akismet_api_port);

    wp-content/plugins/akismet/admin.php: $response = akismet_http_post($query_string, $akismet_api_host, "/1.1/submit-spam", $akismet_api_port);

    wp-content/plugins/akismet/admin.php: $response = akismet_http_post($query_string, $akismet_api_host, '/1.1/comment-check', $akismet_api_port);

    wp-content/plugins/akismet/akismet.php: $response = akismet_http_post("key=$key&blog=$blog", 'rest.akismet.com', '/1.1/verify-key', $akismet_api_port, $ip);

    wp-content/plugins/akismet/akismet.php:function akismet_http_post($request, $host, $path, $port = 80, $ip=null) {

    wp-content/plugins/akismet/akismet.php: $response = akismet_http_post($query_string, $akismet_api_host, '/1.1/comment-check', $akismet_api_port);

    wp-content/plugins/akismet/akismet.php: $response = akismet_http_post($query_string, $akismet_api_host, '/1.1/comment-check', $akismet_api_port);

    [servername]$

  8. Clifford Paulick
    Member
    Posted 3 years ago #

    I don't have MU.

    I will reiterate that I had the same error at another WP install (same server) that has Akismet active and working:

    I just tried it again and got this:

    Fatal error: Call to undefined function akismet_http_post() in /home/username/domain.com/wp-content/plugins/grunion-contact-form/grunion-contact-form.php on line 497

  9. Clifford Paulick
    Member
    Posted 3 years ago #

    Anyone out there, now that the holidays are over?

    Thanks.

  10. Joseph Scott
    Member
    Plugin Author

    Posted 3 years ago #

    This should be fixed in the development version of Grunion, so the next release will address it.

    If you want to try out the development version you can get the files from https://plugins.svn.wordpress.org/grunion-contact-form/trunk/ - but standard bleeding edge development warnings apply - it might blow up your tv, make your lawn turn brown or not work at all.

  11. Clifford Paulick
    Member
    Posted 3 years ago #

    Well, it didn't work on an install with Akismet or even without. Not sure what my issue was.

    I tried your update on the site with Akismet active and it still didn't work. I now have 3.0.4 and did the most recent Akismet updates and tried it again (didn't change anything else) and it worked.

    And I added your update to the site where Akismet is installed but inactive and it worked too. Thanks a lot!

    QUESTIONS:
    1) I also have the plugin "Simple Select All Text Box" (http://wordpress.org/extend/plugins/simple-select-all-text-box/) installed and it works according to my settings (1 row/line tall, even though the code is longer than one line) when the contact form isn't on the page and also once the comment form is submitted (i.e. "message sent"). But at initial page load, the text box is several lines tall. Are these 2 plugins messing with each other but only when the form is in the "fillable" stage?

    2) Are there any suggestions/settings for a way to have a "click here to contact" button that, once clicked, just displays the contact form right there, in-place?

    3) Are there settings to edit what is added to the end of the email body text? For example, do not display whether or not they are a verified visitor of the site, do not display Subject in the body of the email, add "blah blah blah" before/after the user's message, etc.

    4) (MOST IMPORTANT) can the multiple email addresses be BCC instead of TO?

    THANKS A MILLION! :D

  12. Clifford Paulick
    Member
    Posted 3 years ago #

    And maybe remove the "website" field...

    All these ideas are for a case-by-case basis (i.e. shortcodes).

  13. Joseph Scott
    Member
    Plugin Author

    Posted 3 years ago #

    I'm not familiar with the Simple Select All Text Box, it's possible they are interacting in odd ways.

    You could modify your theme to do that. The plugin isn't designed for that use, but some theme work could over come that.

    There are currently no setting to alter the content of the email body or to use BCC.

  14. Clifford Paulick
    Member
    Posted 3 years ago #

    I understand the theme alternative.

    Is your response that the development isn't interested in enhancements/new features? (Not asking in a bad way, just trying to find a long-term solution for a page-by-page-customizable contact form.)

    Thanks again.

  15. Joseph Scott
    Member
    Plugin Author

    Posted 3 years ago #

    Grunion will continue to get improvements. We've got several fixes for the next release, any new features will likely not appear until the release after that.

    The plugin is open source, we accept patches. You submit your patches via tickets at http://plugins.trac.wordpress.org/ with the key word grunion.

  16. Clifford Paulick
    Member
    Posted 3 years ago #

    Thank you.

  17. sempervirent
    Member
    Posted 3 years ago #

    Thanks Joseph, I was having the same problem and got around it by modifying the code you posted to:
    http://plugins.trac.wordpress.org/changeset/325516

  18. Joseph Scott
    Member
    Plugin Author

    Posted 3 years ago #

    Modifying in what way? That should take care of situations where the Akismet plugin is not in use.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic