"Page not found" in Safari for embedded forum with UTF8 category names
Hi.
I have this strange issue with embedded forum (2.1.9) in wordpress when viewing with Safari (latest version). The forum is in Persian(Farsi) language and therefore category names are unicode characters. everything seems fine in any other browser but when user clicks on a category link, Safari shows the category page for a fraction of a second and then throws the "Whoops, page not found" error. things are fine when forum is not embedded and accessed directly.
I tracked down the issue to a bug in Safari about dealing with hashes in URL. some suggestions ( 1, 2 ) were to replace window.location.hash
with window.location.href
in embed.js, but this made things worst. I then changed line 139 of embed.js from
window.location.hash = currentPath;
towindow.location.href = '#' + currentPath;
But with no improvement. Still loads fine everywhere else apart from Safari, giving same error.
Forum location: http://www.iorff.com/fa/discussions/
_
Since it is in Persian, the main category links are the ones with large blue icons._
I appreciate any suggestions, other than forgetting about the embed.js and using an iframe instead
Comments
I can only emulate safari through linux/wine. So my tests were inconclusive, it difficult to test under this.
I think you have a Byte Order Mark at the start of you master template which can cause issues.
grep is your friend.
https://validator.w3.org/check?uri=http://iorff.com/forum/index.php&charset=(detect+automatically)&doctype=Inline&group=0&user-agent=W3C_Validator/1.3+http://validator.w3.org/services
grep is your friend.
Thanks for the reply.
I went through all my template files and other stuff with notepad++ and tried to remove the BOM, but the problem persists as well as the BOM!
I guess the main cause is still how safari handles hash in Urls (see here)
As a temporary workaround, I changed the addresses of categories manually via dashboard and replaced them with latin characters. The problem is gone. but it is not a bug fix.
@Amirali according to that page it is a straight up bug on Safari's end. Nothing should be done on your application's end other than notifying users of their buggy browser.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
You can remove BOM with
grep is your friend.