Viewing 29 posts - 1 through 29 (of 29 total)
  • Author
    Posts
  • #1323626

    Hi,

    Update: Issue was fixed in Enfold 4.8.6.5. Please refer to this post – https://kriesi.at/documentation/enfold/theme-update/ and update Enfold to the latest version 4.8.6.5.

    A small issue in the logic caused some logos to disappear on Enfold 4.8.6.4. We are sorry for the inconvenience.

    Our devs have already fixed the issue and we will release a new update with the fix soon.

    To implement the fix on your installation, you can replace the content of /enfold/framework/php/class-svg-images.php file with – https://raw.githubusercontent.com/KriesiMedia/enfold-library/master/temp_fixes/Enfold_4_8_6_4/framework/class-svg-images.php in Appearance > Editor.

    If you would like us to update the file for you, please start a thread under Enfold sub forum – https://kriesi.at/support/forum/enfold#new-post and attach temporary admin logins in private content field. If Theme Editor is hidden on your installation, please either enable it or share FTP logins as well.

    Note for SVG Support plugin users: If you are using SVG Support plugin and your SVG logo does not show up even after updating the file, please re-create your SVG file and re-upload it. If you need assistance with it, please share WP admin logins :)

    Regards,
    Yigit

    • This topic was modified 2 weeks, 3 days ago by  Yigit.
    • This topic was modified 2 weeks, 3 days ago by  Yigit.
    #1323644

    just for info: for those Participants who are using my replace every img svg file with its inline svg-function : now the logo img replacement is obsolete to replace.
    On Enfold 4.8.6.4 this is done by the theme itself.

    Therefore now uses the whole thing in this way excluding the logo img:

    // replace every svg with its inline code
    function replace_img_if_svg_with_inline_svg() {
    ?>
    <script type="text/javascript">
    (function($) {
      $(':not(.logo) img').filter(function() { return this.src.match(/.*\.svg$/); }).each(function(){
        var imgSVG    = $(this);
        var imgURL    = $(this).attr('src');
        var imgAlt    = $(this).attr('alt');
        var imgTitle  = $(this).attr('title');
        var imgClass  = $(this).attr('class');
        $.get(imgURL, function(data) {
        var svg = $(data).find('svg');
        	
        // Remove invalid XML tags - mostly that is usefull to preserve so it is commented out here
        // svg = svg.removeAttr('xmlns xmlns:xlink');
    
        // add replaced image's alt tag to the inline SVG
        typeof imgAlt === 'undefined' || imgAlt === '' ?  (svg = svg.attr('alt', 'Replaced Image')) : (svg = svg.attr('alt', imgAlt)) ;
        // add replaced image's Title tag to the inline SVG
        typeof imgTitle === 'undefined' || imgTitle === '' ? (svg = svg.attr('title', 'A SVG Image replaced by its inline code')) : (svg = svg.attr('title', imgTitle));
        // Add replaced image's classes to the new SVG and add replaced-svg as new class
        typeof imgClass === 'undefined' || imgClass === '' ? (svg = svg.attr('class', 'replaced-svg')) : (svg = svg.attr('class', imgClass+' replaced-svg'));
        // Replace image with inline SVG Code
            imgSVG.replaceWith(svg);
        }, 'xml');
    });
    })(jQuery);
    </script>
    <?php
    } 
    add_action('wp_footer', 'replace_img_if_svg_with_inline_svg');
    #1323645

    Hi,

    Thanks for the information @guenni007 :)

    Best regards,
    Yigit

    #1323685

    Worked, thanx.

    #1323686

    Hi,

    @darkfall1995 Thanks for the feedback :)

    Best regards,
    Yigit

    #1323768

    This does not work for one of our websites. Replacing the file still does not show the logo. As the website is live I used a temporary fix by replacing the logo output directly inside the functions.php of our child theme:

    /**
     *  Custom logo
     */
    add_filter('avf_logo_final_output', 'avf_text_logo_final_output');
    function avf_text_logo_final_output($logo) {
    	$link = apply_filters('avf_logo_link', home_url('/'));
    	$logoImage = '<img src="URL_TO_LOGO/logo.svg" height="100" width="300" alt="Logo" style="max-height: 200px;">';
        $logo = sprintf('<div class="av-logo-container"><div id="logo" class="logo"><a href="%s">%s</a></div></div>', $link, $logoImage);
    	return $logo;
    }
    #1323790

    when do you think you can release the update?

    #1323816

    Hey,

    @48design Could you please post temporary admin logins here privately so we can look into it? This did not work on one other users website and they were using a SVG plugin. I recreated the SVG file and replaced it with their existing logo and that helped. I would like to try that on your client’s website as well.

    @pontedellarco We are planning to release the new version tomorrow :)

    Regards,
    Yigit

    #1323854

    Hello Yigit,

    we are using a plugin called “SVG Support” (https://wordpress.org/plugins/svg-support/) because we need SVG in other places as well, not just the logo.

    Best regards
    48DESIGN

    #1323892

    Hi,

    @48design I commented out your code in functions.php file of your child theme, recreated SVG file, removed existing one, uploaded newly created one and it worked. Please review your website :)

    Best regards,
    Yigit

    #1323893

    Thank you. I am really interested in how this has been solved. What was wrong with our SVG? And will this problem come up with SVGs we are creating in the future?

    #1323896

    Hi,

    To be honest, we are not sure the cause of the issue but your and other users website were both using SVG Support plugin. I simply recreated the SVG file and uploaded it.

    I will update my initial post and add a note for users who are using SVG Support plugin :)

    Best regards,
    Yigit

    #1323897

    Thanks. And maybe add a hint that all custom styles related to the tag of the logo have to be changed to use the <svg> tag…

    #1323904

    i use often the svg-support plugin too – but i do not mark the “Force Inline SVG” Option. maybe that was the reason for trouble.

    #1323912

    hey,

    i also have this problem. i uploaded a svg as logo, but the ‘img tag’ within the ‘a tag’ is missing. i already updated the class-svg-img.php, saved and uploaded the logo again, but its still not showing. what could be the problem? if uploading a jpg its working …

    #1323918

    @guenni007: there is no such option in the plugin I am using. (SVG Support)
    @pixel_production: you have to use the “svg tag” like written above in your css

    #1323919

    my problem is, the the ‘img’ nor the ‘svg tag’ is showing, its just missing within the ‘a tag’.

    #1323920

    This is the initial problem of this new version. You have to replace the code, see the very first post at the top.

    #1323922

    like i said, i already did …

    #1323924

    Sorry… ^_^

    #1323931

    Hey,

    @pixel_production I deleted your logo, recreated SVG file, uploaded it and it worked. However I noticed that logo was showing up for not logged in users so it could be related to cache if you are using one on your server. Please review your website :)

    Best regards,
    Yigit

    #1323932

    hi Yigit,

    thank you so much!!

    #1323934

    Hi!

    You are welcome, @pixel_production! Let us know if you have any other questions and enjoy the rest of your day :)

    Best regards,
    Yigit

    #1324058

    @48design : if you mark the “Enable Advanced Mode?” Option on SVG Support and save the rest will be shown.

    #1324069

    @guenni007
    You wrote “Force Inline SVG” which the plugin does not have as an option. It’s called “Enable Advanced Mode” like you said in your last post.
    I don’t have the time to try different solutions and everything is working now. Let’s hope in the future this will not destroy our client’s websites.

    #1324150
    #1324190

    Hi,

    Thanks for helping out @guenni007 :-)

    Best regards,
    Rikard

    #1325556

    I’m sorry but the same problem happened again with a customer’s website… This time no SVG-plugin was used!
    “We are re-uploading your SVGs” is not an answer to this problem. There must be a solution for this problem everybody can use!

    #1325660

    Hi 48DESIGN,

    Please open a new thread and include WordPress admin login details in private, so that we can have a closer look at your site.

    Best regards,
    Rikard

Viewing 29 posts - 1 through 29 (of 29 total)

You must be logged in to reply to this topic.