From d114a347d1fa192b241fcd6f0bcec243057a945a Mon Sep 17 00:00:00 2001 From: amontero Date: Fri, 16 Aug 2013 20:17:48 +0200 Subject: [PATCH] Broken URL after install if web path contains "/core" --- core/includes/install.core.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index b461342..6581ada 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -2011,7 +2011,7 @@ function install_finished(&$install_state) { // in it. $request = Request::createFromGlobals(); $generator = \Drupal::urlGenerator(); - $generator->setBasePath(str_replace('/core', '', $request->getBasePath()) . '/'); + $generator->setBasePath(preg_replace('#/core$#', '', $request->getBasePath()) . '/' ); $generator->setScriptPath(''); $url = $generator->generateFromPath(''); $output .= '

' . (isset($messages['error']) ? t('Review the messages above before visiting your new site.', array('@url' => $url)) : t('Visit your new site.', array('@url' => $url))) . '

'; -- 1.8.3.4