Then I configured language translation by filename (EN and DE). I then copied the post-1 file into a new page bundle and renamed it to index.md. I added url = "post-1" to the front matter.
I then copied this file and renamed the copy to index.de.md. I changed the URL to url = "post-1-de". But opening this URL returns a 404
I tried to create a small test site based on your detailed description above:
git clone --single-branch -b hugo-forum-topic-48725 https://github.com/jmooring/hugo-testing hugo-forum-topic-48725
cd hugo-forum-topic-48725
hugo server
I cannot reproduce the problem. Tested with hugo v0.123.8-5fed9c591b.
I tried two new test sites and they all failed. Let me do further testing and see what’s wrong.
@jmooring I narrowed down the issue to the language being added to the URL (instead of /post-1-de I get /de/post-1-de. This also happened with one more test site I made. Somehow, adding url to the secondary language appends the language code to the URL.
(Also, somehow adding URL to the front matter of your example above results in it not being applied at all.).
That leading slash was the issue. I have a site that I went with the option of not adding the language code, so I forgot that the code is added by default for secondary languages.