PBJ Forms & Products 2.1.0: we broke form submissions on 2.0.x — this fixes it
PBJ Forms & Products 2.0.0 through 2.0.2 shipped a defect that made every JavaScript form submission post to a 404, so no form could be submitted and no payment could be taken. 2.1.0 fixes it. Update.
PBJ Forms & Products 2.1.0 is out, and the first thing it does is fix a defect we shipped. If you are running 2.0.0, 2.0.1 or 2.0.2, your forms have not been working. Update now.
What broke
Every form rendered by the plugin carries a hidden input named action. In a browser, a form control with that name shadows the form element’s own action property — so when our JavaScript submit handler read form.action to find where to send the submission, it got the input element instead of the URL. The request was posted to the literal string [object HTMLInputElement], which is not a real endpoint, so the server answered 404 and the visitor saw “Something went wrong.”
Who is affected
Everyone on 2.0.0, 2.0.1 or 2.0.2, on every form and every payment gateway — Square, Stripe and PayPal alike. Contact forms, signup forms, product checkouts, cart checkouts: if it submitted through JavaScript, it failed. Nothing was stored, nothing was emailed, and no card was charged. There is no partial case and no workaround setting — if you were on 2.0.x, it was broken.
Versions 1.x are not affected. The bug was introduced with the 2.0.0 rewrite and was live from 2.0.0 until today.
The fix
The submission endpoint is now read from the form’s action attribute, which the hidden input cannot shadow. No settings change, no migration step, nothing for you to reconfigure. Update to 2.1.0 and submissions work again.
We are sorry. This one got past us because the failure only appears in the browser at submit time — the forms render perfectly, so nothing looks wrong until somebody actually tries to send one.
Also in 2.1.0
- The cart is one page now — line items with picture and unit price, a plus/minus quantity stepper, a real Remove button, a running item count and total, an empty-cart state, and an optional “Keep shopping” link.
- Quantity changes and removals no longer reload the page. They call a JSON endpoint that recomputes the cart from the published product config and returns the authoritative state. The plain form POST still works with JavaScript off.
- Checkout sits directly beneath the cart, and the pay button states the amount and follows the total as it changes.
- Product blocks gained a quantity chooser and confirm in place with “Added to your cart – View cart” instead of throwing the shopper onto the cart page.
- The Cart screen opens with a readiness panel that checks the facts: the cart page exists and holds the cart shortcode, a checkout form is chosen, the cart gateway has working credentials, and at least one product actually uses Add to cart.
- The Products screen shows each product’s checkout mode as a badge with the gateway beneath it, and a one-click copy button for every shortcode.
Settings database version moves 5 → 6 (it adds one blank key). Existing forms, products, submissions, orders and shortcodes are untouched.
How to update
2.1.0 is available now through the normal licensed WordPress update channel for 2.x customers: Dashboard → Updates, or Plugins → Update now on PBJ Forms & Products.