Fixed XF 2.0 & ios 7

Edrondol

Well-known member
One of my users posts almost exclusively on his iPad, which only has iOS 7. We moved to XF 2.0 today and he says he's unable to post anything. Anyone know of any known issues or having similar issues?
 
It's possible it is a issue with iOS 7. The user should update, XenForo only supports the two most recent versions of any given browser, so in the case of iOS that's effectively any iOS 10 and iOS 11 devices.
 
Regardless if you can use iOS 9 or not, it is unsupported as well as anything older. With iOS 12 looming, it won't be long before XenForo no longer consider iOS 10 to be supported either.

Best to update tbh, iOS 7 has not been updated on almost four years.
 
I know, but unfortunately in the software world, there comes a point where a company has to stop supporting older versions.
 
It’s actually over 4 years old since its original release and coming up to 5 years.

It’s correct that technically we only support iOS 10 and 11 officially. There’s likely going to be a myriad of issues on iOS 7 and likely iOS 8. Mostly related to flex box CSS and how things are laid out on screen.

There has to be a cut off point somewhere. That said, posting is fairly fundamental. I’d bet that even older IE versions that we do not support can probably post, at least. If we can have more details of the specifics of “unable to post” then it might be something we can address - such as perhaps disabling the rich text editor for that advice or some other graceful degradation.

I’ll test it on the Simulator too but more details from the user would be useful.
 
I’ll test it on the Simulator
Actually, I can't do this due to its age it's unavailable, so we're certainly working blind here. As I'm sure you can appreciate, we can't exactly debug or support anything where we can't reliably reproduce issues and test fixes.

If you could ask your user to visit this URL from their iPad and report back their User Agent string, that will be a good start.

https://www.whoishostingthis.com/tools/user-agent/

The bit we need will look a little like this:

1519003441662.webp
 
Amazing and thanks. I was actually hesitant to put this in bug reports because I'm not sure it really was a bug as much as someone using outdated tech.
 
Well our usual course of action here is that we would often just disable the rich text editor, as usually there would be some incompatibility there.

We currently disable the rich text editor in iOS 6 and below. We could add iOS 7 to that, but Froala is supposed to be able to run iOS 7 and iOS 7 should still support jQuery 3.x, so I'm somewhat at a loss as to what the specific problem is. You've also not really elaborated much aside from "unable to post", so if you can provide more details on the specifics, then we might have a better idea on how we should proceed.

Finally, could you ask if he can use the rich text editor on the following site without issue?

https://www.froala.com/wysiwyg-editor
 
From the user:

I tap the post box and it isn't bringing up my keyboard. It won't make the connection. I actually can't post at all. I'm trying my other browsers, but I can't quite get the iPad to work. :(

Okay, it still won't let me post in the other themes. I've tried Safari, Chrome, and and Photon. I can use the remote browsing feature in Photon to post. It's the only way I can post on my iPad in any capacity. I'm posting on my phone now.

I will ask him about the rich text on the other site.
 
I guess it's possible he might not even be able to see the editor on the page if it's totally broken.

He might need to be shown that it should look something like this:

www.froala.com_wysiwyg-editor(iPad).webp
 
Oh. Tried it. Can't post on that. Won't even put down a typing cursor or show the whole test box on my iPad.

So it's the rich text editor conflicting with iOS7. If there's not something quick and easy I can do in the ACP I'm going to tell him he has to update.
 
As a temporary measure, there's a code edit you can make.

You have to open the file src/XF/Template/Templater.php and find:
PHP:
if (preg_match('#(iphone|ipod|ipad).+OS (\d+)_#i', $ua, $match) && intval($match[2]) < 7)
And replace with:
PHP:
if (preg_match('#(iphone|ipod|ipad).+OS (\d+)_#i', $ua, $match) && intval($match[2]) < 6)
(It's just changing the 7 for a 6).

It will disable the rich text editor, and he should be able to type in that without issue.
 
Changed and awaiting response. Whether this works or not, you've been amazing doing this for 1 user on 1 smallish board.
 
Well, it could potentially affect more than that. Posting is pretty fundamental so if we can make sure that works, or at least there's workarounds in place that don't totally break it on older browsers, then I think that's reasonable. We don't officially support IE9, but I think even on there things (like posting) should generally work. Also, given that the most likely culprits, jQuery 3.x and Froala, specifically report compatibility with iOS 7+ then we should make some effort there.

It would seem to be a Froala issue so we've reported it to them:
https://github.com/froala/wysiwyg-editor/issues/2585

I've also committed the code change I gave you, so if they take some time to resolve it (or can't) then that should at least make posting functional.
 
You know I'm not sure what my brain was thinking for a sec there. I gave you the wrong change.

The line of code mentioned above should be changed to:
PHP:
if (preg_match('#(iphone|ipod|ipad).+OS (\d+)_#i', $ua, $match) && intval($match[2]) < 8)
(Changing the 7 for an 8).

Sorry about that.
 
BAM! This worked. He at first said it didn't, but I had him completely get out of the app (double tap start button & close app) and that did the trick!

You're a man among boys, @Chris D ! Many thanks!
 
Back
Top Bottom