• Resolved mnieuwsma

    (@mnieuwsma)


    My Constant Contact forms are submitting without the required fields. The email address field is set to required in WordPress but the form still submits without this data entered.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Hi @mnieuwsma,

    This is a known bug that we found that we’re planning to address in the next minor release. If you’re interested, In the meantime, I’m willing to provide a hotpatched version of the plugin with just those changes, until the release is out for everyone.

    Thread Starter mnieuwsma

    (@mnieuwsma)

    Hi Michael,

    That would be great – thanks!

    Mara

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Please give this copy a try.

    https://www.dropbox.com/s/hnvau6wimiincpk/constant-contact-forms-ajax-hotfix.zip?dl=0

    It should be able to be uploaded and replace the current copy of the plugin. No data should be lost at all.

    Thread Starter mnieuwsma

    (@mnieuwsma)

    I tried to upload the file but it would not overwrite the existing. Do I need to remove the current plugin before loading?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Either that, or upload via FTP.

    Hi:

    Will this hotfix receive a downstream update when you release or will we need to manually replace?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Unless we somehow find reason to hold off, it’s presently slated for 1.3.5 which we hope to release soon.

    FYI: The hotfix plugin works fine on a remote server, but on a local instance I am getting the following error causing the site to not load:

    [Sat Oct 28 00:40:28.298409 2017] [:error] [pid 53124] [client 127.0.0.1:62031] PHP Fatal error:  Class 'ConstantContact_Settings' not found in /Users/LOCALPATHHIDDEN/apache2/htdocs/LOCALPATHHIDDEN/wp-content/plugins/constant-contact-forms/constant-contact-forms.php on line 243
    [Sat Oct 28 00:43:51.530044 2017] [:error] [pid 11910] [client 127.0.0.1:62914] PHP Fatal error:  Call to undefined function cmb2_bootstrap() in /Users/LOCALPATHHIDDEN/apache2/htdocs/LOCALPATHHIDDEN/wp-content/plugins/constant-contact-forms/vendor/CMB2/init.php on line 154, referer: https://LOCALPATHHIDDEN/wp-admin/update.php?action=upload-plugin
    

    Any ideas? Using Bitnami local server.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    All parts from both of those errors should be available and in place with the zip file above. Best I can think of for why you’re encountering them is perhaps your local instance is running an older version of PHP. The plugin does require PHP 5.4 or higher to operate.

    Otherwise, possibly not all the files copied over with the local instance. You should be able to check for the existence of the files. The cmb2_bootstrap function should be getting loaded and ready immediately before it’s tried to be used:

    // Kick the whole thing off
    require_once 'bootstrap.php';
    cmb2_bootstrap();
    

    Using php7 and wordpress was deployed with WP-CLI.

    Interestingly, your production version works fine. It is just the hot fix version that is failing.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Unsure what’s going on. Only changes in the hotfix version involve javascript files, nothing for PHP files. Possible difference in file permissions? That said, I’m glad it’s working fine on production, and only struggling locally, rather than reversed.

    Any reason something like using https://127.0.0.1/ vs localhost or vice versa could cause it? If the function is there, maybe the path is throwing it off? Or that we use a remote DB for our local instance?

    If I use one of Bitnami local instances that is using its own local mysql DB, the plugin runs fine.

    But using my other local instance that uses a remote DB I get the failure. My only assumption here is that its a path discrepancy because of how the plugin is reading the local path?

    Any thoughts on why the plugin may be getting paths mixed up?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Wish I did.

    If I had the access in this case, I’d be checking current paths at each, at least with regards to the CMB2 portion. That said, as is, I believe it should all be getting done relative to the current directory things are in.

    Regarding the first error, it’s really odd because it’s not the first class that we try to autoload, it’s more towards the middle of the list.

    Can you check and confirm that both the /vendor/cmb2/bootstrap.php file and the /includes/class-settings.php file have code in them? Alternately, have you tried rolling back to the non-hotfixed version to see if that works again?

    Yeah, I tried both versions and no dice. Given its working elsewhere, i am going to go with its just something with the Bitnami setup, or something with how we are setting our paths.

    However, I did get it to work. I added this to around line 130 of init.php right after the include_cmb function:

    if(!function_exists('cmb2_bootstrap'))
        return;
    

    That made the error not occur and the plugin finished installing. Hopefully it doesnt break something else! If you think it will, let me know!

    I won’t be doing that on the remote/production server though, so as you said, def good its working fine there!

    Thanks for all the quick responses.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    With that edit you made, I’d click into a form/form editor and see if things look like they’re loading like expected compared to the live site. CMB2 is what we use to power all of the fields to associate with the form.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Form submitting with blank required fields’ is closed to new replies.