When I visit a rarely-used Stack Exchange site (homepage, e.g., drupal.stackexchange.com) I get the familiar banner:

enter image description here

in which the link "Click here" has URL such as


Unsurprisingly, that page is 404.

Reproduced on several sites (Drupal, Gardening, Wordpress) in Chrome 37.

Also reproduced in Firefox 32.0.3 on multiple sites (Data Science, Gardening). But on Beer.SE the URL was different from the above:


How odd.

  • 4
    Wow, that's $adjective$. – Doorknob Oct 9 '14 at 23:07
  • 1
    Reproduced in Chrome 38 on Meta.SE and StackOverflow. I have no idea how I'm getting it; it appears seemingly at random. – APerson Oct 10 '14 at 1:56
  • 1
    Happens to me, too, consistently. Boardgames, writers, arqade, programmers, ELL, Emacs, CogSci. – Meta Ellen Oct 10 '14 at 7:21

This was an issue with Moonspeak, our localization engine. Fixed now (or rather, worked around until the underlying issue is fixed) and works fine again. Thanks.

| improve this answer | |

This looks like a very recent regression. Specifically, looking at the current version of full-anon.en.js, the code that injects this message is, indeed, clearly bugged:

message += returnTo
    ? '<a href="%24url%24">Click here<\/a> to return to your last location.'
    : '<a href="%24url%24">Click here<\/a> to refresh the page.';

However, the same code, in the old version I had cached in my browser, used to look like this:

message += returnTo
    ? (function(n){return'<a href="'+n.url+'">Click here<\/a> to return to your last location.'})({url:"javascript:window.location='"+returnTo+"'"})
    : (function(n){return'<a href="'+n.url+'">Click here<\/a> to refresh the page.'})({url:"javascript:location.reload(true)"});

So, yeah, looks like somebody needs to revert the code to a working state.

Ps. While I expect this to be fixed quickly, just for fun I whipped up a user script fix and added it to the devel branch of SOUP. Here's the code:

SOUP.hookAjax( /^\/users\/login\/global\b/, function ( event, xhr, settings ) {
    var match = /[?&]returnurl=((https?:\/\/|\/)[^&]*)/.exec( location.search );
    if (match) {
        var url = decodeURIComponent( match[1] );
        var jsCode = "location=" + JSON.stringify( url );
    } else {
        var jsCode = "location.reload(true)";
    var jsUrl = 'javascript:' + encodeURIComponent( jsCode );
    $('#overlay-header a[href="%24url%24"]').attr( 'href', jsUrl );
} );

As a slight bonus, by using such fancy new techniques as regexps and JSON.stringify(), I managed to make this hotfix somewhat cleaner and more robust that the actual SE code it replaces. If you're feeling adventurous and want to test it, you can install the development version of SOUP using a user script manager like GreaseMonkey or Tampermonkey.

| improve this answer | |

You must log in to answer this question.