-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing context part of path for recover password link in MD login form #60
Comments
If someone looks at this issue and has a answer to the why question blow hen is welcome to enlightening me. Both FoBo and Lift ProtoUser is using lostPasswordPath in loginXhtml like this ... href={lostPasswordPath.mkString("/", "/", "")} ... but only FoBo's override of loginXhtml seems affected by this issue. Some ProtoUser code from Lift also used by FoBo that builds up the path. def lostPasswordSuffix = "lost_password"
lazy val lostPasswordPath = thePath(lostPasswordSuffix)
protected def thePath(end: String): List[String] = basePath ::: List(end)
def basePath: List[String] = "user_mgt" :: Nil This dose clearly not add the context part of the full path to the lostPasswordPath as this is a list ["user_mgt","lost_password"] giving a relative path "/user_mgt/lost_password" created by mkString("/", "/", "") so the solution to the issue is else where to be found. To test and compare the behaviour I have the following context path parts, "lift-advanced-md" for testing the above. To check the behaviour of Lift vanila ProtoUser I installed the lift_basic template with context path "lift_basic". Then the tests shows that with "list_basic" the context part is present but with "lift-advanced-md" the context part of the full path is missing hence the page can not be found. Why is there a difference in behaviour ? Concluding that there seems to be a difference in behaviour between FoBo originating code and the use of vanilla ProtoUser the context part of the path needs to be added to FoBo's override of the loginXhtml form code. Using the following expression dose fix the issue val lpwPath = if (S.contextPath != "") S.contextPath + lostPasswordPath.mkString("/", "/", "") else lostPasswordPath.mkString("/", "/", "")
:
...href={lpwPath}... |
In the material design form we currently need to have val lpwPath = if (S.contextPath != "")
S.contextPath + lostPasswordPath.mkString("/", "/", "")
else lostPasswordPath.mkString("/", "/", "")
:
<md-button class="md-primary" href={ lpwPath } >{ ... }</md-button> In the bootstrap form we can still have (same as in Lift ProtoUser) <a href={ lostPasswordPath.mkString("/", "/", "") }>{ ... }</a> Could it be that Lift has a parsing phase that manipulates standard html elements/attributes but avoids custom elements/attributes? |
Link to recover password page in MaterialMegaMetaProtoUser login form will be broken if app has a context path != "/". This issue has been found both in FoBo v1.5 compiled for 2.6.2 and 3.0.
The text was updated successfully, but these errors were encountered: