1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Ipad Last Read

Discussion in 'XenForo Questions and Support' started by lostincable, Jul 29, 2013.

  1. lostincable

    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!
     
  2. AndyB

    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.
     
  3. lostincable

    lostincable Active Member

    Okay, cool thanks andyb nice to know.

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

    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.
     
  5. lostincable

    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?
     
  6. AndyB

    AndyB Well-Known Member

    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.
     
  7. Jeremy

    Jeremy XenForo Moderator Staff Member

    Where the browser positions you after you load the page has nothing to do with XenForo. This is a browser issue.
     
  8. AndyB

    AndyB Well-Known Member

    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.
     
  9. Jeremy

    Jeremy XenForo Moderator Staff Member

    Redirecting to the same script isn't an issue, and, XenForo doesn't redirect to the same script.
     
  10. AndyB

    AndyB Well-Known Member

    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.
     
  11. Jeremy

    Jeremy XenForo Moderator Staff Member

    Yes, it redirects. I never said it didn't. Regardless, it doesn't redirect to the same script as you have described.
     
  12. AndyB

    AndyB Well-Known Member

    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.
     
  13. Jeremy

    Jeremy XenForo Moderator Staff 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.
     
  14. AndyB

    AndyB Well-Known Member

    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.
     
  15. Jeremy

    Jeremy XenForo Moderator Staff 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.
     
  16. AndyB

    AndyB Well-Known Member

    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?
     
  17. Jeremy

    Jeremy XenForo Moderator Staff Member

    Every link with an anchor will go to the same exact spot. Regardless of browser.
     
  18. AndyB

    AndyB Well-Known Member

    Have you tried it on an iPad or iPhone?
     
  19. Jeremy

    Jeremy XenForo Moderator Staff Member

    I use my iPhone more than I use my computer to browse.
     
  20. AndyB

    AndyB Well-Known Member

    Last edited: Jul 30, 2013

Share This Page