3

The Careers 2.0 CV's section showcasing my top Stack Exchange answers offers up/down arrow controls to reorder the answers. Clicking such an arrow is immediately reflected in the UI, moving the answer up or down. But as soon as I then reload the page, or view the public version of the CV (in incognito mode, not logged in), the order of answers is reset to what it was before I clicked the arrow(s).

The AJAX request to /cv/stack/move/{id} is (usually, see below) successful and returns true.

The exception is that some of the answers on my CV seem to have received an id of 0, and the /cv/stack/move/0 request returns a 404 (however despite this error, the UI still shows the answer being moved). I don't know whether these problems are related or not; the reordering is not persisted no matter if the id was broken or correct.

0

1 Answer 1

3

We were only looking at answer ids when trying to match answers to their sort order (sort order is stored in our db, we load questions from the api on every page load). When it was designed, we only allowed SO questions, so this wasn't a problem, then at some point we started allowing answers from other sites as well, but never updated the key to be Site & AnswerId.

When SO Meta and SE Meta split, this bug became much more pronounced because we let the system "fix" itself as part of that change by pulling in the moved answers automatically and we never went back to clean up the now disconnected answers in our db. Since the api doesn't return results for the migrated answers, having those extra rows sitting in there shouldn't have caused any harm. The result, however, was that anyone with a migrated answer was now guaranteed to have 2 answers with the same answer id in our db and since the key wasn't set up correctly, it was hitting an exception when it ran into one, and that exception was thoughtfully (sarc mark) swallowed up by a catch global exception.

I have updated the key and it should be working fine after the next push, 15 minutes or so.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .