FreeCAD / FreeCAD-Homepage

The homepage at http://www.freecad.org
GNU Lesser General Public License v2.1
23 stars 37 forks source link

current download link is dead #174

Open 1tylermitchell opened 2 weeks ago

1tylermitchell commented 2 weeks ago

Freecad.org - Download button links to a location that has a typo in it: https://www.freecad.org/downloads.phpen

https://www.freecad.org/downloads.php - this works, so looks like a language tags is getting added by mistake or is not being processed correctly.

1tylermitchell commented 2 weeks ago

Umm, looks like other links on the site have the same problem too!

chennes commented 2 weeks ago

@kkremitzki orr @yorikvanhavre any idea why this is happening?

deltafactory commented 2 weeks ago

@chennes It's related to the locale code moved to translation.php. Specifically, $lang = 'en'; which is appended to the URLs in header.php.

Prior to the latest commit, I believe $lang would either be blank or set to a querystring parameter based on the language specified in $_GET['lang'] (i.e. ?lang=en).

deltafactory commented 2 weeks ago

PR #175 looks like it should fix this with minimal changes.

kkremitzki commented 1 week ago

Broadly speaking, we have a variable type overload--$lang is being used to store an ISO 639 language code like "en", but also a URL query string like "?lang=en".

kkremitzki commented 1 week ago

Temporary workaround to this pushed via https://github.com/FreeCAD/FreeCAD-Homepage/commit/4e90896b61e7355f1f4088b598fd7bfb41ff057c but leaving this open for discussion on the underlying issue I mentioned in the previous comment

yorikvanhavre commented 1 week ago

My fault, sorry :/ Just submitted a PR for it