Image element href output as "http://0"

Hello,

I'm not sure when this changed, but it was historically working.

A link set for an image (SVG in this case) is not output in the HTML code, but is set as http://0


The full URL is a Spotify playlist, nothing special: https://open.spotify.com/playlist/71d99pLh0TpbdIJESHAsDN?si=wDRXiM2nQe-hXZOR5AoHlA

I can confirm other links have no difference, nor does changing "_blank" to "_self".

Changing the image from SVG to JPG has no effect either.

You can view in the footer at https://shorturl.at/ivxHT

Comments

  • Hi,

    I have recreated this construction on my environment, and it works correctly.

    Please send us the WordPress dashboard and FTP access privately through the contact form, which is on the right side at http://themeforest.net/user/muffingroup#contact, and we will check what might be the reason.

    Notice!

    Please attach a link to this forum discussion.

    Sending incorrect or incomplete data will result in a longer response time.

    Therefore, please ensure that the data you send are complete and correct.

    Thanks

  • Thanks - details now sent.

  • Something in your child theme causes it.

    When I switched to the parent theme, the link worked correctly.

    Best regards

  • Thanks.

    I have a custom function overriding mfn_vc_image which allows me to set the default size of images (for things like Sliding Box) to be "medium" rather than "full".

    It was causing the issue, but as part of my debugging, I wonder if I've found an unwanted call to that function.

    Within theme-shortcodes.php, line 6229 of the sc_image() function, there's an output string being built for the <a> tag around the image.

    The href of that tag has a variable ($link_all) which is being passed through mfn_vc_image - which I don't think is correct.

    $output .= '<a '.$coverimg.' href="'. esc_url(mfn_vc_image($link_all)) .'" '
    

    Should the href/link of an image be passed through mfn_vc_image?

  • Thanks for noticing that. I have contacted the dev team regarding this, and they told me that you are right. We will correct that in the upcoming update.


    Best regards

  • Brilliant, thanks - saves me rewriting my overrides! ha

  • No problem. We are happy we could help. ?


    Best regards

Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.