Problem/Motivation

New installation v. 8.1.5 in subfolder: Configuration -> System -> Basic site settings

Basic site setting page doesn't load due to error page.

Uncaught PHP Exception InvalidArgumentException: "Source path has to start with a slash." at /home/nrman99c/public_html/site/core/lib/Drupal/Core/Path/AliasManager.php line 186

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

drupert55 created an issue. See original summary.

cilefen’s picture

Component: configuration system » base system
Category: Bug report » Support request
Status: Active » Postponed (maintainer needs more info)
Issue tags: -The website encountered an unexpected error. Please try again later.

We cannot know what the error is unless you check your PHP logs and paste the error in the issue summary.

drupert55’s picture

Here is the error statement in php_errorlog file...

Uncaught PHP Exception InvalidArgumentException: "Source path has to start with a slash." at /home/nrman99c/public_html/site/core/lib/Drupal/Core/Path/AliasManager.php line 186

Thanks for your reply.

cilefen’s picture

Status: Postponed (maintainer needs more info) » Active

It seems like something is wrong with rewriting. What is the web server?

drupert55’s picture

Changing status from Postponed to Active since requested info was submitted moments ago in last reply. Thanks!

drupert55’s picture

Oops - look like we posted nearly at the same time.

Linux server

cilefen’s picture

By web server, I meant Apache, Nginx, PHP built-in, lighttpd, etc...

drupert55’s picture

I meant to say Apache webserver, Linux operating system.

Thanks!

cilefen’s picture

Double check the web server requirements because they touch on htaccess.

drupert55’s picture

I will and will update you. Thanks!

drupert55’s picture

Is this the same issue? https://www.drupal.org/node/2569117

Thanks.

cilefen’s picture

Title: The website encountered an unexpected error. Please try again later. » InvalidArgumentException: "Source path has to start with a slash." when Drupal installed in a subdirectory
Category: Support request » Bug report
Priority: Normal » Major
Issue summary: View changes
Issue tags: +Needs steps to reproduce
Related issues: +#2569117: "Source path ... has to start with a slash" exception when using contextual filter

It is at least related. We need more information in the issue summary about how this site was installed, what exactly you mean by "subfolder" (is that where Drupal is installed or are you referring to a URL path?), etc. Notice that I've used the issue summary template to make this more clear for contributors. Step-by-step reproduction instructions in the Problem/Motivation section would be quite useful.

I am marking this a Major bug because of the exception.

drupert55’s picture

Thanks cilefen.

The installation is in its own folder, which I call the 'subfolder'. It was auto-installed via Softaculous.

So far, there are 2 issues (not sure if related):

1) Described at https://www.drupal.org/node/2763925 => Upon installation, the first encounter is with the frontpage which shows Page Not Found, not the Welcome message.

This error is in the logs: PHP Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /home/.../public_html/folder/index.php on line 11

2) The next error encountered was 'Configuration -> Basic site setting', hence this submitted issue. I was clicking around to make sure all was fine with the site.

Thanks!

cilefen’s picture

That's good, and I will stress again that it is important to update the issue summary with the things you are writing as not everyone reads all comments. Error #1 suggests you are running an old version of PHP. What version is it?

drupert55’s picture

Gotcha! PHP 5.6.18

Maybe that's an old message before the PHP version was updated. I haven't seen that message recently upon loading the page.

What I'm going to do is uninstall then reinstall again via Softaculous with PHP 5.6.18. I'll report back.

Thanks!

drupert55’s picture

After reinstallation via Softaculous on Linux, Apache & PHP 5.6.18, installed in its own folder, here are the errors in php_errorlog:

~~~~~~~~~~~~
1) PHP Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /home/.../public_html/folder/index.php on line 11

2) [11-Jul-2016 22:47:25 UTC] Uncaught PHP Exception InvalidArgumentException: "Source path has to start with a slash." at /home/.../public_html/folder/core/lib/Drupal/Core/Path/AliasManager.php line 186
~~~~~~~~~~~~

Note: 1) was received upon installation and not yet visited website. There was no error message generated upon loading the front page (index file).
2) was received after clicking the 'Basic site setting' link. What displayed upon clicking was "The website encountered an unexpected error. Please try again later." in addition to the error message in php_errorlog mentioned above.

Conclusion: Issues unresolved.

Thanks!

cilefen’s picture

Line 11 of index.php contains a "use" statement, which was introduced in PHP 5.3. The PHP on your server does not understand it. This is actually the very first line of code in Drupal 8, so it's not off to a good start.

Did you actually complete an installation?

drupert55’s picture

Thanks again for your reply, cliefen!

