I have a page that is submitting to the database fine, but no matter what i do i cannot get the redirect
Tried removing and reinstalling browser component
Tried to attach a ‘success’ message redirect
Tried to attach a ‘submit’ redirect
Nothing works https://sellerhomevalue.com/new.asp?ID=120893
UPDATE - found the issue. The script for the browser was not installed when i added the component.
so for anyone that might have the same issue i have, after you install the Browser component, ensure that the script is in the code
That is an easy step to overlook. Experiences list this will help to keep that step fresh. I made the same many times when I first started using Wappler. Just go ahead and make it one of the essentials during your page setup.
Here’s some other good things you can do with the browser component from TomD: Browser Component Features
The query.r. expression is filled in from the Security Provider Enforcer if the user has been redirected from a specific page as discussed in Redirect to intended URL after login. If the user has not visited a page prior to coming to the login page, then the default should be the dashboard page.
It’s not working in either case with a value or without a value.
I actually removed the query expression entirely and just did a direct browser redirect to the dashboard.php file and still got the same error, so I am not sure it has to do with the query expression.
Can you please send a link to your page, so we can check this … probably that’s the issue. And probably the server action doesn’t return an OK 200 status so that’s why the redirect (success event) is not triggered.
Oh wait, i see an issue on your page.
Why are you using a form to run the server action? The Facebook login tutorial explains you should use an anchor link <a> to run it…
I know with nodejs you can do server redirects, but you can’t do that in php, so how would you do a redirect using an anchor link and the Facebook login process?
I was under the impression that only worked for nodejs, but if works for php too, then that’s great!
The only issue is the query expression isn’t be sent to the server because I would be using the anchor link, so the server would not know where to send the user back to the page they were on after they logged in.
From a user point of view, if they try to access a restricted page that requires a login, they would expect to be sent back to the page they were on after they logged in, instead of having to navigate back to the page themselves.
I had the same issue, Nodejs redirect to intended URL after login, when I was experimenting with nodejs and that’s one of the reasons I came back to php because I thought it would be different. I could have sworn I had this working on a different project, but perhaps I ended up discarding the Facebook OAuth route and used a traditional login route instead to avoid this issue.
Thanks for taking the time to look at this @Teodor, I appreciate it.