• Resolved deeholzman

    (@deeholzman)


    I’m using the latest version of your plugin and it’s throwing a PHP error that breaks the form:

    Warning: Division by zero in /../wp-content/plugins/gf-form-multicolumn/gf-form-multicolumn.php on line 29

    The zero value is the ‘$columnTotalForRow’ variable – I checked that I didn’t have any empty rows – not sure if I have misplaced a new row section (classname: new-row) in the wrong place or something, but it’s throwing an error.

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author WebHolism

    (@webholism)

    Hi @deeholzman,

    Thanks for your post. Could you provide a link to your form and we’ll take a look at what’s going on?

    Many thanks.

    Thread Starter deeholzman

    (@deeholzman)

    Thanks so much for your reply! You can see the first page of the form here:

    https://deaportal.dreamhosters.com/subconsultant-application/

    you can see the warning at the top of this page, and when you check the ‘I agree to the Terms and Conditions’ checkbox then ‘next’, it takes you to the next page, which also shows the warning, then if you select ‘next’ on this page (none of the fields are required so you can select ‘next’ without a problem), it just hangs (no javascript errors are shown in console, so not sure why this is happening). Wierdly, the ‘hanging’ on the next button to the third page of the form doesn’t happen with your plugin disabled – not sure if this is the same php error.

    Plugin Author WebHolism

    (@webholism)

    Thanks for your post. It looks like we need to be logged in to see the form. Could you send a login to [email protected], and we’ll take a look?

    Many thanks!

    Thread Starter deeholzman

    (@deeholzman)

    Great, thanks for taking a look! I just sent the login, and the form that I’m having problems with is the ‘Subconsultant Application Form’

    It’s a multi page form with lots of columns – on my local server copy, if I eliminate the rows, the error message disappears, but it still hangs when trying to move to the third page of the form. When I disable the plugin, this does not happen. I’m not sure if it’s related to the PHP error.

    Plugin Author WebHolism

    (@webholism)

    Thanks for the login – we’re just taking a look now and hopefully should have a solution by the end of tomorrow.

    We’ll let you know as soon as we’ve got to the bottom of the issue.

    Best wishes.

    Thread Starter deeholzman

    (@deeholzman)

    I Really appreciate your quick reply – I realize that I may have had some mis-matched ‘split-start’ and ‘split-end’ sections – not sure if this may have caused the problem. Maybe an ‘if..then’ statement for the ‘$columnTotalForRow’ variable to make sure everything matches up? At any rate, thanks for your attention to the matter!

    Plugin Author WebHolism

    (@webholism)

    Hello again @deeholzman,

    We have a modified plugin which appears to resolve the issue. Would you be willing to let us install the modified version on the https://deaportal.dreamhosters.com/ site?

    Many thanks for your time and cooperation.

    Thread Starter deeholzman

    (@deeholzman)

    Yes that would be fine – I have a backup on my local server in case anything goes wrong – thanks again!

    Plugin Author WebHolism

    (@webholism)

    Modified version of the plugin installed and activated. Please can you confirm if the issue has been resolved?

    Thank you for your assistance.

    Thread Starter deeholzman

    (@deeholzman)

    The form seems to be working now and the php error has disappeared. Would you mind sharing with me if the problem was due to mismatched ‘split-start’ and ‘split-end’ sections, resulting in a value of 0 for that $columnTotalForRow variable in the gf-form-multicolumn.php file?

    I was just curious if mismatching or placing ‘new-row’ elements in the form caused the malfunction.

    I really appreciate all of your help!

    Plugin Author WebHolism

    (@webholism)

    Glad that worked out fine. Thank you for letting us know.

    The issue was based on the way that widths are determined; CSS classes were identified by a string containing -of-, and your form had included a class called terms-of-use. So the logic attempted to use numerical calculations on this string, with the unhappy results which you witnessed.

    This has been resolved in the newly installed version, and will be pushed out in a release in the next few days.

    The split-start, split-end issue that you mentioned did not contribute to this particular problem, although mismatched tags may result in other problems.

    If there is anything else that we can assist with, just let us know and we’ll do our best to help.

    Wishing you a great day.

    Thread Starter deeholzman

    (@deeholzman)

    Thanks for the explanation – that makes sense.

    I added fields to the form and am experiencing more problems – I sure appreciate all of your help and if there’s anything you can do to identify this following issue that would be great.

    After adding fields and pages, it was working, then suddenly when testing, on an attempt to go to the 3rd page of the form, it tries to open up page 3 in a new window and just hangs.

    The link is here: sub consultant application
    When I deactivate your plugin, the form no longer hangs and there are no problems – any idea what could be causing this?

    • This reply was modified 8 years, 2 months ago by deeholzman.
    Plugin Author WebHolism

    (@webholism)

    Hi @deeholzman,

    Thanks for your post. We don’t see to be able to see the hanging issue from our side.

    Would you be able to clear your browser cache, or try using a different browser to see if it’s a cache issue? Please also flush/clear any website or hosting caches that you may have in place.

    If you are still seeing the hanging issue after clearing all caches, could you confirm which browser (and browser version) you’re using?

    Many thanks!

    Thread Starter deeholzman

    (@deeholzman)

    Thanks for your reply – I did some experimenting, and oddly, I found that when I use the gravity forms ‘duplicate field’ button for the ‘split-start’ and ‘split-end’ sections (then moved them to the appropriate place in the form), instead of creating a section divider from scratch, the form had some problems advancing to the next page. When I deleted the sections that I duplicated, the form functioned correctly.

    I really appreciate your help and quick response to my questions – this is a great plugin and certainly makes complicated formatting and styling of gravity form fields much easier.

    Plugin Author WebHolism

    (@webholism)

    Thanks for your feedback @deeholzman – that’s really interesting to know about the duplication issue! We’ll test that out and see if we can replicate the problem on our end (and if so, we’ll bundle a fix into our next release).

    We really appreciate your feedback, as it helps us to work out all the niggles and make the plugin more robust for all ??

    Have a great day!

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Division by Zero error in your plugin’ is closed to new replies.