My response (#16) is after reinstallation.

drupert55’s picture

PROBLEM SOLVED!

In Softaculous, in the Site Name, I had special characters [The], ' and !. I'm not sure which characters caused the issue so I removed them all. That removed both errors and no php_errorlog file was created!

Wow...how I wished there were better instructions on Softaculous! Those instructions aren't even in 'Configuration -> Basic site setting' so I tried it. It took the change! Yaaay!

*** CONCLUSION: No special characters in Softaculous in Site Name. Can add AFTER the installation via 'Configuration...'***

Thanks Cilefen! We now know the info for future Softaculous installations!

Feel free to close this issue.

Thanks again!

cilefen’s picture

Status: Active » Closed (works as designed)

I guess that must have also been the directory name.

drupert55’s picture

The directory name was 4 alphabetical characters. It was only the Site Name that had special characters. Thanks again!

haseebjamal’s picture

Issue tags: -Needs steps to reproduce +Special characters in site title during installation

Hi
I have the same issue, i had special characters in drupal site title and currently my "Site Information" admin page is showing blank with the error "The website encountered an unexpected error. Please try again later."

Can you tell me what steps you took to change the site title, as the Site Info page in admin area is in-accessible.

cilefen’s picture

Issue tags: -Special characters in site title during installation

You are on Softaculous?

haseebjamal’s picture

No i migrated from D7 to D8 using "backup and migrate" module

cilefen’s picture

Title: InvalidArgumentException: "Source path has to start with a slash." when Drupal installed in a subdirectory » Certain characters in a site name lead to InvalidArgumentException: "Source path has to start with a slash." when Drupal installed in a subdirectory
Version: 8.1.x-dev » 8.2.x-dev
Status: Closed (works as designed) » Active
Issue tags: +Needs issue summary update
cilefen’s picture

I'm not even sure about the sub directory involvement. It would be great to have steps to reproduce on a clean site written out in the issue summary.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

xjm’s picture

Status: Active » Postponed (maintainer needs more info)

Postponing for more info for #26. Thank you for reporting this!

ml1’s picture

Using a port number seems to make it happen every time.

http://www.xyz.com:80/anything

Our vulnerability scanner generated thousands of these errors.

[27-Mar-2017 12:45:23 Europe/Berlin] Uncaught PHP Exception InvalidArgumentException: "Source path :80/mysql/sqlmanager has to start with a slash." at C:\Apache24\html\core\lib\Drupal\Core\Path\AliasManager.php line 186
[27-Mar-2017 12:45:24 Europe/Berlin] Uncaught PHP Exception InvalidArgumentException: "Source path :80/mysql/mysqlmanager has to start with a slash." at C:\Apache24\html\core\lib\Drupal\Core\Path\AliasManager.php line 186
[27-Mar-2017 12:45:26 Europe/Berlin] Uncaught PHP Exception InvalidArgumentException: "Source path :80/phpMyadmin has to start with a slash." at C:\Apache24\html\core\lib\Drupal\Core\Path\AliasManager.php line 186
[27-Mar-2017 12:45:27 Europe/Berlin] Uncaught PHP Exception InvalidArgumentException: "Source path :80/phpMyAdmin has to start with a slash." at C:\Apache24\html\core\lib\Drupal\Core\Path\AliasManager.php line 186

xjm’s picture

So #29 does not seem like a major bug to me; technically those should probably be 403s, but they are not valid paths to begin with. I believe we dealt with something similar previously a few times, once at least in D8 and once even in D7. I couldn't find the issue quickly.

xjm’s picture

Also, interestingly, I cannot reproduce #29. My local install runs on port 8888 and I do not get these errors using that port. I just get a normal 404 served by Drupal.

I notice Windows paths above, but #3 did not have Windows paths, so that doesn't seem to be in common either.

So I guess we still need more steps to reproduce here.

xjm’s picture

I also was not able to reproduce any error with the site name ' ! [, either at valid or invalid URLs.

It seems like there is a good chance this is a server configuration issue.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

pameeela’s picture

Thanks for reporting this issue. We rely on issue reports like this one to resolve bugs and improve Drupal core.

As part of the Bug Smash Initiative, we are triaging issues that are marked "Postponed (maintainer needs more info)".

Upon investigation, this seems like a duplicate of #3043779: "Source path has to start with a slash" exception when hitting path prefixed with index.php with RequestPath condition so I am going to mark this Closed (duplicate). I've also updated that issue to give drupert55 credit for contributions to this issue.

If anyone can provide additional information on how this is different, please include complete steps to reproduce the issue (starting from "Install Drupal core"), document those steps in the issue summary and set the issue status back to "Active".

Thanks!

pameeela’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)
Issue tags: +Bug Smash Initiative

And now to actually close it!