• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 4.x Series
    • Bug
    • Empty attachment box displayed

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: Empty attachment box displayed

    • Issue Tools
      • View Changes
    1. issueid=5423 July 3, 2018 9:57 AM
      Alfa1 Alfa1 is offline
      Distinguished Member
      Empty attachment box displayed

      If a user has no permission to see an image then nothing should be displayed.
      Currently the user sees an empty box if there are no permissions to view.
      This should not happen.
    Issue Details
    Issue Number 5423
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Attachments
    Status Fixed
    Priority 5 - Minor Bugs / Small Tweaks
    Affected Version 4.0.23
    Fixed Version 4.1.0 RC 1
    Milestone (none)
    Software DependencyXenForo 1.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. July 5, 2018 6:45 PM
      pegasus pegasus is offline
      VaultWiki Team
      It is not recommended to post images that a user can't view inside content that the user can view. Since it is not practical to check the user's image permissions when rendering the content (due to caching and expense), instead we should show a stock image representing that the requested image is not allowed or available. This presents issues with empty frames/borders when a caption is not provided. Will try to put these error-images into 4.1.x.
      Reply Reply  
    2. July 5, 2018 8:24 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      I don't think this is a sound solution. Its standard forum behavior to not display anything if the user does not have attachment permissions.
      It was possible in VW3. Why not in VW4? If I embed a forum image into a wiki then it will not display if the user has no permission. VW should do the same.
      Reply Reply  
    3. August 22, 2018 1:46 PM
      pegasus pegasus is offline
      VaultWiki Team
      Lazy loading is new in VW4 and lazy-loading an image requires that all content above it has a known height (even if the content contains another image that would be lazy-loaded) or the loader will miss when the image has scrolled into view. This requires us to define the height of the image container before the image is lazy-loaded and to enforce that the height not change after loading has completed (lest later lazy-loaded images be shifted and mess up the calculations).

      We can add a setting allowing admins to disable the lazy-loader, but it really saves a lot of bandwidth.
      Reply Reply  
    4. August 22, 2018 3:10 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      There is a lazy load addon for xenforo. IIRC it doesnt display empty boxes. If a XF attachment is missing then nothing is displayed. Maybe the same approach could be useful for VW?
      https://xenforo.com/community/resour...load-img.3979/

      For my site the bandwidth cost is irrelevant (we use cloudflare)
      Site speed is important, which is why I will probably turn the above addon on again.
      Reply Reply  
    5. August 26, 2018 12:41 PM
      pegasus pegasus is offline
      VaultWiki Team
      Another issue I see with lazy-loading without known heights is that if 1000 images are in a row with no text, they will all be in the viewport before they are loaded, so all 1000 images would start loading even if they would be pushed out of view by the final heights of the adjacent images. I think this might be an issue for the underlying library in the add-on you linked, which only seems to implement a time-based throttle.

      If we add an option for allowing unknown heights in VW, we will have to implement a counter-based throttle like only having a maximum of 10 lazy-load slots at any time.

      In the end, I think we would make this an option; whether you want un-loadable images hidden, whether you want an error-image used, or whether lazy-loading should be disabled.
      Reply Reply  
    6. August 26, 2018 1:20 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      That would be good.
      Reply Reply  
    7. January 9, 2020 1:09 AM
      pegasus pegasus is offline
      VaultWiki Team
      This is marked as fixed in the next release.

      In the next release, a new VaultWiki: Aesthetics option:
      Lazy load wiki attachment images?
      0 - No
      1 - Yes, using fixed heights, loading indicators, and error notices. (default)
      2 - Yes, using browser-default size before loading and on errors, with a throttle.

      When there is a problem loading the image:
      #1 will use CSS to render a relevant error icon, and the alt text is changed to a relevant error message (like "You do not have permission...", "Resource not found", etc).
      #2 will just use the browser default for failed images, which might be a 0x0 render, or might be a small red X. As I discussed above, since this would make the document height unknown, we have a lazy-load queue that can only contain 10 images at a time, recalculating the height after each image. This prevents all images from loading at once when later images might end up off-screen after an earlier image loads.
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 2:38 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.