Commit 4351d67f authored by alexpott's avatar alexpott
Browse files

Issue #2045685 by amontero: Fixed Broken 'Visit your new site' link at install...

Issue #2045685 by amontero: Fixed Broken 'Visit your new site' link at install process finish page if web path contains '/core'.
parent 523c8b6c
...@@ -2011,7 +2011,7 @@ function install_finished(&$install_state) { ...@@ -2011,7 +2011,7 @@ function install_finished(&$install_state) {
// in it. // in it.
$request = Request::createFromGlobals(); $request = Request::createFromGlobals();
$generator = \Drupal::urlGenerator(); $generator = \Drupal::urlGenerator();
$generator->setBasePath(str_replace('/core', '', $request->getBasePath()) . '/'); $generator->setBasePath(preg_replace('#/core$#', '', $request->getBasePath()) . '/' );
$generator->setScriptPath(''); $generator->setScriptPath('');
$url = $generator->generateFromPath(''); $url = $generator->generateFromPath('');
$output .= '<p>' . (isset($messages['error']) ? t('Review the messages above before visiting <a href="@url">your new site</a>.', array('@url' => $url)) : t('<a href="@url">Visit your new site</a>.', array('@url' => $url))) . '</p>'; $output .= '<p>' . (isset($messages['error']) ? t('Review the messages above before visiting <a href="@url">your new site</a>.', array('@url' => $url)) : t('<a href="@url">Visit your new site</a>.', array('@url' => $url))) . '</p>';
......
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