WBCE / WBCE_CMS

Core package of WBCE CMS. This package includes the core and the default addons. Visit https://wbce.org (DE) or https://wbce-cms.org (EN) to learn more or to join the WBCE CMS community.
https://wbce-cms.org
GNU General Public License v2.0
32 stars 22 forks source link

find better way to handle environments without cookie support #503

Open ghost opened 3 years ago

ghost commented 3 years ago

Some core parts and / or functions only work if cookies are supported in the browser.

We should find a solution for this

digitalbricks commented 3 years ago

Just as a reminder for the time this topic comes up again: In the files attached to this forum post I already did some digging in the code and found a solution (or better a potential cornerstone) for a language switch independent from cookies. Essentially this was done by moving the frontend class from the index.php to the initialize.php, making the language setting of the page ($wb->page['language']) available there. Also I had to do some other small adaptions but basically that worked fine, switched the language even with cookies disabled, doesn't needed any redirect and modules were able to react and load the correct language file.

BUT Unfortunately this solutions broke as soon as the site setting "Multilingual website" is enabled (PAGE_LANGUAGES == true) and I wasn't unable to figure out what's the reason. :-/

But possibly this could help you as a staring point for futher investigation.