Similar to #2937191: Render using theme input and select instead of lists with links for checkboxes and dropdown, many of our projects use the links facets and like many we struggle to keep the wave of naughty bots and crawlers at bay.

Attached is a patch for the 2.x branch of this module which remove the contents of the facet link href attribute and instead stores the href in a data attribute of the link.

The facet JS clicks the link as before, but uses the data attribute instead of the href directly.

We have had some success with this approach, so posting here for others.

Note:
- This does probably wreck accessibly for the links.
- The patch removes a version: VERSION line from the facet library yml file. This is so JS is properly re-aggregated (if you have aggregation enabled.

Issue fork facets-3528502

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

thtas created an issue. See original summary.

thtas’s picture

StatusFileSize
new1.81 KB
mariacha1’s picture

StatusFileSize
new2.3 KB
new499 bytes

Here's a small tweak that allows this to also work with checkboxes.

mariacha1’s picture

mxr576’s picture

Issue tags: +bad bots

rakesh.regar made their first commit to this issue’s fork.