• Resolved weseo

    (@weseo)


    After hours of searching of an error in the Revolution Slider, i found out that it has problems with your plugin, in older versions and the newest version.

    TypeError: self.location is undefined
    fullsrc = self.location.href
    
    Problem: self is undefined
    
    and a lot of errors:
    *****/transparent.png  Could not be loaded !
    *****/291x455.jpg  Could not be loaded !

    Revolution Slider Function where the Error occours only when cookie-notice is active.

    var imgLoaded = function(img,opt,progress) {
    	opt.syncload--;
    
    	if (opt.loadqueue)
    		jQuery.each(opt.loadqueue, function(index,queue) {
    
    			var mqsrc = queue.src.replace(/\.\.\/\.\.\//gi,""),
    				fullsrc = self.location.href,
    				origin = document.location.origin,
    				fullsrc_b = fullsrc.substring(0,fullsrc.length-1)+"/"+mqsrc,
    				origin_b = origin+"/"+mqsrc,
    				absolute = abstorel(self.location.href,queue.src);
    
    			fullsrc = fullsrc.substring(0,fullsrc.length-1)+mqsrc;
    			origin = origin+mqsrc;
    
    			if (cutParams(origin) === cutParams(decodeURIComponent(img.src)) ||
    				cutParams(fullsrc)=== cutParams(decodeURIComponent(img.src)) ||
    				cutParams(absolute)=== cutParams(decodeURIComponent(img.src)) ||
    				cutParams(origin_b) === cutParams(decodeURIComponent(img.src)) ||
    				cutParams(fullsrc_b)=== cutParams(decodeURIComponent(img.src)) ||
    				cutParams(queue.src) === cutParams(decodeURIComponent(img.src)) ||
    				cutParams(queue.src).replace(/^.*\/\/[^\/]+/, '') === cutParams(decodeURIComponent(img.src)).replace(/^.*\/\/[^\/]+/, '') ||
    				(window.location.origin==="file://" && cutParams(img.src).match(new RegExp(mqsrc)))) {
    					queue.progress = progress;
    					queue.width = img.width;
    					queue.height = img.height;
    			}
    		});
    	progressImageLoad(opt);
    }

    Maybe its this anonymous-function in your code ?

    $.fn.setCookieNotice = function ( cookie_value ) {
    
    		var cnTime		= new Date(),
    			cnLater		= new Date(),
    			cnDomNode	= $( '#cookie-notice' );
    
    		self = this;

    I really think that your plugin is good, maybe you can reproduce and fix this ?

    Hint: This issue occours only when u first visit a page
    Use different browsers and incocnito tabs (only clean cache dont work to reproduce the errors)
    Ive this issue on multiple installations and deactivating your plugin fixed it for now.

    Thanks !

    https://www.ads-software.com/plugins/cookie-notice/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter weseo

    (@weseo)

    Thread Starter weseo

    (@weseo)

    temp. fixed the issue with:
    front.js

    // set Cookie Notice
    	$.fn.setCookieNotice = function ( cookie_value ) {
    
    		var cnTime		= new Date(),
    			cnLater		= new Date(),
    			cnDomNode	= $( '#cookie-notice' );
    
    		var self2 = this;
    
    		// set expiry time in seconds
    		cnLater.setTime( parseInt( cnTime.getTime() ) + parseInt( cnArgs.cookieTime ) * 1000 );
    
    		// set cookie
    		cookie_value = cookie_value === 'accept' ? true : false;
    		document.cookie = cnArgs.cookieName + '=' + cookie_value + ';expires=' + cnLater.toGMTString() + ';' + ( cnArgs.cookieDomain !== undefined && cnArgs.cookieDomain !== '' ? 'domain=' + cnArgs.cookieDomain + ';' : '' ) + ( cnArgs.cookiePath !== undefined && cnArgs.cookiePath !== '' ? 'path=' + cnArgs.cookiePath + ';' : '' );
    
    		// trigger custom event
    		$.event.trigger( {
    			type		: "setCookieNotice",
    			value		: cookie_value,
    			time		: cnTime,
    			expires		: cnLater
    		} );
    
    		// hide message container
    		if ( cnArgs.hideEffect === 'fade' ) {
    			cnDomNode.fadeOut( 300, function () {
    				self2.removeCookieNotice();
    			} );
    		} else if ( cnArgs.hideEffect === 'slide' ) {
    			cnDomNode.slideUp( 300, function () {
    				self2.removeCookieNotice();
    			} );
    		} else {
    			self2.removeCookieNotice();
    		}
    	};

    maybe you can verify the issue and update your plugin, so it is update save ?
    Many Thanks !

    Plugin Author dFactory

    (@dfactory)

    Thx for the feedback guys,
    We’ll push a fix in the next release (this week probably)

    Regards,
    Bartosz / dfactory team

    Thread Starter weseo

    (@weseo)

    Thank you for the fast reply/update !

    Plugin Author dFactory

    (@dfactory)

    It should work fine in just released 1.2.36

    The exact same issue bothered our web site for months. After updating everything works fine, thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Issue with Revolution Slider’ is closed to new replies.