Skip to content

Doesn't work when ProcessWire is installed in a userdir folder #15

@markjuh

Description

@markjuh

If ProcessWire is installed in a userdir folder, the module returns a 404.

For example:
http://localhost/~mark/processwiretest/

The problem seems to be caused by the following line (line 42):

$startpage = str_ireplace(trim(wire('config')->urls->root, '/'), '', $this->sanitizer->path(dirname($_SERVER['REQUEST_URI'])));

Since wire('config')->urls->root returns a URL, it seems more appropriate to use $this->sanitizer->url() instead of $this->sanitizer->path().

Replacing line 42 with the following seems to solve the problem:

$startpage = str_ireplace(trim(wire('config')->urls->root, '/'), '', $this->sanitizer->url(dirname($_SERVER['REQUEST_URI'])));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions