• 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
    • Attachments will not load in Safari

    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: Attachments will not load in Safari

    • Issue Tools
      • View Changes
    1. issueid=4874 January 14, 2017 6:36 PM
      samh004 samh004 is offline
      New Member
      Attachments will not load in Safari

      We have just updated to the latest version of VaultWiki and have discovered that attachments seem to not want to load when using the Safari web browser. Everything is fine in Chrome however.

      When first loading a Wiki or even a forum thread, an attachment displays a loading GIF of three bars, known as "upload progress". In most web browsers, the image then loads. However on Safari it never loads. I am not sure if this is a bug in Safari or in VaultWiki, but prior to 4.0.16 we were using 4.0.13 and we didn't even see the "upload progress" GIF, attachments just loaded.

      See here for example in Safari: http://www.australianfrequentflyer.c...-Report-a-Post



      Hoping there is an easy fix and that I don't have to wait for the next release as the VaultWiki attachment system is really useful over the standard vBulletin attachment system.
    Issue Details
    Issue Number 4874
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Attachments
    Status Fixed
    Priority 3 - Loss of Functionality
    Affected Version 4.0.16
    Fixed Version (none)
    Milestone (none)
    Software DependencyvBulletin 4.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags attachments




    1. January 16, 2017 1:16 PM
      pegasus pegasus is offline
      VaultWiki Team
      In uncompressed vault/resources/js/lazy.js, find:
      Code:
      src = src.substring(5, src.length - 2);
      Replace with:
      Code:
      src = src.slice(4, -1).replace(/["|']/g, '');
      Find:
      Code:
      src = bgFallback.substring(5, bgFallback.length - 2);
      Replace with:
      Code:
      src = bgFallback.slice(4, -1).replace(/["|']/g, '');
      Reply Reply
    2. January 16, 2017 8:10 PM
      samh004 samh004 is offline
      New Member
      Thanks for this, but we can't find those values in the file. Am I looking at the wrong file?

      Code:
      /************************************************************************\
       *
       * VaultWiki
       * Version 4.0.16
       *
       * Copyright ©2008-2017 Cracked Egg Studios, LLC. All Rights Reserved.
       * This file may not be redistributed in whole or significant part.
       * 
       * VAULTWIKI IS NOT FREE SOFTWARE
       * [url]https://www.vaultwiki.org/[/url]
       * [url]https://www.vaultwiki.org/pages/Info:License-Agreement[/url]
       *
      \************************************************************************/
      
      function vw_laziness_init(){window.vw_Lazy=new vw_Lazy_List;Y.Node.all(".vw-lazy-ctrl").each(function(){var a=this.ancestor(".vw-lazy-container");if(!this.ancestor(".vw-lazy-ignore"))if(a){var b=a.getData("vw-lazy");b||(b=new vw_Lazy_List(a),window.vw_Lazy.add(b))}else window.vw_Lazy.add(vw_Lazy_Abstract.prototype.create(this))});window.vw_Lazy.order();window.vw_Lazy.listen();window.vw_Lazy.scroll_first()} function vw_Lazy_List(a){this.elements=[];this.nested=[];this.node=a;this.listener=null;this.buffer=30;this.on=!0;if(a){var b=this;a=a.getData("lazy-buffer");!1!==a&&(this.buffer=parseInt(a),0>this.buffer&&(this.buffer=0));"static"==b.node.getComputedStyle("position")&&b.node.setStyle("position","relative");b.node.setData("vw-lazy",this);b.node.all(".vw-lazy-ctrl").each(function(){b.add(vw_Lazy_Abstract.prototype.create(this,b.node))});b.order();b.listen();b.scroll_first()}} vw_Lazy_List.prototype.recalculate=function(){for(var a=[],b=0;b<this.elements.length;b++)a[a.length]=[this.elements[b][2].getTop(),this.elements[b][2].getBottom(),this.elements[b][2]],this.elements[b][2]instanceof vw_Lazy_List&&this.elements[b][2].recalculate();this.elements=a;this.order()};vw_Lazy_List.prototype.detach=function(){this.listener&&this.listener.detach()};vw_Lazy_List.prototype.add=function(a){this.elements[this.elements.length]=[a.getTop(),a.getBottom(),a]}; vw_Lazy_List.prototype.remove=function(a){var b=[];a=a.node.generateID();for(var c=0;c<this.elements.length;c++)this.elements[c][2].node.generateID()!=a&&(b[b.length]=this.elements[c]);this.elements=b};vw_Lazy_List.prototype.getTop=function(){return this.node.getY()};vw_Lazy_List.prototype.getBottom=function(){return this.node.getY()+this.node.get("clientHeight")};vw_Lazy_List.prototype.order=function(){this.elements.sort(function(a,b){return a[0]<b[0]?-1:a[0]>b[0]?1:0})}; vw_Lazy_List.prototype.listen=function(){var a=this;if(!a.listener){var b=0,c=!1,e=Y.one("win"),d,g;a.node?(b=a.node.get("scrollTop"),a.node.plug(Y.Plugin.ScrollInfo),g=a.node.scrollInfo):(Y.one("win").on("windowresize",function(){a.recalculate();a.scroll()}),b=e.get("scrollTop"),g=Y);this.listener=g.after("scroll",function(){if(!c&&a.on){c=!0;clearTimeout(d);var f=0,f=a.node?a.node.get("scrollTop"):e.get("scrollTop");f!==b&&(b=f,a.scroll(),setTimeout(function(){c=!1},100),d=setTimeout(function(){a.scroll()}, 200))}})}};vw_Lazy_List.prototype.scroll_first=function(){var a=Y.one("win"),b=a.get("innerHeight");if(0<parseInt(b))return this.scroll();var c=setInterval(function(){b=a.get("innerHeight");0<parseInt(b)&&(clearInterval(c),this.scroll())},200)}; vw_Lazy_List.prototype.scroll=function(){if(this.elements.length){var a,b,c,e=[];if(this.node){var d=this.node.getDOMNode().getBoundingClientRect();a=this.node.get("scrollTop");0>d.top&&(a+=d.top);b=0<d.bottom?this.node.get("clientHeight")+a:this.node.get("clientHeight")+a+d.bottom}else d=Y.one("win"),a=d.get("scrollTop"),b=a+d.get("innerHeight");this.buffer&&(a-=this.buffer,b+=this.buffer,0>a&&(a=0));for(d=0;d<this.elements.length;d++)if(b>this.elements[d][0]){if(a<this.elements[d][1])if(this.elements[d][2]instanceof vw_Lazy_List)(c=this.elements[d][2].scroll())||(e[e.length]=d);else{if(this.elements[d][2].enabled)this.elements[d][2].onscroll_load();e[e.length]=d}}else break;if(e.length){a=e.shift();b=[];a&&(b=this.elements.slice(0,a));a++;for(d=0;d<e.length;d++)c=e[d],b=b.concat(this.elements.slice(a,a,c-a)),a=c+1;a<this.elements.length&&(b=b.concat(this.elements.slice(a)));this.elements=b}return this.elements.length}};function vw_Lazy_Abstract(){} vw_Lazy_Abstract.prototype.init=function(a,b){this.container=null;this.enabled=!0;this.loaded=!1;this.node=a;this.node.setData("vw-lazy-obj",this);this.node.getData("lazy-disable")&&(this.enabled=!1);b&&(this.container=b,this.recalculate())};vw_Lazy_Abstract.prototype.detach=function(){this.enabled=!1}; vw_Lazy_Abstract.prototype.recalculate=function(){for(var a=this.node.get("offsetTop"),b=this.node.get("offsetParent");b&&!b.hasClass("vw-lazy-container");)a+=b.get("offsetTop"),b=b.get("offsetParent");this.node.setData("vw-lazy-top",a)};vw_Lazy_Abstract.prototype.create=function(a,b){var c=a.getData("lazy-type");if(c)switch(c){case "icon":return new vw_Lazy_Icon(a,b);case "img":return new vw_Lazy_Img(a,b);case "ajax":return new vw_Lazy_Ajax(a,b)}return null}; vw_Lazy_Abstract.prototype.getTop=function(){return this.container?this.node.getData("vw-lazy-top"):this.node.getY()};vw_Lazy_Abstract.prototype.getBottom=function(){var a=0,a=this.container?this.node.getData("vw-lazy-top"):this.node.getY();return a+=this.node.get("clientHeight")};function vw_Lazy_Icon(a,b){vw_Lazy_Abstract.prototype.init.call(this,a,b)}function vw_Lazy_Img(a,b){vw_Lazy_Abstract.prototype.init.call(this,a,b)} function vw_Lazy_Ajax(a,b){vw_Lazy_Abstract.prototype.init.call(this,a,b)}vw_Lazy_Icon.prototype=Object.create(vw_Lazy_Abstract.prototype);vw_Lazy_Img.prototype=Object.create(vw_Lazy_Abstract.prototype);vw_Lazy_Ajax.prototype=Object.create(vw_Lazy_Abstract.prototype); vw_Lazy_Icon.prototype.onscroll_load=function(){if(!this.loaded){var a=this.node.cloneNode();a.removeClass("vw-lazy-ctrl");var b=a.getComputedStyle("backgroundImage");if(b&&-1!=vw_Hard_Core._indexOf(b,"url(")){var b=b.substring(5,b.length-2),c=Y.Node.create("\x3cimg /\x3e"),e=this;c.on("load",function(){c.detach("load");e.node.setStyle("backgroundImage",'url("'+b+'")');e.node.removeClass("vw-lazy-ctrl");c.destroy(!0)});c.setAttribute("src",b)}else this.node.removeClass("vw-lazy-ctrl")}}; vw_Lazy_Img.prototype.onscroll_load=function(){if(!this.loaded){var a=this.node.getData("src"),b,c;a||(b=this.node.getStyle("backgroundImage"))&&-1!=vw_Hard_Core._indexOf(b,"url(")&&(a=b.substring(5,b.length-2),c=parseInt(this.node.getStyle("width")));if(a){var e=this;c=this.create_preloader(this.node,a,c);var d=c.img,a=c.src;d.removeClass("vw-lazy-ctrl");if(b)d.on("load",function(){d.detach("load");e.node.setStyle("backgroundImage",'url("'+a+'")');e.node.setStyle("backgroundSize","contain");e.node.removeClass("vw-lazy-ctrl"); d.destroy(!0)});else d.on("load",function(){d.detach("load");e.node.setAttribute("src",a);d.destroy(!0)});d.setAttribute("src",a)}}}; vw_Lazy_Img.prototype.create_preloader=function(a,b,c){for(var e=Y.Node.create("\x3cimg /\x3e"),d=vw_Hard_Core.get("device_ratio"),g=[1,2,2.5],f=0;f<g.length;f++)if(d<=g[f]){d=g[f];break}3<d&&(d=4);if(1<d&&(c||(c=this.node.getAttribute("width")),c)){g=!1;f="";if(vw_Hard_Core._indexOf(b,"?")){var h=b.split("?")[1].split("\x26");for(c=0;c<h.length;c++)if(param=h[c].split("\x3d")[0],"dpr"==param){g=!0;b=b.replace((c?"\x26":"?")+h[c],(c?"\x26":"?")+"dpr\x3d"+d);break}f+="\x26"}else f+="?";g||(b+=f+"dpr\x3d"+ d)}if(a)for(a=a.getDOMNode().attributes,c=0;c<a.length;c++)e.setAttribute(a[c].name,a[c].value);return{src:b,img:e}};vw_Lazy_Ajax.prototype.onscroll_load=function(){};Y.use("node","node-scroll-info","event",vw_laziness_init);
      Reply Reply
    3. January 17, 2017 10:05 AM
      pegasus pegasus is offline
      VaultWiki Team
      In compressed vault/resources/js/lazy.js, find (2x):
      Code:
      b.substring(5,b.length-2)
      Replace with (2x):
      Code:
      b.slice(4,-1).replace(/["|']/g,'')
      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 4:27 AM.
    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.