doctrine / doctrine-website

Source code for the doctrine-project.org website and documentation.

Home Page:https://www.doctrine-project.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation Links Broken

shkkmo opened this issue · comments

commented

Many of the links throughout the web to doctrine's documentation have all been broken. This includes a large number of links from blogs and from stackoverflow.

Example:
http://docs.doctrine-project.org/en/latest/reference/advanced-configuration.html

The issue appears to be a re-organization that moved that resource to:

http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/advanced-configuration.html

Instead of showing a "Page not found" error, that resource (and all other moved resources) should provide a 301 redirect response to the new url for that resource.

It is unfortunately not possible to do currently because we use a statically built website and github pages. It might be possible to build a map of redirect rules and do it in javascript though.

commented

Would that work with HTML too? We generate HTML from RST manually and only publish final HTMLs on the GH Pages.

commented

Yes. The article I linked talks about using a plugin for github page's default static build tool, Jekyll, that generates static pages that use the refresh meta tag as an inferior substitute for a 301 redirect.

I don't know the details of your build process, but having the ability to not break links to documentation seems pretty important.

It's important to note that it also includes different subdomain, which may significantly complicate things.
It may be a lot easier to set up static redirects with NGINX for some period. I'll discuss that with @jwage if there is some sane way to get old -> new URL map to set it up.

commented

I see this was never fixed. Due to issues like this, I have implemented a new policy of always archiving referenced documentation pages using web.archive.org/save/ and linking to the archived page.

However, this does not fix the numerous links that have been broken from sites like stackoverflow.

I see you moved the documentation yet again, now to a new sub domain. You do have redirects working there, but the older links, such as the example I posted, are all still broken and do not redirect properly.

commented

Perhaps the scale of this issue is not understood? Just looking at the top doctrine tagged questions / answers on StackOverflow, they almost all have links to your documentation that have been broken. This seems like a rather significant issue to me.

https://stackoverflow.com/a/2062636
https://stackoverflow.com/questions/3376881/default-value-in-doctrine
https://stackoverflow.com/questions/2062473/php-orms-doctrine-vs-propel

I can understand the Doctrine 2 issues, but the 1.2 docs surely aren't relevant anymore.

Anyway, having a report of links that got broken by the move by this (by generating the old website locally) would be more helpful. The understanding of why this is problematic is very clear.

Anyway:

I see this was never fixed.

We aren't paid to work on this: step up and jump in on this work, if it is something you care about.

As for the implementation, <meta http-equiv="refresh" content="0; url=target-uri-here" /> plus <link rel="canonical" ... would be sufficient.