#83 – Problem with sitemap and remote image

Status: Closed - Category: Route 66
 Hi,

There is a problem in the sitemap generation: when i use remote pictures the sitemap write this :
<image:loc>
https://www.mybesite.com/https://img.myremotecdnimg.com/440x300.jpg
</image:loc>

I need this :
<image:loc>
https://img.myremotecdnimg.com/440x300.jpg
</image:loc>

Can you fix this or explain where can i change the code ?

Thank you
Hi,

Can you please clarify? How are you using remote images? Is this about Joomla articles or K2 Items?
 
It's for Joomla content.
Here is the fix. Edit file /plugins/route66/content/content.php and replace lines 49 - 60 with the following code:

                if (isset($images->image_fulltext) && $images->image_fulltext) {
                    $image = new stdClass();
                    if(strpos($images->image_fulltext, 'http://') === 0 || strpos($images->image_fulltext, 'https://') === 0 || strpos($images->image_fulltext, '//') === 0)
                    {
                      $image->url = $images->image_fulltext;
                    }
                    else
                    {
                      $image->url = JUri::root(false).$images->image_fulltext;
                    }
                    $image->caption = $images->image_fulltext_caption;
                    $item->images[] = $image;
                }
                if (isset($images->image_intro) && $images->image_intro) {
                    $image = new stdClass();
                    if(strpos($images->image_intro, 'http://') === 0 || strpos($images->image_intro, 'https://') === 0 || strpos($images->image_intro, '//') === 0)
                    {
                      $image->url = $images->image_intro;
                    }
                    else
                    {
                      $image->url = JUri::root(false).$images->image_intro;
                    }
                    $image->url = JUri::root(false).$images->image_intro;
                    $image->caption = $images->image_intro_caption;
                    $item->images[] = $image;
                }


Please let us know if that solves the issue.
 
The bug is still existing :

<image:loc>https://www.mywebsite.com/https://img.grouponcdn.com/deal/2mWkd9TGhYMhgwT5CGwRwQiPZZ2M/2m-960x576/v1/t440x300.jpg</image:loc>
Here is an example of the data in my DB :

{"image_intro":"https://img.grouponcdn.com/deal/FN1ScPvzuAotmQh5GkBXzrkJ8iN/FN-1016x610/v1/t440x300.jpg","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}
Are you sure that it's not cached? Can you please try cleaning Joomla cache?
 
OK it's not cache. We forgot one extra line of code.

Just remove the line 72 and everything should work as expected.
 
Perfect. Great job. Thank you !
Will you fix this in next version or will i ll be oblige to do this again ?
Of course, the fix will be included in the next update of Route 66.

I would like to thank you for reporting this issue.

If you like Route 66 PRO it would be great if you post a review at the Joomla extensions directory .

Let us know if you need anything else.

Regards
 
Thank you. Perfect
You are welcome.
 
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.

Note: An active subscription is required in order to get support for our paid extensions. For our free extensions, if you don't have an account, register and then submit your support request.  In case you just want to ask a question, you can also use the contact form .

Note: Our support team is currently on vacation, so please anticipate slightly longer response times. Thank you for your understanding!

Firecoders
Are you using our extensions? Please post a review at the Joomla extensions directory!
Post a review