XF 1.2 Ipad Last Read

lostincable

Active member
Hi all, I am unable to validate this myself as I don't have an Ipad / IOS device.

But I am hearing from my user base that with the latest RC of 1.2 if a thread has pictures in it over multiple pages when you access the thread rather than take you to the latest post it takes you to the latest set of images.

Is anyone on an IOS device able to validate this or seen it already?

Cheers!
 

AndyB

Well-known member
I can validate this iOS bug.

The problem is the anchor tag doesn't work properly when images are present in a thread. The reason is that images in forum software don't contain the height information. So iOS is not able to render the page and scroll to the anchor tag.

This is a very annoying problem and I have reported this bug to Apple many times over the years, but they fail to even acknowledge it.

I hope someone here can test this bug on iOS 7 developer and see if it's been fixed, I doubt it has.
 

lostincable

Active member
I can validate this iOS bug.

The problem is the anchor tag doesn't work properly when images are present in a thread. The reason is that images in forum software don't contain the height information. So iOS is not able to render the page and scroll to the anchor tag.

This is a very annoying problem and I have reported this bug to Apple many times over the years, but they fail to even acknowledge it.

I hope someone here can test this bug on iOS 7 developer and see if it's been fixed, I doubt it has.
Okay, cool thanks andyb nice to know.

So its not Xenforo related its IOS as it can't get past the images?
 

AndyB

Well-known member
It's a complicated issue. If you set up a test, you will find that the first time you call the URL, for example:

http://www.yourforum.com/ios/test.php#anchor

it will scroll to the correct anchor even if there are images without the height parameter. But if you reload the page it will not scroll to the anchor. The issue is that Xenforo when you click a thread title with new posts, it does a redirect once the anchor point is calculated, hence the member sees the wrong post is scrolled to if there are images in the page.
 

lostincable

Active member
Hmm interesting, so I wonder if it is possible for xenforo to manipulate the redirect so IOS can work with it correctly?
 

AndyB

Well-known member
Hmm interesting, so I wonder if it is possible for xenforo to manipulate the redirect so IOS can work with it correctly?
As long as the redirect doesn't call the same script it would work. But the way Xenforo and other forums are designed is to call the thread script which solves for last read post and the same script calls itself again with a redirect with the anchor tag so it scrolls to the correct post.

There's no way Xenforo is going to change their code to fix a browser issue which only happens to iOS browsers.
 

Jeremy

Well-known member
Where the browser positions you after you load the page has nothing to do with XenForo. This is a browser issue.
 

AndyB

Well-known member
Where the browser positions you after you load the page has nothing to do with XenForo. This is a browser issue.
It's an iOS browser issue for sure. But it wouldn't occur if forum software would not redirect to the same script or included the height information for images.
 

Jeremy

Well-known member
Redirecting to the same script isn't an issue, and, XenForo doesn't redirect to the same script.
 

AndyB

Well-known member
Redirecting to the same script isn't an issue, and, XenForo doesn't redirect to the same script.
Just now I did the following:

1) Clicked New Posts
2) Clicked on the thread title (iPad Last read)

The link in step 2 is "http://xenforo.com/community/threads/ipad-last-read.55951/unread"

Once the thread was loaded the link in the URL shows:

http://xenforo.com/community/threads/ipad-last-read.55951/#post-596177

Notice how the link that I clicked is different than the link that I was taken to, I think that's called a redirect and as far as I know the same script is called.
 

Jeremy

Well-known member
Yes, it redirects. I never said it didn't. Regardless, it doesn't redirect to the same script as you have described.
 

AndyB

Well-known member
Regardless, it doesn't redirect to the same script as you have described.
You are correct, that is only an issue on forums that don't use MVC.

On Xenforo the same problem occurs though, if you call a thread with contains an image directly, for example:

http://xenforo.com/community/threads/select-for-thread-moderation-problem.55315/#post-589582

it will scroll correctly to post #10. But if the same thread were called using:

http://xenforo.com/community/threads/select-for-thread-moderation-problem.55315/unread

and assuming post #9 was the last read thread, it would not scroll to post #10 due to the image in post #1 and some sort of "redirect" or whatever is happening in the MVC.

Remember to test this with an iOS device because the problem only occurs with the iPad and iPhone.

Also note that the direct link will fail to scroll to post #10 if the page is reloaded.
 

Jeremy

Well-known member
If you reload /unread, its not going to go back to post #10, its no longer the latest unread post. Browser positioning has absolutely nothing to do with redirects, previous pages, or the software that runs on it. It is entirely dependent on the browser and how it has chosen to implement it its scrolling mechanism.
 

AndyB

Well-known member
If you reload /unread, its not going to go back to post #10, its no longer the latest unread post. Browser positioning has absolutely nothing to do with redirects, previous pages, or the software that runs on it. It is entirely dependent on the browser and how it has chosen to implement it its scrolling mechanism.
Lets use this link as an example:

http://xenforo.com/community/threads/select-for-thread-moderation-problem.55315/#post-589582

Clicking the link above using anything other than iOS will take you to post #10. Also you can reload the page as many times as you want it will always scroll to post #10.

Now try using an iOS device, what will happen is that it will scroll to post #10 only the first time the page loads. If you reload the page it will not scroll to post #10.
 

Jeremy

Well-known member
Your information on URL anchors is wrong. Completely wrong.

The browser (any functional browser) will take you to the same anchor each and every time you load a link with a URL anchor. iOS is no different.
 

AndyB

Well-known member
Your information on URL anchors is wrong. Completely wrong.

The browser (any functional browser) will take you to the same anchor each and every time you load a link with a URL anchor. iOS is no different.
Turns out that in my example in post #14, clicking that link should take you to post #10 the first time, but on a iOS device it will not.

What happens when you click that link in post #14 on an iOS device? Does it scroll to post #10?
 
Top