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.