Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #693387

    Misho
    Participant

    Thanks!

    One strange thing though, I have lost many helper classes for margins. I must manually go through entire site, both desktop and mobile version, to put them back. I haven’t seen this issue reported before.

    Second problem appeared when I have tried to test the LayerSlider via Cornerstone element. https://www.progreso.hr/ls/.
    I am getting this message: “LayerSlider Encountered a problem while it tried to show your slider”.
    The shortcode is working inside the text element.

    Third problem is that Essential grid also cannot be loaded from the CS element. Only through text element. https://www.progreso.hr/eg/.

    Fourth problem is that the Raw content element cannot be added inside Cornerstone. It immediately disappears.

    Look to me like these are connected. Some major problem is present there. The site is working so I will not roll back yet.

    I would be grateful if you could take a look inside.

    Thank you!

    #693638

    Misho
    Participant
    This reply has been marked as private.
    #693741

    Rad
    Moderator

    Hi Misho,

    This is really weird, I can’t find what causes it. Would you mind disabling your site’s https? Make it just a plain http since I’m getting many warnings when editing. You can turn it back when done testing.

    I can do that, but you should backup your site first.

    Thanks.

    #694171

    Misho
    Participant

    Hi,

    Ok, I was wrong. Helper classed are not lost. The gap element does not take any effect. For example the main contact page https://www.progreso.hr/kontakt/ has an option to select the subsidiary. (The name of the city and the crest). When viewed on mobile, the gap element, which is enabled for mobile view only, jumps in to keep these apart. It is visible in Cornerstone, but outside it’s like it is not there at all. These problems were not present under SSL before the update.

    I have the full backup. Could you turn off the SSL and do the testing pls? Please note that there is a plugin called ssl-zaheer, which is a modification of the https://wordpress.org/plugins/really-simple-ssl/.

    I hope SSL can be easily turned on after testings. It was a nightmare to get all the green locks. 🙂

    There is also this line in the htaccess:

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTPS} !=on [NC]
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    </IfModule>
    <IfModule mod_headers.c>
    Header always set Strict-Transport-Security 'max-age=31536000' env=HTTPS
    </IfModule>

    Also, this is in the child theme’s functions.php:

    function filter_content_match_protocols( $content ) {
    
    	$search = $replace = get_bloginfo( 'home' );
    
    	
    
    	if ( ! preg_match( '|/$|', $search ) )
    
    		$search = $replace = "$search/";
    
    	
    
    	if ( is_ssl() ) {
    
    		$search = str_replace( 'https://', 'http://', $search );
    
    		$replace = str_replace( 'http://', 'https://', $replace );
    
    	}
    
    	else {
    
    		$search = str_replace( 'http://', 'https://', $search );
    
    		$replace = str_replace( 'https://', 'http://', $replace );
    
    	}
    
    	
    
    	$content = str_replace( $search, $replace, $content );
    
    	
    
    	return $content;
    
    }
    
    ob_start( 'filter_content_match_protocols' );
    
    function filter_content_match_protocols_end() {
    
    	ob_end_flush();
    
    }
    
    add_action( 'shutdown', 'filter_content_match_protocols_end', -10 );

    I am running Tag manager, Optimeziely and Hotjar, but I think these should not make any problems.

    Thank you so much guys for your unmatched support!

    #694508

    Rad
    Moderator

    Hi Misho,

    That could be the reason why it’s not working. I also tried disabling your https but seems it’s wrong FTP folder. I can’t find the folder for the site in question.

    Would you mind disabling https? We just need to test it without https. Thanks!

    Thanks.

    #694552

    Misho
    Participant
    This reply has been marked as private.
    #694704

    Rad
    Moderator

    Hi there,

    Sure, It’s a good idea to bring him in. I’m afraid I could break your https setup since it’s deeply integrated.

    1. From your htaccess, please change

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTPS} !=on [NC]
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    </IfModule>
    <IfModule mod_headers.c>
    Header always set Strict-Transport-Security 'max-age=31536000' env=HTTPS
    </IfModule>

    to this,

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    

    2. From your child theme’s functions.php, comment out this code to disable it or just remove this.

    function filter_content_match_protocols( $content ) {
    
    	$search = $replace = get_bloginfo( 'home' );
    
    	
    
    	if ( ! preg_match( '|/$|', $search ) )
    
    		$search = $replace = "$search/";
    
    	
    
    	if ( is_ssl() ) {
    
    		$search = str_replace( 'https://', 'http://', $search );
    
    		$replace = str_replace( 'http://', 'https://', $replace );
    
    	}
    
    	else {
    
    		$search = str_replace( 'http://', 'https://', $search );
    
    		$replace = str_replace( 'https://', 'http://', $replace );
    
    	}
    
    	
    
    	$content = str_replace( $search, $replace, $content );
    
    	
    
    	return $content;
    
    }
    
    ob_start( 'filter_content_match_protocols' );
    
    function filter_content_match_protocols_end() {
    
    	ob_end_flush();
    
    }
    
    add_action( 'shutdown', 'filter_content_match_protocols_end', -10 );

    3. If you have caching, and ssl related plugin. Please disable them at the moment.

    4. Then last, at Admin > Settings > General, please change your two url to http.

    That should disable it, but please save a backup.

    Thanks!

    #694746

    Misho
    Participant

    Uh, ok.

    Tomorrow (Today) is Monday, a day with most traffic & conversions for the site, so I’ll have to do it either now (2am UTM+1), or tomorrow after 11pm (UTM +1).

    External marketing campaigns are pointing to https. These would break if we don’t redirect them temporarily to http. (Worse than break, they would show security warning for a Financial site :). Also, there are internal links that are pointing to https.

    I am trying to read the Apache you have provided, but I am no expert in this and cannot determine if it will temporarily redirect all https traffic to http?

    Thanks!

    #694820

    Rad
    Moderator

    Hi Misho,

    In that case you should do it in a staging site, an identical replicate of your site. That should let you play with your setup 🙂

    Yes temporary, until you set them back again.

    Thanks!

    #695357

    Misho
    Participant

    Yes I did tried on the staging site (The beginning of this thread). Gaps are working there, and the Essential grid/Layer slider are loading inside of their elements.

    But I cannot load Cornerstone on the homepage on the Staging site. What a mess.

    Oh man, everything is on hold because of this for days. Why would the update mess-up SSL? It was all working fine until the update. I don’t want to roll back…

    #695658

    Jack
    Keymaster

    Hi there Misho,

    Thanks for writing back, could we have FTP for the staging site as well please?

    When checking the staging site and the live site, I did notice they aren’t exactly the same, for example they don’t both have the exact same plugins active. Has W3 Total Cache ever been activated on the staging site?

    On the live site, could you try removing W3 Total cache, remove the define it adds to the wp-config.php and remove the code it adds to the .htaccess. And see if that makes any difference.

    Thank you!

    #696980

    Misho
    Participant
    This reply has been marked as private.
    #696984

    Misho
    Participant

    Hi Credentials are in the post above.

    I have tried to enable W3TC on the staging site, and it did not make any difference. Homepage still cannot be edited in CS, no matter which page or layout is set as a homepage.

    On the live site, I have try to deactivate and remove W3TC, but these problems are still present:

    – Gap element not taking effect on the front-end, on the entire site.

    – Layerslider and Essental grid elements not loading anything.
    – Raw element disappears in Cornerstone when drag and dropped in the editor.

    EDIT: I have managed to make GAP element working. I have deleted one of the gap elements, and put the new one in it’s place. Suddenly all the other gaps on the same page started working on the front-end. Now I have to go through all the pages and repeat the process.

    EDIT2: I did the same thing with LS and EG elements. Deleted the one’s that did’t work (Inside the CS and on the front-end) and replaced them with the new element. They are both working now. This leaves the one remaining problem, RAW content element disappearing on live site, and inability to load CS on homepage on staging site.

    Thank you again for staying on this with me!

    #698237

    Rad
    Moderator
    This reply has been marked as private.
    #698314

    Misho
    Participant
    This reply has been marked as private.