WordPress.org

Support

Support » Plugins and Hacks » Telephone Mask broken in CF7 v3.7

Telephone Mask broken in CF7 v3.7

  • starlinggirl
    Member

    @starlinggirl

    Since installing the update of Contact Form 7 to version 3.7, Contact Form 7 Phone Module version 2.3.4.1 no longer works. I was using this tag:[phone* your-phone mask:(999)999-9999] and now I get this error:

    Fatal error: Call to a member function shortcode_parse_atts() on a non-object in /home/smgwebadmin/seattlemetalsguild.org/wp-content/plugins/contact-form-7-phone-mask-module/phone.php on line 73

    Does anyone know how to fix this? In the meantime, I am using [tel* tel-81] which works, but no mask.

    Super newbie, so any assistance is greatly appreciated! Thanks!

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • gradient9
    Member

    @gradient9

    Same issue here. Any luck?

    GottaGetEm
    Member

    @gottagetem

    To get the CF7 Phone Mask plug-in to work again I uploaded a previous version of Contact Form 7 and everything went back to normal. I had to go back to the 3.6 version.

    You can find previous versions here:
    http://wordpress.org/plugins/contact-form-7/download/

    I tested and received the form with the proper phone number showing.

    I hope it works out.

    WP changed file shortcodes.php, and these functions have been changed:
    NEW
    function wpcf7_add_shortcode( $tag, $func, $has_name = false ) {
    $manager = WPCF7_ShortcodeManager::get_instance();

    OLD
    function wpcf7_add_shortcode( $tag, $func, $has_name = false ) {
    global $wpcf7_shortcode_manager;
    if ( is_a( $wpcf7_shortcode_manager, ‘WPCF7_ShortcodeManager’ ) )

    So we need to change the code in there phone.php within plugins/contact-form-7-phone-mask-module

    Wilton Bennet

    Plugin Author Gabriel Reguly
    Participant

    @gabriel-reguly

    Thanks for sharing your solutions.

    diegodgogd
    Member

    @diegodgogd

    sorry, but in my case, when I inserted the phone tag in the form, it doesn’t load. The page loads with the header, footer, but the form not.
    Wbennet posted some line codes, but I can’t find in the phone.php file.
    How can I resolve this?
    Thanks

    Adding to what Wbennet said this is what I did to make it work.

    Using CF7 3.8

    in wp-content/plugins/contact-form-7/includes/shortcodes.php
    line 171
    Change
    private function shortcode_parse_atts( $text ) {
    to
    public function shortcode_parse_atts( $text ) {

    Then in
    wp-content/plugins/contact-form-7-phone-mask-module/phone.php
    line 71 and 200

    Change
    `global $wpcf7_shortcode_manager;
    $attr = $wpcf7_shortcode_manager->shortcode_parse_atts( $tag[‘attr’] );

    to

    $manager = WPCF7_ShortcodeManager::get_instance();
    $attr = $manager->shortcode_parse_atts( $tag[‘attr’] ); `

    agentinsure
    Member

    @agentinsure

    I used it on 4.0.1
    damn you guys are smart,
    thanks juppee, worked like a charm, and thanks for being specific enough with your instructions, although on 4.0.1 it was line 77 and 200, i just used the search and find

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Telephone Mask broken in CF7 v3.7’ is closed to new replies.