Problem with CB Activity link Embedder and languages

3 years 3 months ago #321665 by timstohr
Hi Kyle,
I have just spotted a problem with the link embedder that has been bothering me for some time.

It does not seem to pull the image links to my own website out right. The activity card wants to show this image but fails:
intranet-sion.sion-hub.com/en/images/photos/Homepage/path623.png

Note the /en/ which normally indicates that you are on the english language site...

Real link should have been: intranet-sion.sion-hub.com/images/photos/Homepage/path623.png

And that link above definitely works.

Attachments:

Please Log in to join the conversation.

3 years 3 months ago #321666 by krileon
It just pulls what's on the page. Use proper metadata for your menu items or the content itself and it will prioritize metadata. This includes og:image metadata tags. If metadata is missing it will just walk the DOM until it finds an image. When it walks the DOM it will use whatever is the src for that image tag. Is /en/ actually in the image tag or is the image relative beginning with / (e.g. /images/photos/Homepage/path623.png)? You should be able to check this on the page that was linked.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

3 years 3 months ago #321669 by timstohr
The path of the image is intranet-sion.sion-hub.com/images/photos/Homepage/path623.png.

The en comes from the default site being in english (hence why there is en attached at the of the domain intranet-sion.sion-hub.com/en). The en is NOT part of the DOM...

Please Log in to join the conversation.

3 years 3 months ago #321671 by krileon
Is there metadata at the top of the page specifying an image? All of the following are parsed.

//meta[@name="og:image"]/@content
//meta[@name="og:image:url"]/@content
//meta[@name="twitter:image"]/@content
//meta[@name="image"]/@content
//meta[@property="og:image"]/@content
//meta[@property="og:image:url"]/@content
//meta[@property="twitter:image"]/@content
//meta[@property="image"]/@content
//img/@src

The parsing does not touch the URLs. It is not possible for it to insert the /en/. It has to exist in the DOM that it's walking with the above paths.

//meta[@name="og:image"]/@content

For example with the above it's looking for a <meta name="og:image" content="IMAGE_URL_HERE" /> in the head of the page. It will work its way down that list until done. It does not alter the URLs in any way.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.196 seconds

Facebook Twitter LinkedIn