Detective developer: entertaining puzzles from real life

In the midst of a long routine of web development, I sometimes encounter unusual errors. Here, everything seems to be fine - and so it works, and this way it works. And in the third - it does not work, although at first glance it should. I just love the process of finding the causes of such errors and would like to share some of these stories. The answers (which actually was not so) will be published in a couple of days.
1. Mysterious slider
There are two support sites (not developed by me), online stores. The code is completely identical - both the frontend and the backend (one is copied from the other after the development is completed). On the main page of both sites, among other things, there is a regular javascript slider with goods.
Once the customer turned and said that one of the sliders “broke”. Stopped spinning (automatically and when the buttons are pressed). When exactly he broke, he can’t say, but the code has clearly not been modified for a long time. And, most importantly - another slider on another site works like a clock.
As I already said, the site code is identical, the only differences are the hosting provider, domain, name, and also a different assortment of goods (only 20 percent intersects).
What could be the reason for the breakdown?
Important tip: both sites are engaged in perfumery.
2. Mysterious basket
The same two sites. The customer complains that on one of the sites products are sometimes not added to the basket (by clicking on the product page). But - only on one of them.
Superficial testing showed that the problem is reproduced, and in fact, only on one of the sites. A problem arises only if you open the catalog and try to open product pages from there as soon as possible and click on the "Add to Cart" button.
There are no JS errors in the console, the only thing is that it cannot find a file of some picture-icon from the site template:
GET http:// домен_cайта /img/1.gif 404 (Not Found)But the error occurs on both sites and the domain is always indicated correct (your). Yes, and what does this have to do with it?
3. The mysterious google map
Support came from someone else’s custom code with a Google map on which points of found cities were to be displayed. The meaning is simple - the coordinates of the city are searched for by the text name of the city and a dot is put in them.
We enter London - we get a point in London, we enter Paris - also at first glance everything looks right. But no other city works correctly - the points are in the middle of a completely different country. USA, RF, Asian countries - everything is not there.
At first I thought that maybe it still finds small namesake cities on the specified coordinates, but no, I looked on the map - and there are none close. And some points are generally indicated somewhere in the sea.
I looked at the code, excluded the possibility of a hardcode of city coordinates. No matter how many tests, it seems that nothing works, but London finds something stable!
I am sure that many also have a couple of such interesting stories. Please feel free to add them to your post comments.
Answers:
Task 1
Samouvazhektra
about the perfume slider, I suspect that some French name with the apostrophe
andyudol might have caused a problem .
In which, instead of the apostrophe, a single quote is printed.
Exactly!
about the perfume slider, I suspect that some French name with the apostrophe
andyudol might have caused a problem .
In which, instead of the apostrophe, a single quote is printed.
Exactly!
Task 2
It turns out that a picture not found can still influence. On one of the hosting sites, it was configured by default to display a standard 404 page, on the other - a leafy one, with counters and pictures. The handler connected to the basket button on document.ready, so on one of the sites he did not always have time to connect - he waited until the page was fully loaded.
I decided simply by adding a transparent single-pixel image with the desired name.
I decided simply by adding a transparent single-pixel image with the desired name.
Task 3
andrew72ru
The latitude and longitude of
BratSin are mixed up on the map
... Rather, something with longitude. ...
Yes, the problem was with longitude - an error was made in the variable for it, so an empty value (zero) was always transmitted.
The latitude and longitude of
BratSin are mixed up on the map
... Rather, something with longitude. ...
Yes, the problem was with longitude - an error was made in the variable for it, so an empty value (zero) was always transmitted.