• Hello

    We’re starting to get the following error on multi-page forms with conditional fields

    Invalid argument supplied for foreach() /*****/wp-content/plugins/cf7-conditional-fields/cf7cf.php on line 243

    I think it’s started only in the last day after WP core updated to version 6.2 and CF7 updated to version 5.4

    Hope it’s something simple.

    All the best and thanks very much

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Jules Colle

    (@jules-colle)

    which plugin do you use for multipage forms?
    Does the problem go away for single page forms?

    Any other cf7-related extensions enabled?

    Plugin Author Jules Colle

    (@jules-colle)

    I was able to reproduce the error. CF7 seems to have made a complete JS rewrite. I’m checking with the plugin author how I should update my code. For now, I would suggest to revert back to CF7 version 5.3.2

    Hi Jules,
    unfortunately, after this rewrite there also now is an error while changing MultiStep-Form-Pages, because of this Error:

    scripts_es6.js:921 Uncaught TypeError: wpcf7.setStatus is not a function
        at Object.<anonymous> (scripts_es6.js:921)

    the wpcf7.setStatus function does not appear in the code anymore….

    Plugin Author Jules Colle

    (@jules-colle)

    Yes, I can confirm that there has been a major JS rewrite in CF7, which removed a couple of public properties on the wpcf7 object. I hope to resolve all these issues soon, but for now: please revert CF7 back to version 5.3.2

    Plugin Author Jules Colle

    (@jules-colle)

    Steps to revert to 5.3.2:
    1. download https://downloads.www.ads-software.com/plugin/contact-form-7.5.3.2.zip
    2. uninstall contact form 7
    3. install plugin by uploading the downloaded file
    4. activate

    Hi Jules,

    Does this only affect multi-page forms?

    I have tested on single page forms and it appears to be working ok. Would you recommend we stick with 5.3.2 for the time being?

    Plugin Author Jules Colle

    (@jules-colle)

    My current tests only fail for multi-step forms and for multifile uploads, but there might be other problems, so if you are not using any of those I guess it’s safe to update

    Hi Jules,
    Tried updating today but currently experiencing issues from 5.3.2 > 5.4 too but with a single form.

    Can’t access hamburger menu or send form upon completion. The form also won’t validate. All JS-related reading your response above so it appears.

    Successfully rolled back and look forward to your fix shortly.

    Plugin Author Jules Colle

    (@jules-colle)

    Hi all, just a quick update. It’s going to take a bit longer than anticipated to roll out the fix soon. The problem is that I have been stacking up for a big update for quite a while. (Last update was more than 3 months ago.)

    Because of a couple of quick fixes I made people do straight in the plugin core code, with the promise “I will add these changes to the next update, so no worries about breaking the plugin”, I have gotten myself in a bit of a pickle.

    No worries though, there’s a light at the end of the tunnel, but I’m going to have to move carefully and not rush an update that might introduce problems for some other users. Currently I’m aiming for a release around 8 March, but I’m just one guy for the moment, and have other projects to juggle as well so this isn’t a guarantee.

    a

    (@asimcard)

    Thanks @jules-colle for your hard work. I am always wary of plugin updates with CF7 since I have other plugins that depend on it too but just like you said best not to rush. Thanks again for the update on this issue.

    Hi @jules-colle, @codymac9, @badmachinebrad and @asimcard,

    Please note I’m using CF7 latest version 5.4 with the ‘Contact Form 7 – Conditional Fields’ version 1.8.7, with manual multi-page managed with divscreens (as part of a CF7 form) which switch between them by clicking Next Back, which is effactuated by JS JQueries of show/hide, and the combination works for me.

    The main change I noted in CF7 version 5.4 was the upload of files was turned into an arrow, which requires a ()[0] modification of some code, wanting to directly access uploaded attachment files uploaded via the form, for manual integration of such files, on the wire, into a written mPdf.

    @jules-colle,

    I’m not sure there was a REMOVAL of CF7 plugin object, but suspect more there was a date-structure change, mainly seen in placing elements within arrows, requiring a fetch of the kind (…)[0].

    Possibly there is also a need to call the submission in a more defined way, and to define the elements you use in the code according to their new data structure, i.e.,

    
    $submission = WPCF7_Submission::get_instance();
    
    if ($submission = WPCF7_Submission::get_instance()) 
    	{
    
    	$files = $submission->uploaded_files();
    	$uploaded_files   = array();
    	$uploadedFiles = new RegistrationUploadFiles($files);
    	}
    
    Plugin Author Jules Colle

    (@jules-colle)

    DO NOT UNINSTALL CONTACT FORM 7!! YOU WILL LOOSE ALL YOUR FORMS!

    Sorry for shouting. It was brought to my attention that uninstalling CF7 will also remove all your forms. I wasn’t aware of this. Of course you don’t want this to happen if you rollback CF7 to a previous version.

    I recommend to install the plugin: WP Rollback (https://www.ads-software.com/plugins/wp-rollback/)

    Plugin Author Jules Colle

    (@jules-colle)

    Due to some misinformation in this thread, I created a new sticky where I will post status updates: https://www.ads-software.com/support/topic/not-compatible-with-cf7-version-5-4/

    Please follow this new thread if you want to stay in the loop

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Error with update to CF7 5.4’ is closed to new replies.