We help IT Professionals succeed at work.
Get Started
Troubleshooting Question

select2 search function not working correctly

Last Modified: 2021-01-12
I am using the select2 search function ( https://select2.org/ ) on the below links. However I am getting different results on my live site verses my dev site and can't work out why as I believe the code is the same. I assume there must be a difference, but I can't see it?

Dev site: https://dev.cmyuk.com/large-format-print/materials/guide/
Live site: https://www.cmyuk.com/large-format-print/materials/guide/

Please do the following...
Test the search function with the placeholder "Search by name" in the middle. As an example just type in "pongs", then select the first item, the click the search icon.
On the dev site this works correctly, but not on the live site. You will see the difference with the url parameter changes. If you inspect the code you will see the select2 value is different too.

I can't see where the code if different. Please help?

Watch Question
Most Valuable Expert 2020
Most Valuable Expert 2018
This problem has been solved!
Unlock 1 Answer and 17 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE