Getting a rewritten alias URL canonical entity URL (e.g. /my-alias/for-the-node) as string in modern Drupal is simple: $entity->toUrl('canonical')->toString(); Finding out how to get the "raw" unrewritten URL (e.g. /node/123) wasn't that
Welcome to my Blog, happy reading! ツ
This post saved you a lot of time and headache?
Then I'd be very happy about a delicious coffee! Or a helpful book from my wish list.

Or are you looking for professional web software development?
Our experienced team at webks GmbH consults, develops & implements individual, innovative web, eCommerce, Drupal CMS & mobile applications.

