Closed Bug 1520413 Opened 6 years ago Closed 6 years ago

Redirects on MDN pages don't seem to be working

Categories

(developer.mozilla.org Graveyard :: Wiki pages, defect)

All
Other
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: cmills, Unassigned)

Details

(Whiteboard: [specification][type:bug])

What did you do?

Tried to redirect

https://developer.mozilla.org/en-US/docs/Web/CSS/single-transition-timing-function

and

https://developer.mozilla.org/en-US/docs/timing-function

to

https://developer.mozilla.org/en-US/docs/Web/CSS/timing-function

1. Went into the two pages
2. Used the redirect button to set up an MDN redirect to the correct place
3. Saved them
4. Shift + refreshed them

What happened?

They just sit there with content "REDIRECT" displayed.

What should have happened?

They should redirect to the expected place.

Is there anything else we should know?

I can reproduce for the corresponding localized pages under /fr/ as well.
I wanted to check if that was specific to those pages and I was also able to reproduce using https://developer.mozilla.org/fr/docs/User:SphinxKnight/Test as a playground.

Both of these pages redirect for me:

This one does not, but looking at the source it does not appear to be a redirect:

Was there some action taken to fix them, or is it just 5 minutes after the cache expires?

Flags: needinfo?(cmills)

It seems https://developer.mozilla.org/en-US/docs/Web/CSS/single-transition-timing-function$compare?locale=en-US&to=1451928&from=1451896 fixed it for the first link

Mea culpa for my URL, I edited it with CKEditor and did not manage obtain the same markup

There is a recent change to redirects (bug 1404669) that would explain this.

Our CDN caches content for about 5 minutes, and varies on cookies. This means each logged in user gets their own version of a page, and all the anon users get the same page. You sometimes see this around edits; when you make a change, you get the old version of the page for a few minutes, while other people see the new version faster.

The bug for 1404669 was with how KumaScript renders pages with redirects. KumaScript requests the page source (?raw) and then returns the rendered page. For the last few years, ?raw returned redirects, so when you asked to regenerate a page, KumaScript was following the redirect to the new page, and getting the target page's content. When redirects appeared to take effect immediately, what was happening was the content from the target page was being duplicated on the redirected page. No one was paying too much attention to the URL, which had not switched to the target page. In some cases, this was exposing duplicate content to search engines, which is bad for SEO.

The change is to request pages with ?raw&redirect=no, so that the page source is the desired page rather than the source of the redirect target. Now when you use CKEditor to add the ``REDIRECT` magic, you will see it when you are done with editing. However, other users will see the last revision of the page, until the CDN cache expires, when they will see the redirect to the new page.

If the page is unpopular and uncached, you may be able to see the effect immediately by using private browsing mode or an alternate browser where you are not logged in.

Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(cmills)
Resolution: --- → WORKSFORME

I think Chris was pointing out something different that I might have figured out.

Using the "redirect" button from the CKEditor interface, you have a dialog window asking the name (title) of the page then an automatic lookup finds the slug which appears in the second field of the dialog.
Clicking on OK then automatically injects the necessary HTML for the redirect.

However, in Chris' cases (and during my test as well :( ) the page we want to redirect to has <timing-function> as its title (please note the "<" and ">") and it seems the "<" breaks the creation of the HTML code injected in the document.

If I test adding a redirect to another document without "<"/">" in its title, it works perfectly fine.

In other words, I think this is more of an editor issue rather than a cache, CDN or KumaScript issue.
Chris, could you confirm?

Status: RESOLVED → REOPENED
Flags: needinfo?(cmills)
Resolution: WORKSFORME → ---

Thanks for jumping on this, Sphinx/John, and thanks for the explanation John.

I've looked, and the two redirects seem to work just fine now. So we are all good.

Flags: needinfo?(cmills)

Julien, I get the same results as you when using CKEditor to redirect https://developer.mozilla.org/en-US/docs/user:jwhitlock/Timing_functiom, and I agree with your diagnosis of the issue (a change is needed in CKEditor).

Can you open a new bug against editing for this? I'm worried that this bug has too much history already...

Flags: needinfo?(sphinx_knight)

Yes, I'll open another one with more precise STR and will link to this one :)

Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Flags: needinfo?(sphinx_knight)
Resolution: --- → INVALID
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.