The loc that is being generated for each image is the drupal management where editing etc. can occur. the url should reflect the PUBLIC page that the image appears on.

Here's an example...

Generarted XML

<url>
     <loc>http://vocitec.com/file/leadershipdcooperjpg</loc>
     <image:image>
          <image:loc>http://vocitec.com/sites/default/files/pages/leadership_dcooper.jpg</image:loc>
          <image:title>Leadership Dcooper</image:title>
          <image:caption>Leadership Dcooper</image:caption>
     </image:image>
</url>

SHOULD BE

<loc>http://vocitec.com/leadership</loc>

Comments

Anonymous’s picture

jazanne created an issue. See original summary.

Anonymous’s picture

Issue summary: View changes
IckZ’s picture

I've recognized the same "error" / behavaior: In my case the points to
https://www.yoururl.com/media/2461 instead of pointing to the public url alias of the node..

Are there any workarrounds or updates for this topic?

piyuesh23’s picture

Status: Active » Needs review
StatusFileSize
new2.82 KB

I had the same issue & there were a lot of 404s reported back by google due to this. Fixed this one by setting the to the nid from file_usage table. Also, the structure is updated now to hold multiple images under one tag as described by google https://support.google.com/webmasters/answer/178636?hl=en

Uploading the patch here. The patch is against 7.x-1.x branch.

piyuesh23’s picture

Missed out the condition on type of media to include. Adding it back & uploading an updated patch.

piyuesh23’s picture

StatusFileSize
new2.87 KB

Missing patch file. Adding it here

piyuesh23’s picture

StatusFileSize
new2.87 KB

Uploading a patch against 7.x-1.0 as well here.

piyuesh23’s picture

StatusFileSize
new2.92 KB

Adding one more check to the patch for missing nodes in file_usage table. Patch intended for 7.x-1.0.

  • piyuesh23 committed c93dbc9 on 7.x-1.x
    Issue #2563265 by piyuesh23: Not generating correct url for <loc>
    
piyuesh23’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.