Closed hmarth closed 5 months ago
@hmarth @luke- I have tried to reproduce this on several browsers by coping the URL legal/admin/page?pageKey=terms
in new tab and in all cases I can select language as expected:
The only way of having issues myself is for newly translated pages
@ArchBlood Thanks for the steps but I still could not reproduce it:
https://github.com/humhub-contrib/legal/assets/6995524/80977016-fce3-4854-b605-8aa9a0ad0a58
@ArchBlood Thanks for the steps but I still could not reproduce it:
https://github.com/humhub-contrib/legal/assets/6995524/80977016-fce3-4854-b605-8aa9a0ad0a58
Thanks for testing, I'll see if I can replicate the issue again.
Yeah, still getting this issue on my tests;
Uncaught TypeError: $(...).select2 is not a function
at page?pageKey=terms&language=eu:1385:32
Which leads to this line of code $("#pageLangSelector").select2().on("select2:select", function(e)
that fails, this P/R fixes the console errors so I can say that it does fix the issue.
@luke- You can merge this PR because @ArchBlood can reproduce the issue.
If the configuration page is loaded (legal/admin) and the user changes to the "Terms and conditions" tab, they can change the language. If the "Terms and conditions" tab is loaded "directly" (via legal/admin/page?pageKey=terms), select2 is not there initially. Changing languages is not possible, as the listener is not set.