doc-suse-com / site

Issue Tracker for documentation.suse.com
https://github.com/SUSEdoc/documentation.suse.com-issues/issues
5 stars 0 forks source link

CaaSP docs can't be opened anymore #54

Open ghost opened 2 years ago

ghost commented 2 years ago

Any of the HTML/PDF links from https://documentation.suse.com/suse-caasp/4.2/ now leads back to that exact page.

This happened as fallout of commit cfe9fcc73 in docserv-config which appears to have gone in without testing.

Fix (untested):

diff --git a/server-root-files-doc-suse-com/.htaccess b/server-root-files-doc-suse-com/.htaccess
index 14fb10d..2d7e1da 100644
--- a/server-root-files-doc-suse-com/.htaccess
+++ b/server-root-files-doc-suse-com/.htaccess
@@ -261,7 +261,7 @@ ErrorDocument 503 /error.html

   RewriteRule       ^([a-z][a-z]-[a-z][a-z]/)?(suse-cap/(1\.4\.1))/(html|single-html|pdf|epub)(/.*)?$                   /$1$2/ [R=301,L]

-  RewriteRule       ^([a-z][a-z]-[a-z][a-z]/)?(suse-caasp/([123]|4\.[012]))/(html|single-html|pdf|epub)(/.*)?$            /$1$2/ [R=301,L]
+  RewriteRule       ^([a-z][a-z]-[a-z][a-z]/)?(suse-caasp/([123]|4\.[015]))/(html|single-html|pdf|epub)(/.*)?$           /$1$2/ [R=301,L]

   RewriteRule       ^([a-z][a-z]-[a-z][a-z]/)?(ses/([1234]|2\.1))/(html|single-html|pdf|epub)(/.*)?$                     /$1$2/ [R=301,L]

[ @taroth21 @tomschr ]

tomschr commented 2 years ago

Thanks Stefan. I've created a separate issue in our internal Gitlab, merged it and synced it to d.s.c.

ghost commented 2 years ago

That appears to work. Thanks.

However, while you're at it, you may want to rebuild en-us/suse-caasp/4.5 without any changes because that page still links to documents that are now (purposely) inaccessible.

tomschr commented 2 years ago

Hmn, I've rebuilt 4.5 and synced it to d.s.c. However, I see a "loop" now: When I go to suse-caasp/4.5 and click HTML, it shows the page again. :thinking:

ghost commented 2 years ago

Thanks -- looks as expected to me now, the HTML links are gone:

image


However, I see a "loop" now:

The loop is (or, was) intended: Since the HTML/PDF are no longer online, we redirect to the main page instead.

There was a suggested improvement to this behavior: Redirect HTML/PDF deeplinks to a newer (supported) product version (and ideally show a notification that there was a redirect). I never got around to implementing that however. Using RewriteCond with the -f flag should allow that.

Keeping content online but showing a notification like docs.python.org or the MS docs is yet another option. However, that means you need to make sure to get the old docs out of the Google index.


I've created a separate issue in our internal Gitlab

Fwiw, at the time, I created this issue tracker which is also linked from the dsc homepage, because dsc is a public site and it thus makes sense to have a public issue tracker. Using an issue tracker that is locked behind a VPN is yet another way to make things at SUSE less transparent.

(I also don't understand why you are filing issues for things that you're fixing immediately anyway and that also have a corresponding PR/MR anyway but hey.)

tomschr commented 2 years ago

Thanks -- looks as expected to me now, the HTML links are gone:

Ok, that's great. :+1:

... is yet another way to make things at SUSE less transparent. [...] things that you're fixing immediately

Well, I prefer to open a MR on GitLab although it may be only one commit. It's my habit. We do things differently and that's ok. Consider it as "intransparent" if you like, but the overall change is identical.

ghost commented 2 years ago

Well, I prefer to open a MR on GitLab although it may be only one commit. It's my habit.

I was not talking about making an MR. I was talking about refiling the issue internally, as you wrote: "I've created a separate issue in our internal Gitlab". I pointed out that for issues, using this issue tracker makes more sense than one hosted within a VPN. (The internal issue tracker may be useful for stuff that legitimately is internal,)