Views exposed filters adds a random suffix with letters and numbers

Created on 31 March 2025, 2 months ago

I've run into a problem with the module that I'm not quite sure how to solve. Let me explain:

I created a view with an exposed filter that displays several taxonomy terms. With the module, I convert the selector into links that, when selected with the mouse, display the nodes that have that term added. To make it work more dynamically, I enabled the Ajax option. The problem is that using Ajax, exposed filters add a random suffix with letters and numbers to the term's ID once you click on one of the terms. For example, the ID is as follows:
edit-plataform-16404
Since my intention is to add CSS to that ID, I add the following to my CSS:
a#edit-plataform-16404
and add the necessary attributes and everything works fine, but when you click on a term to view the nodes, that ID changes by adding a suffix that's always random, like this:

edit-platform-16404--abBoiUasal4 (adds this suffix "--abBoiUasal4" or something like this)

So the added CSS is no longer useful because the ID changes randomly.

Can anyone help me? What should I do to prevent the ID of each term from changing?
I've read in some issue that it could be due to the cache, but I have disabled the view cache and have also tried deleting the entire website cache without any luck. Any ideas?

πŸ› Bug report
Status

Active

Version

7.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain dcine

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024