[Bug] SP Page Builder Pro 6.9 Contact Form Fails With Joomla Proof Of Work CAPTCHA - Question | JoomShaper

is live, now with multi-currency selling.

[Bug] SP Page Builder Pro 6.9 Contact Form Fails With Joomla Proof Of Work CAPTCHA

SO

Sabrina Ostfalk

SP Page Builder 5 days 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
0
3 Answers
Mehtaz Afsana Borsha
Mehtaz Afsana Borsha
Accepted Answer
Support Agent 4 days ago #233758

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.

0
SH
Stefan Hirschmann
Accepted Answer
3 days ago #233869

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

0
Mehtaz Afsana Borsha
Mehtaz Afsana Borsha
Accepted Answer
Support Agent 3 days ago #233904

Hi,

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

0