Error - External URLs do not have an internal route name I can't access to my site because of this error:


  UnexpectedValueException: External URLs do not have an internal
  route name. in Drupal\Core\Url->getRouteName() (line 554 of
  C:\Users\user\Documents\Sites\camp\core\lib\Drupal\Core\Url.php).
  
  This is the function that I have in line 552 to 558.


public function getRouteName() {
if ($this-&gt;unrouted) {
  throw new \UnexpectedValueException('External URLs do not have an internal route name.');
}

return $this-&gt;routeName;
}


The last thing I have done it was update 2 nodes that I have created and a View of that content type.

The nodes I have changed the text (just text, didn't put URL or so) and added a photo storage locally

That content type has 2 fields, body and image

On view I deleted the field body and then added again

I have deleted the view, nodes and content type and I still having that error

I don't know if this help but I have installed these modules:

video embed field, views infinite scroll, superfish, pathauto, libraries, flexslider and entity reference revision.

Today I installed the module paragraphs but I uninstalled after the error

Any ideas?

This is the second time that happened to me with this site, the first time I lost some work because I have backed up an older version, but I don't want to lose some work again.
Hi

After a lot of research and try and error attempts I have found what was doing that.

My problem starts when I delete some view page that I have created, it seems the path of that page is still "alive".

If I create another page with them same path the site works fine

So to fix this problem:

- Delete the page view with some path, eg "contacts" (at this point I have that error)

- Create a new content and set the same URL name, in this case "contacts" (at this point the site is working 100%)

- Then delete the content created in the step above (site is still working 100%)

This seems the URL path its no deleted by drupal on the first step and thats why I have that error.