• Greetings,

    A new form for membership applications uses the Save and Continue behavior. Use of this feature triggered a warning in the debug log: “Warning: foreach() argument must be of type array|object, string given in …. front-mail.php on line 95”

    Is there something I need to do to eliminate this warning or is this an issue with the software?

    Pastebin link to debug log excerpt with stack trace: https://pastebin.com/isiv9kdS

    This is a multi-page form, so having this save and continue feature is great for the users who can’t complete the form or are interrupted.

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

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Support Saurabh – WPMU DEV Support

    (@wpmudev-support7)

    Hello @nwjeff,

    Hope you’re doing well today! Thank you for reaching out to us and reporting the warning you’re noticing.

    I tried to replicate the issue on my lab environment, which is a plain vanilla install with only the Forminator plugin, but I wasn’t able to replicate the warning. Could you please confirm if you’re using the latest version of the Forminator plugin?

    To understand why it could be happening, would it be possible for you to share the form export with us so that we can import it on our lab and see if the issue is replicated? It is possible that the issue could be isolated to the form.

    To share the form export
    – Navigate to the “Forminator -> Forms” page in your site’s back-end
    – click on a little “gear” icon next to the form in question
    – select “Export” option
    – copy given export code and paste it at https://pastebin.com
    – include link to that paste in your response below.

    Note: this export will not include any data that is already submitted – they’ll stay safely on your site and we don’t need them anyway.

    Kind Regards,
    Saurabh

    Thread Starter nwjeff

    (@nwjeff)

    Thank you for looking into this.

    Here is the form export link: https://pastebin.com/Kux9P7hV

    The website is one version behind the latest plugin release. I just saw the new update yesterday. The changelog did not suggest anything related to this issue was fixed, so I did not apply the update since the incident happened before the update and it only occurs when the save and continue feature is actually used. Also, I frequently wait a few days before applying an update to see if the update is causing any new issues for users (unless it is a critical issue, like causing a crash of website).

    Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @nwjeff,

    Thank you for getting back to us.

    I imported the form to a test website at my end to check this further. However, I wasn’t able to observe the mentioned warning logged in debug.log when using the Save & Continue option.

    Please note that the test was performed using the latest version of Forminator. Can you please take a backup of the website and update Forminator to see if that resolves the issue at your end?

    As it was in the previous test performed by Saurah, I performed this test on a plain vanilla install with only the Forminator plugin installed. A plugin might be conflicting and causing the issue on your website end.

    To investigate the issue further, would it be possible for you to perform a complete conflict test on a staging website? A staging website is a copy of your live website in a new directory on the same server using a separate database.

    The following documentation should help you further: https://wpmudev.com/docs/getting-started/getting-support/#conflict-test

    Please update us here with the results so that we can help you further.

    Best Regards,
    Nebu John

    Thread Starter nwjeff

    (@nwjeff)

    Greetings,

    Yesterday , May 28th, I updated website to latest build of Forminator. Today, I retested and reproduced the warning message in the debug log. To do this, I fill out the form, selecting the “Family membership” option. Then, at the end before paying I select the Save option. The link is generated but then I continue to input my email address and have the restore link emailed to me. When I checked the debug log, there was the warning message again, but showing my email address in the stack trace. I did receive the email link and it worked ok to restore the form. When you said you tested the form, did you fill it out and did you have the restore link emailed to you?

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @nwjeff

    That’s correct,

    I also installed Query Monitor plugin to check if we can catch the warning on but regardless what we select, it isn’t triggering the warning.

    Could you share the full warning log, just hide if any sensitive information e.g your email showing up on the log.

    Best Regards
    Patrick Freitas

    Thread Starter nwjeff

    (@nwjeff)

    Here is a bigger sample from the debug log: https://pastebin.com/aeBwuGfx

    Once it starts, it appears to be the same lines repeated, over and over. Pastebin has a 512kb limit so I only pasted as much as could fit. This sample is from my test on 20260529, with my own email address, which has been hidden. The first sample was from a different person, that actually submitted the form. Thanks.

    Thread Starter nwjeff

    (@nwjeff)

    I did a bit more testing. After filling out form, I requested the save but I waited to see if anything was written to debug log and got nothing new. After this pause, I selected the Send Link in Email option and immediately the debug log was updated with the warning message, same as before. The warning message occurs 32 times in the debug log and then stops. Appears to definitely be triggered by selecting to have the Save Link sent in an email.

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @nwjeff

    I have reviewed your logs again and run further tests, but I still couldn’t replicate the issue.

    However, I believe found what is causing this error, the warning is specific to email notification, it appears that the email you used for form submission is triggering this error, some how the email format is invalid and that is causing the warning.

    Can you please try using a valid email address to see if the error is happening? Also, please share the link to the draft form so we can see the input values.

    Best Regards
    Amin

    Thread Starter nwjeff

    (@nwjeff)

    Here is the link to the form showing the actual data used, except the email address has been modified to hide my information (link should be good for a couple more days): https://mustangsnorthwest.com/membership-info-2/mustangs-northwest-membership-application/?draft=8aad6fa00824

    I agree, that the warning is generated when the Send Draft Link in email option is selected. Note that when I duplicated the problem, I was using a valid email address to send the draft link and I did receive the email with the correct link.

    The warning is being generated in the Forminator routine that is getting the files to email (forminator/library/modules/custom-forms/front/front-mail.php on line 95), the link itself was already created. The routine iterates through the input data (foreach()) and there appears to be 32 items that are not of the correct type (foreach expects to get an array or object).

    Thread Starter nwjeff

    (@nwjeff)

    After looking at the front-mail.php some more I have to ask, why is the get-files even being called at this point? All of the files should have been gathered and saved when the link is created, whether or not an email is being sent. Also, in the debug log, the step before get-files, process-mail appears to be where email is already sent; why is getting files needed after that? Thanks again for looking at this with me.

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @nwjeff

    Thank you for sharing additional information.

    I asked our developers to take a look at these errors to see if they find any clues.

    We will get back to you as soon as we have more updates. It seems the error is related to the repeater field values as the function expected an array but received a string.

    Best Regards
    Amin

    Plugin Support Jair – WPMU DEV Support

    (@wpmudevsupport15)

    Hi @nwjeff ,

    Could you please provide us with .zip file of your theme (and child theme), so we can test this further on our end?

    Please upload that file to any file sharing service like GDrive or Dropbox and send us the download link to this email address: [email protected]

    Subject:ATTN: WPMU DEV support - wp.org

    Please send:
    – Link to your WordPress site
    – Download link to file
    – Link back to this thread for reference (https://wordpress.org/support/topic/save-and-continue-warning/)
    – Any other relevant URLs/info

    To ensure we don’t miss your email, please let us know here once you’ve submitted the form and make sure you use “ATTN: WPMU DEV support - wp.org” as the email subject.

    Kind regards,
    Jair.

    Thread Starter nwjeff

    (@nwjeff)

    Greetings — Want to let you know that I have submitted a link to the theme files, as requested. Please check for the email from me.

    Plugin Support Imran – WPMU DEV Support

    (@wpmudev-support9)

    Hello @nwjeff,

    I hope things are going well for you.

    Initially, I replicated the issue on the form you provided. After carefully reviewing the form fields, I assumed it was a form-specific issue. I removed fields one by one on my test site to narrow it down, including visibility conditions and email configuration.

    Lastly, when I removed all the group fields, the warning disappeared.

    This issue mainly stems from the group fields, also known as repeater fields.

    I’ve shared my findings with the Forminator team, and we’ve created an improvement task for this. Currently, I do not have an ETA to share with you. However, in the upcoming version of the plugin, the team will release an improvement.

    We highly appreciate your patience.


    Kind Regards,
    Imran Khan

    Thread Starter nwjeff

    (@nwjeff)

    Thank you for your diligence in hunting down the source of the warning. Looking forward to seeing the improvement. Will I need to modify my form or will the improvement work with the current design?

Viewing 15 replies - 1 through 15 (of 16 total)

You must be logged in to reply to this topic.