getgrav / grav-plugin-langswitcher

Grav LangSwitcher Plugin
https://getgrav.org
MIT License
28 stars 26 forks source link

Find .md file of default language even when include_default_lang: false. (fixes #40) #60

Closed yankl closed 2 years ago

yankl commented 3 years ago

40 makes the plugin all but useless when site is configured so that include_default_lang: false.

This patch seems to fix it on my test site.

rhukster commented 2 years ago

I have merged a bigger "translatable slugs" PR that changes how the URLs are generated. I don't see any issue with that patch and include_default_lang false. It seems to work fine. Your PR doesn't seem to do anything different (except not work with the translated slugs). Please test with the next release and let me know if a fix is still required. Cheers.

yankl commented 2 years ago

@rhukster Unfortunately, as far as I can tell, not only does the PR you mentioned not fix the issue I've been experiencing -- it actually seems to introduce a new bug.

However, you were right not to accept my PR -- I confused the variables include_default_lang and include_default_lang_file_extension, and so my understanding of the origin of the problem, and proposed solution were wrong.

I propose an updated solution here: #68.

I opened a new issue for the seeming regression here: #69.