G2.2 Matrix theme
Came across this problem today as googlebot passed my G2 upgrade site for the first time. One of the quirks of my site is that I have extensive linkItem directories in order to facilitate banner exchange and grow PageRank.
If you have a linkItem for say "www.google.com", the actual html source generated by Matrix doesn't contain the path "www.google.com" in the href, but instead contains an internal G2 path. This isn't a problem for a user, since the G2 path is redirected. But Googlebot will reject the sitemap and refuse to spider the site if too many random attempts at the sitemap entries produce redirects (as I discovered this morning)
In addition, many link exchange directories do automated spiders of your html source before adding your own link. The raw GS link fails this test.
The easy solution for Matrix is as follows:
in album.tpl replace the following:
{if ($child.canContainChildren || $child.entityType == 'GalleryLinkItem')}
{assign var=frameType value="albumFrame"}
{capture assign=linkUrl}{g->url arg1="view=core.ShowItem"
arg2="itemId=`$child.id`"}{/capture}
{else}
{assign var=frameType value="itemFrame"}
{capture assign=linkUrl}{strip}
{if $theme.params.dynamicLinks == 'jump'}
{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}
{else}
{g->url params=$theme.pageUrl arg1="itemId=`$child.id`"}
{/if}
{/strip}{/capture}
{/if}
with...
{if ($child.canContainChildren)}
{assign var=frameType value="albumFrame"}
{capture assign=linkUrl}{g->url arg1="view=core.ShowItem"
arg2="itemId=`$child.id`"}{/capture}
{elseif ($child.entityType == 'GalleryLinkItem')}
{assign var=frameType value="albumFrame"}
{capture assign=linkUrl}{$child.link}{/capture}
{else}
{assign var=frameType value="itemFrame"}
{capture assign=linkUrl}{strip}
{if $theme.params.dynamicLinks == 'jump'}
{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}
{else}
{g->url params=$theme.pageUrl arg1="itemId=`$child.id`"}
{/if}
{/strip}{/capture}
{/if}