Online train ticket web site woes
-
Today, I was helping my mother order train tickets online. She wanted two sets of [url=https://www.ns.nl/producten/web/WFS/ns-website-Site/en_US/-/EUR/ViewProduct-Start?SKU=ns-groepsretour&CategoryName=]group tickets[/url], so she filled out all the details and clicked “Add to cart” for the first batch — fine. Then the same for the second, but instead of a page with the cart with two group tickets, it showed a page with the error message “Er is iets misgegaan” (“Something went wrong”) and two options: try again or go back to the previous page. No explanation of what went wrong, no links for more information or possible fixes — nothing.
“Try again” didn’t do anything at all that we could see, and “Back to the previous page” brought us to the form again, with almost no data in it but with some things going wrong that required a page reload to fix — which, of course, also cleared the form. So we filled out all the details again, hit “Add to cart” and ended up with the same useful error message.
So … check out and pay for the first batch, then give it another go. Guess what? Same result. This had us getting annoyed, but because of the verbosity of the error message, I had no idea of where to even begin looking to get around it.
Eventually we ended up phoning customer support, and when I finally got through to some technical support person, about the first thing he told me to do after I explain the problem, was clear the temporary internet files. That had me asking him “why?” before doing it, because I figured it’s one of those default solutions that people recommend on the basis that it won’t hurt even if it doesn’t do anything. It turned out that the problem was known to him, and it’s caused by stuff from the previous purchase remaining in the browser’s cache, which throws off any subsequent attempts to order tickets. And indeed: after I deleted all cookies, cache, etc. from ns.nl, we could order a second set of tickets without error warnings.
After that came the bonus WTF that nicely ties in with [url=https://what.thedailywtf.com/t/the-state-of-web-development/50088/128]the state of web development[/url]. The train tickets are supplied as PDFs for you to print out; these PDFs are provided on a page with a download link to each of them. However, instead of implementing these links with a regular
<a href="yourticket_no_1234567.pdf">
, they’re done as follows:
[code]
[/code]
… which means you can’t just right-click the link and choose “Save” or “Save as…”, or Option-click the link to send it straight to your Downloads folder. No, you have to click the link, wait for the PDF to open in a new tab, save the file, close the tab, and repeat with the next link. Or print, but it seems safer to me to download them all first, just in case.Then there’s the minor thing that all the files have cryptic names that are little more than a prefix with random letters and numbers. If you lose track of which ones you’ve already downloaded, you’ll have to re-click each link, check the PDF’s URL, and see if you already downloaded it or not. (No, you can’t check a tooltip or the browser’s status bar, because as you can see above, there’s no content for
href
.) In any case the files’ naming is stupid, because you have to fill out a name and/or email address for every person who is to use the tickets, so it’d be trivial for the site to just use that as the filename so the buyer can easily check which file is for which person.Oh, and for added fun, if you speak Dutch, try getting [url=https://www.ns.nl/virtuele-assistent/virtuele-assistent]Eva[/url] to understand your order went wrong so she’ll direct you to a help page.
-
However, instead of implementing these links with a regular <a href="yourticket_no_1234567.pdf">, they’re done as follows:
Could be worse. They could be setting the href to something else than the onclick, so that the middle-click takes you somewhere else than the left click. Preferably to something that's only kinda-sorta the same, or crashes occasionally when done one way, but not the other. And also make your click handler retarded so that on some devices, the click activates both, giving you a new tab with the target, and opening the target in your old tab.
...naaaah, that's stupid, who would ever want to do that, am I right?
-
caused by stuff from the previous purchase remaining in the browser’s cache
This usually means that they're storing the whole shopping basket in the session and it's not being handled correctly.
-
I'll take "How does Discourse handle click events?" For $100.
-
Ah, the NS. One could run the frontpage of this site for months just on their WTFs without running out of material.
-
This usually means that they're storing the whole shopping basket in the session and it's not being handled correctly.
Either that, or they're abusing LocalStorage.
I'd be surprised to learn it was actually a cache issue. But, hey, who knows.
(Maybe they use old-style AJAX where you serve up a custom-made .JS file into a script tag to supply data, but forgot to set the no-cache header on their server.)
-
Train companies seem to be their own brand of crazy.
I could write a book with every WTF I've personally suffered from Renfe.
-
This usually means that they're storing the whole shopping basket in the session and it's not being handled correctly.
Keeping the basket in the session is
finenot an entirely awful idea. You don't actually care too much about what someone orders until they pay for it. (Once they've paid though…)
-
Yeah, of course not, although this brings a whole lot of problems, like breaking any attempt of simple load balancing and other stuff like the PM reports unless you're not careful.
-
You don't actually care too much about what someone orders until they pay for it.
The problem in this particular case seems to be that once you’ve ordered something, you can’t order anything else, even after you’ve paid for the first one. Well, not unless you do things that many people won’t even know about (removing cached data), and that they’re only told about might solve the problem after making a phone call to customer support, because nothing on the site tells them about it.
-
The problem in this particular case seems to be that once you’ve ordered something, you can’t order anything else, even after you’ve paid for the first one.
That'd be crazy! It would also be the sort of shit that might slip through the net because a ticket website operator might not test for it. (Checkout ought to clear the shopping cart, so to speak.)
-
That bloody site is getting worse …
Preamble: After ordering, paying for, and printing the second set of tickets by clearing the cache etc. as I described above, it was noticed that the date on them was wrong — our mistake, we appear to have accidentally clicked “tomorrow” instead of the field to enter a date further in the future. Calling customer service, we were told that by sending in both the wrong and correct tickets after the trip, the wrongly-dated ones would be refunded (they’ve got a serial number, you have to check in before using them, etc. so I presume they can tell they’re unused). Good service, I’d say.
That, of course, leaves us having to order a new set of tickets, but the fucking site keeps giving the “Something went wrong” page even after:
- clearing the cache
- restarting the browser, then clearing the cache and restarting the browser once more
- restarting the whole computer …
¹ Nobody knows why the railway company needs these details — you can buy anonymous tickets from any ticket vending machine at any station, but as soon as you order through the web site, you can’t without telling them these things, which will get printed on your ticket.
² Well, almost. The text box for the number of tickets will still display what you set it to, but if that’s 10 (the maximum allowed), the +-button will be enabled while the −-button is disabled, and clicking the + disables both without doing anything else. The only recourse is to reload the page.Luckily, though, as I was trying to get the damned site to cooperate, it popped up a window asking if I wanted to participate in a customer survey. I used it to complain about out most of the things I said in my first message above, and decided to include a link to this thread with the advice to pass it on to whoever is responsible for building that web site. (Hey, I can dream, right? :) )
Now I’m typing this, I decided to also take a quick look at the HTML, because of another I noticed: if my mother had the browser fill in her details automatically, it ended up putting her email address in the email field for all tickets that we’d already filled out. See if you can tell why:
[code]
<input type="text" name="PO_Email_1" tabindex="1" data-regex="email" id="Email-E-ticket”><input type="text" name="PO_Email_2" tabindex="1" data-regex="email" id="Email-E-ticket”>
[/code]
-
-
They ought to fix that one of these days. Say, by having the browser do it.