Local core dev directory located at "http://localhost/sandbox/core-dev/webroot".
Fresh install, went thru installation OK until last step, clicked "Visit your new site" link shown at URL "http://localhost/sandbox/core-dev/webroot/core/install.php?langcode=en&p..."
URL not found at "http://localhost/sandbox-dev/webroot/"
Found obvious cause at line 2006 of install.core.inc:

  // Ensure the URL that is generated for the home page does not have 'install.php'
  // in it.
  $request = Request::createFromGlobals();
  $generator = Drupal::urlGenerator();
  $generator->setBasePath(str_replace('/core', '', $request->getBasePath()) . '/');
  $generator->setScriptPath('');
  $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>';

Maybe str_repping for "/core/" instead of "/core" would mitigate this, although not a perfect solution.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rhm5000’s picture

I was able to reproduce the bug in the minimal installation.
In the standard installation I did not have an issue with the link for Visit your new site in the last step.

rhm5000’s picture

Clean urls are do not seem to be enabled by default in the minimal installation.

Change record 'clean_url' configuration setting removed; clean URLs are autodetected each request indicates the change from 7 to 8.

rhm5000’s picture

Does changing the configuration of RewriteBase in .htaccess when using virtual directories do anything?

amontero’s picture

Status: Active » Needs review
FileSize
1.15 KB

Thanks rhm50.
I'm using Drupal's default .htaccess and Apache default vhost on Ubuntu. Which change do you suggest?
Aside from this, I don't see how this can address the issue, since "/core" would stay in the path.

Anyway, I've found a solution that works with some easy regex. Let's see what the testbot says. Tested only using "minimal" profile.

rhm5000’s picture

(edit) Lines 106 or 110 in [drupal_install]/.htaccess to RewriteBase /[web_alias]/[drupal_install] can be changed to accommodate Virtual Directories.

I am getting another error similar to this when trying to access other admin links /admin/appearance, /admin/appearance, /admin/structure. All of the url paths work fine if I prepend index.php ie., http://localhost/[web_alias]/[drupal_install]/index.php/admin/modules.

Not sure the patch will address problems with other urls. I have attached a screenshot of the error I'm getting.

rhm5000’s picture

I applied the patch in #5 still see the same problem, receiving 404 error, and not seeing homepage. Again, accessing the page via http://localhost/[web_alias]/[drupal_install]/index.php/[drupal_path] works.

rhm5000’s picture

Check out issue #432384 Any non-existant URL containing a valid parent path returns 200, not 404 looks similar to the error seen in this issue. The error does not show up on the minimum install when changing RewiteBase /[web-alias]/[drupal_install] or RewiteBase /[drupal_install].

amontero’s picture

Thx, rhm50.
I have none of such issues you mention. Plain LAMP and Drupal's unmodified .htaccess . Clean URLs enabled and working OK all the time.
The problem I'm having is because my local dev URL contains "core" and looks like to me it's just a string manipulation issue in one specific piece of code.
Maybe you should check for similar issues or create another with your configuration and steps to reproduce.

amontero’s picture

Issue tags: +Novice

Makes it for an easy issue to handle and review.

rhm5000’s picture

Initialy I used xmapp 1.8.3 on Windows 7, Apache distribution containing MySQL, PHP and Perl, with mod_rewrite enabled, to test the drupal minimal install. I did the same procedure as before but on Ubuntu 12.04 using simple lamp install with mod_rewrite enabled, and I am also using mod_userdir. I am not using xmapp but instead a normal linux install of Apache, Mysql and PHP.

Again, I beleive this is similar to issue #432384 , if not a duplicate. The 404 Page not found error is what I see when accessing the page via http://localhost/~username/[drupal_site], I do not see this error when adding index.php to the url i.e., http://localhost/~username/[drupal_site]/index.php which the issue describes.

After clicking on the link for Visit your new site after the install, I am redirected from http://localhost/~username/[drupal_site] to http://localhost/~username/[drupal_site]/user/1 which returns the 404 Page not found error.

I have attached two screen shots from the Ubuntu 12.04 drupal install one using the index.php in the url and one without.

amontero’s picture

Title: Broken URL after install if web path contains "/core" » Broken "Visit your new site" link at install process finish page if web path contains "/core"
FileSize
1.15 KB

Tracking HEAD.
@rhm50: looks like to me that none of the issues you mention or link are related to this one. This issue refers *only* to an incorrectly crafted URL at *install wizard finish page* if the URL contains the string "/core" in the path. Only in that particular screen (Updating issue to better reflect this).

mErilainen’s picture

Status: Needs review » Reviewed & tested by the community

Patch works as it should.
I had to check what the number signs (#) do in the regex in the patch. They function as delimiter, "/" is more commonly used but "#" is easier to read in this case when it comes to front and/or backslashes.
https://en.wikipedia.org/wiki/Leaning_toothpick_syndrome

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 4351d67 and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.