Tikhonov Ivan Posted March 31 Share Posted March 31 (edited) After upgrade we've noticed the new btoa() function and error "failed to execute btoa()" in global_global_core.js As a result, pagination for cyrillic urls stopped working. See https://developer.mozilla.org/en-US/docs/Glossary/Base64#the_unicode_problem As a temporary solution we implemented the convertion between UTF-8 and single-byte representations before call btoa(), like Quote const toBinaryStr = url => { const encoder = new TextEncoder(); const charCodes = encoder.encode(url); const binString = Array.from(charCodes, (byte) => String.fromCodePoint(byte), ).join(""); return binString; }; <...> this._stateKey = `table${btoa(toBinaryStr(this.scope.attr('data-baseurl') ? ips.utils.url.pageParamToPath(this._cleanUpURL(this.scope.attr('data-baseurl')), this._pageParam, 1) : ''))}`; Edited March 31 by Tikhonov Ivan Link to comment Share on other sites More sharing options...
Tikhonov Ivan Posted April 1 Author Share Posted April 1 Would you, please, fix this core bug of global_global_core.js soon? It is inconvenient to apply above custom patch every time after clearing system caches. I believe every forums with non-Latin topic urls are affected. Link to comment Share on other sites More sharing options...
Jim M Posted April 1 Share Posted April 1 Please ensure that you have applied the latest release and all patches. I have tagged a developer to review what you have posted though. Tikhonov Ivan 1 Link to comment Share on other sites More sharing options...
Tikhonov Ivan Posted April 1 Author Share Posted April 1 16 minutes ago, Jim M said: Please ensure that you have applied the latest release and all patches. I have tagged a developer to review what you have posted though. Thanks, Jim. That's the point of latest release as well, compared with v4.7.15 the btoa() function appeared in core java-script and utf-8 character string is unacceptable as a btoa() argument. Link to comment Share on other sites More sharing options...
Ohanzee Posted April 1 Share Posted April 1 I am having the same problem on my site with forums that have letters such as 'š', 'đ', 'ž', etc. Tikhonov Ivan 1 Link to comment Share on other sites More sharing options...
Marc Posted April 2 Share Posted April 2 Thank you for bringing this issue to our attention! I can confirm this should be further reviewed and I have logged an internal bug report for our development team to investigate and address as necessary, in a future maintenance release. Darek_Hugo, Ohanzee and Tikhonov Ivan 1 1 1 Link to comment Share on other sites More sharing options...
Stuart Silvester Posted April 3 Share Posted April 3 We're going to address this in a patch (likely tomorrow) with some other items but in the meantime you can go to AdminCP > Search Engine Optimisation > enable Rewrite FURLs (and follow the instructions). This will work around the issue since it's only a problem when FURLS are not used. Marc 1 Link to comment Share on other sites More sharing options...
Solution Stuart Silvester Posted April 5 Solution Share Posted April 5 We have released a patch to address this issue. Please go to AdminCP > System > Support and apply the patch from the first/top left box. If you do not see an option to install the patch, you already have the latest release. Additionally, as previously noted, enabling URL Rewriting will also fix this issue. Marc, Tikhonov Ivan, stoo2000 and 1 other 4 Link to comment Share on other sites More sharing options...
Recommended Posts