@@ -303,11 +303,7 @@ class XmlSitemapGenerator implements XmlSitemapGeneratorInterface {
// Ensure every link starts with a slash.
// @see \Drupal\Core\Url::fromInternalUri()
if($link['loc'][0]!=='/'){
trigger_error(t('The XML sitemap link path %path for @type @id is invalid because it does not start with a slash.',[
'%path'=>$link['loc'],
'@type'=>$link['type'],
'@id'=>$link['id'],
]),E_USER_ERROR);
trigger_error("The XML sitemap link path {$link['loc']} for {$link['type']}{$link['id']} is invalid because it does not start with a slash.",E_USER_ERROR);
$link['loc']='/'.$link['loc'];
}
...
...
@@ -505,7 +501,7 @@ class XmlSitemapGenerator implements XmlSitemapGeneratorInterface {
$query->execute();
}
$context['message']=t('Links cleared');
$context['message']=$this->t('Links cleared');
}
/**
...
...
@@ -558,7 +554,7 @@ class XmlSitemapGenerator implements XmlSitemapGeneratorInterface {
@@ -128,27 +128,17 @@ class XmlSitemapLinkStorage implements XmlSitemapLinkStorageInterface {
// Temporary validation checks.
// @todo Remove in final?
if($link['priority']<0||$link['priority']>1){
trigger_error(t('Invalid sitemap link priority %priority.<br />@link',[
'%priority'=>$link['priority'],
'@link'=>var_export($link,TRUE),
]),E_USER_ERROR);
trigger_error("The XML sitemap link for {$link['type']}{$link['id']} has an invalid priority of {$link['priority']}.<br/>".var_export($link,TRUE),E_USER_ERROR);
}
if($link['changecount']<0){
trigger_error(t('Negative changecount value. Please report this to <a href="@516928">@516928</a>.<br />@link',[
'@516928'=>'https://www.drupal.org/node/516928',
'@link'=>var_export($link,TRUE),
]),E_USER_ERROR);
trigger_error("The XML sitemap link for {$link['type']}{$link['id']} has a negative changecount value. Please report this to https://www.drupal.org/node/516928.<br/>".var_export($link,TRUE),E_USER_ERROR);
$link['changecount']=0;
}
// Throw an error with the link does not start with a slash.
// @see \Drupal\Core\Url::fromInternalUri()
if($link['loc'][0]!=='/'){
trigger_error(t('The XML sitemap link path %path for @type @id is invalid because it does not start with a slash.',[
'%path'=>$link['loc'],
'@type'=>$link['type'],
'@id'=>$link['id'],
]),E_USER_ERROR);
trigger_error("The XML sitemap link path {$link['loc']} for {$link['type']}{$link['id']} is invalid because it does not start with a slash.",E_USER_ERROR);
}
// Check if this is a changed link and set the regenerate flag if necessary.
@@ -173,7 +174,7 @@ function xmlsitemap_requirements($phase) {
'title'=>$t('XML sitemap user'),
'value'=>$t('Anonymous access to user profiles'),
'description'=>$t('In order to list user profile links in the sitemap, the anonymous user must have the <a href="@perm-link"><em>View user profiles</em> permission</a>.',[