WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7 Phone Module
[resolved] Fatal Error on Activation (17 posts)

  1. popwireless
    Member
    Posted 1 year ago #

    When I try to activate the plugin I get a fatal error:

    Fatal error: Call to undefined function wpcf7_add_shortcode() in /home/drum/public_html/wp-content/plugins/contact-form-7-phone-mask-module/phone.php on line 34

    I'm in a cPanel environment. Theme by Artisteer. Did I break something?

    http://wordpress.org/extend/plugins/contact-form-7-phone-mask-module/

  2. tilen
    Member
    Posted 1 year ago #

    I have exactly the same issue.

    Not working.

  3. biswajeet
    Member
    Posted 1 year ago #

    Fatal error: Call to undefined function wpcf7_add_shortcode()

    Seems phone module can't access wpcf7_add_shortcode function. Have you installed CF7 and working correctly...?

  4. Gabriel Reguly
    Member
    Plugin Author

    Posted 1 year ago #

    biswajeet has made the correct question, CF7 must be installed and activated.

    I'll make a fix to alert users of it.

    ---
    Oddly I did not received any email about these comments, I wonder if it is something that I should configure somewhere.

  5. popwireless
    Member
    Posted 1 year ago #

    Contact Form 7 is installed. Also using Contact Form 7 Honeypot plugin. I wrote the forum post before I noticed that the error message kept returning regardless of the blog address checked. I actually had to go to my on-line file manager and delete the plugin directory to regain control.

  6. popwireless
    Member
    Posted 1 year ago #

    CF7 appears to be working OK.

    What do the directory permissions need to be to write to the file you are writing to? I'm at a cPanel host and some things are a little different here. Are you adjusting permission to write.

  7. Gabriel Reguly
    Member
    Plugin Author

    Posted 1 year ago #

    @popwireless I think cPanel should not be an issue, my hosting also uses it, and Contact Form 7 Phone Module 1.0 just works (at least for me.)

    Version 1.0.1 was a bad fix, as it does not properly show the warning message. So please bear with me while I learn how to code it properly.

    Regarding your issue,

    error message kept returning regardless of the blog address checked

    Sorry but I don't understand you, Contact Form 7 Phone Module has no blog address to be checked.

  8. Gabriel Reguly
    Member
    Plugin Author

    Posted 1 year ago #

    Now I can reproduce the error.

    My testing environment is a multisite install and code just worked there.

    For a regular install it shows the error, since the plugin is new and I have some pressing matters, I shall fix it only next week.

  9. popwireless
    Member
    Posted 1 year ago #

    Cool. Software! Gotta love it.

    What I meant in the second part of the message was:

    AFter the error screen display, i was unable to use the site. A fatal error regarding the plugin kept appearing. In order to take control of the site afain I had to delete the plugin directory. This sitation could be devastating to some users on hosts with no FTP - like my customer on <blank>. The situation would be bounced back and forth with the host pointing the finger at the plugin developer while the site was down or they would tell you to login to WordPress to delete the plugin. Which I couldn't do obviously.

    So anyone without FTP on a single WordPress site shouldn't try this plugin just yet. I'm hoping to try it when the bug is fixed so don't everyone give up.

    Thanks for the reply.

  10. biswajeet
    Member
    Posted 1 year ago #

    @author

    With reference to the following code snippets from your plugin file:

    wpcf7_add_shortcodes( 'phone',  'wpcf7_phone_shortcode_handler', true );
    wpcf7_add_shortcodes( 'phone*', 'wpcf7_phone_shortcode_handler', true );

    You are trying to attach your shortcode_handler function with the standard contact form7 function which will not work as you might be expecting. For more info, please refer to WordPress Shortcode API

    So, how can be this working...?

  11. Gabriel Reguly
    Member
    Plugin Author

    Posted 1 year ago #

    @biswajeet Thank you for the pointer, I'll study it.

  12. Gabriel Reguly
    Member
    Plugin Author

    Posted 1 year ago #

    @biswajeet

    After studying the documentation, I can't understand your point.
    My code had an issue with it's initialization method, now that is fixed and the error is gone.

    If you think I should use a different method to attach the shortcode handler, please tell me how.

  13. biswajeet
    Member
    Posted 1 year ago #

    Hi with your latest release it seems that the field is displayed now but there is no validation notification error like CF7 native fields. Also it will be great if this plugin create a tag in the CF7 auto generate drop down tag list. I will check and notify if there arises any issues or tips on further smoothing...

    btw, This one will be the most useful extension for CF7.
    Thanks a lot!

  14. Gabriel Reguly
    Member
    Plugin Author

    Posted 1 year ago #

    @biswajeet.

    Thanks for the catch, I have just missed to add the validation code.

    Now this is fixed, enjoy the new 1.0.4 version.

    Future version 1.1 will add the auto generate tag, most likely it also will add the option to edit the phone mask.

  15. popwireless
    Member
    Posted 1 year ago #

    In this version only two numbers of a three number area code appear between the parentheses. It appears that the number is accepted but the paren is in the wrong place.

  16. popwireless
    Member
    Posted 1 year ago #

    I tested the form. The phone number was NOT sent with the other items. The plugin does not work for me yet.

  17. Gabriel Reguly
    Member
    Plugin Author

    Posted 1 year ago #

    @popwireless

    Regarding version 1.0.4:

    1. Phone mask is hard coded at file jquery.maskedinput-1.3.1.js, future version will address this.

    hard coded options are (99) 9999-9999 and (11)999-999-999

    you can edit the file to change it to (999) 999-9999, which seems to be what you are looking for.

    2. How did you added the new phone field to your email template?

    Use [phone your-phone] or [phone* your-phone] to add a telephone field
    Use [your-phone] at mail to get the content of telephone field

    Future version will have an option to generate the tag.

    Regards,
    Gabriel

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic