[Bug] SP Page Builder Pro 6.9 Contact Form fails with Joomla Proof of Work CAPTCHA - Forum | JoomShaper
Staff replied SP Page Builder

[Bug] SP Page Builder Pro 6.9 Contact Form fails with Joomla Proof of Work CAPTCHA

Asked by Sabrina Ostfalk 3 weeks ago Last activity 1 week ago

Environment:

  • Joomla 6.1.3 Stable
  • SP Page Builder Pro 6.9.1
  • Helix Ultimate
  • Contact Form addon
  • Joomla built-in Proof of Work CAPTCHA enabled

Problem:

The SP Page Builder Contact Form does not submit when Joomla's Proof of Work CAPTCHA is enabled.
Instead of the AJAX request, the browser performs a normal GET request to index.php and reloads the page.

The browser console shows:

Uncaught TypeError: can't access property "includes", t(...).attr(...) is undefined
    sppagebuilder.js:1779

The failing code is:
if (t(this).attr('name').includes('sppb-hpt_')) return !0;

The element causing the error is the checkbox generated by the Proof of Work CAPTCHA. It has no "name" attribute, for example:
<input id="custom_captcha_..." type="checkbox" required>

Therefore t(this).attr('name') returns undefined and .includes() throws an exception.

It looks like the form validation code assumes that every input element has a name attribute, which is not true for the checkbox generated by Joomla's Proof of Work CAPTCHA.

Reproduction:

  1. Create an SP Page Builder Contact Form.
  2. Select and Enable Joomla's Proof of Work CAPTCHA.
  3. Open the page.
  4. The JavaScript exception occurs during page initialization.
  5. Submit the contact form.
  6. The AJAX submit handler is not active due to the initalization failure, so the form falls back to a normal GET request to index.php.

Control test:

  • Disable Proof of Work CAPTCHA.
  • The contact form works correctly.
  • AJAX response is successful.
  • Recipient receives the email.

Temporary fix:

Changing the line which throws the exception from:

if (t(this).attr('name').includes('sppb-hpt_')) return !0;

to:

if ((t(this).attr('name') || '').includes('sppb-hpt_')) return !0;

fixes the issue.

After this change:

  • Proof of Work CAPTCHA remains enabled
  • AJAX submission works
  • recipient receives the email
  • copy to applicant works

8 replies

Mehtaz Afsana Borsha Staff

Hi,

Thank you for reporting this issue with detailed steps and the temporary fix.

The problem occurs because the SP Page Builder form validation script expects every input element to have a name attribute. However, Joomla's Proof of Work CAPTCHA checkbox does not include a name attribute, which causes the JavaScript error when calling .includes().

The suggested fix:

if ((t(this).attr('name') || '').includes('sppb-hpt_')) return !0;

is a valid workaround because it safely handles inputs without a name attribute.

We will review this with the development team and improve the validation logic in a future SP Page Builder update so it is compatible with Joomla's Proof of Work CAPTCHA.

Thank you for helping us identify this compatibility issue.

-Regards.

Stefan Hirschmann

I’m having the same problem with Formbuilder forms. Could that be the case?

Mehtaz Afsana Borsha Staff

Hi,

Sorry for the inconvenience. I will inform our team about it.

Stefan Hirschmann

Is there any news on this subject?

Mehtaz Afsana Borsha Staff

Hi,

I have forwarded this issue to our development team. I will keep you updated as soon as I receive feedback. Allow me some time please.

Stefan Hirschmann

I need a solutuion - quick!

Sabrina Ostfalk Asked this

You might want to check the workaround in my original post.

It works on my page. I just hope that the next update of JSPB includes a fix and will not overwrite my patched version.

Mehtaz Afsana Borsha Staff

Hi,

Apologies for the inconvenience. I have escalated this issue to our DEV team as a high priority so we can provide you with a resolution as soon as possible.

Mehtaz Afsana Borsha Staff

Hi,

I have talked with our DEV team, and they said it will be fixed in the next update.

Thanks.

G_Stafford

I have the same problem. Same environment specs as original poster.
I've had to switch 11 websites over to Turnstile Captcha for now. Any ETA fron Dev on when we might expect the next updtae with the fix?

Mehtaz Afsana Borsha Staff

Hi,

No worries, it will be fixed by the next update. By next week, you can get the updated version.

Log in to reply.