Skip Navigation

[Resolved] Problem displaying blocks in the product archive search

This support ticket is created 2 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 23 replies, has 2 voices.

Last updated by kostaB 2 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#2447457

Thanks for the details, I am checking it in the test site, will update here if find anything.

#2447671

Fantastic! Thank you.

#2447895

It seems the problem was triggered by these:
When click on the According pane within Toolset Search form, it will trigger the search form submitted, and conducts the issues, can you confirm it?
Thanks

#2447897

Ah yes, good call. Absolutely. Activating the accordion seems to add filter parameters to the URL of the archive page!

#2448439

Thanks for the confirmation, I am trying to reproduce the same problem and debug in my localhost, will update here if find anything.

#2448921

Great! Looking forward to seeing your findings.

#2449257

Thanks for the confirmation, here is the problem:
1) Kadence According block plugin is using HTML "button" element to setup the According pane,
2)When you put "button" element inside a HTML form element(Toolset Search Form), it will trigger the form submitting.

See the simple page:
hidden link

<form action="<em><u>hidden link</u></em>" method="POST">
    <button name="button">Press me</button>
</form>

You can test the result here:
hidden link

If you click the button "Press me one", it will submit the form.

It is a HTML limitation, more help:
hidden link

As a Workaround, you can add the attribute type="button" into the HTML button tag, for example:

<form action="<em><u>hidden link</u></em>" method="POST">
    <button name="button" type="button">Press me two</button>
</form>

see above test page, button: "Press me two"

You might need to check it with Kadence support, if it is possible to add the type="button" attribute into According block

#2449361

Ah, thank you very much, for your help and example. Before I close this ticket I would like to summarize the issue in my own words to make sure that I understand it:

When I add a block that includes a button inside the search section of a Toolset archive, if the type attribute is not specifically designated as being 'button', then Toolset will interpret this button as a 'search submit button', which disables the proper functionality of said Gutenberg block that includes said button. So, because the Kadence Accordion button does not include the 'type="button"' attribute, the Kadence Accordion button will behave like a Toolset search submit form button.

This is correct, right?

#2450745

No, it isn't Toolset Search form issue, but a HTML form limitation, any button in the HTML form element:
- It will submit the HTML form by default
- If you add 'type="button"' attribute, it won't submit the HTML form.

Hope it is clear.

#2450889

Yes it is, thank you. This resolved this ticket. Thank you very much!