Skip to content

Maybe routes has problem. [setTranslateURIDashes] #1564

Description

@choi-me

I use this config.
setTranslateURIDashes(true)

I think that if I connent 'users/login-process' (dash) then,
should be connected to 'login_process' (underscore) method of 'users' controller.
but contrary to my expectation, just I could see 404 page not found error page.
So, I've checked source.
I think that something important source is missing.

so now I'm using below modified code temporarily.

in: system/Router/Router.php :: autoRoute() function

if ( ! empty($segments))
{
	$this->method = array_shift($segments);
}

    /**
     * Added - BEGIN
     */
    if ($this->collection->shouldTranslateURIDashes()) {
        $this->translateURIDashes = true;
        $this->method = str_replace('-', '_', $this->method);
    }
    /**
     * Added - END
     */

So, could you please check this point?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions