Commit 69566b6b authored by Pawel G's avatar Pawel G
Browse files

Add todos

parent 6f58d9de
......@@ -168,6 +168,7 @@ class BatchUrlGenerator {
// todo: Change to different function, as this also checks if current user has access. The user however varies depending if process was started from the web interface or via cron/drush. Use getUrlIfValidWithoutAccessCheck()?
if (!$this->pathValidator->isValid($custom_path['path'])) {
// if (!(bool) $this->pathValidator->getUrlIfValidWithoutAccessCheck($custom_path['path'])) {
$this->logger->m(self::PATH_DOES_NOT_EXIST_OR_NO_ACCESS_MESSAGE, ['@path' => $custom_path['path']])
->display('warning', 'administer sitemap settings')
......@@ -59,6 +59,7 @@ class SimplesitemapCustomLinksForm extends SimplesitemapFormBase {
// Checking if internal path exists.
if (!$this->pathValidator->isValid($link_config['path'])
// if (!$this->pathValidator->getUrlIfValidWithoutAccessCheck($link_config['path']) //todo
// Path validator does not see a double slash as an error. Catching this to prevent breaking path generation.
|| strpos($link_config['path'], '//') !== FALSE) {
$form_state->setErrorByName('', $this->t("<strong>Line @line</strong>: The path <em>@path</em> does not exist.", $placeholders));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment