Foswiki registration redirect - no page loaded - html

I have a foswiki site with user registration. It uses the standard registration form wherein users click a "register" button after filling the form. It redirects to: http://localhost/foswiki/bin/register/Main/WebHome and sits (no page loads and no error is shown). The source code shows this is correct, that is the button should post to this URL. I'm not sure why it isn't redirecting to the homepage. The user entry is created correctly and I can manually change the URL to: http://localhost/foswiki/bin/view/Main/WebHome and have it work.
I cannot find why it redirects to /bin/register... rather than /bin/view.... I thought it should be in the http config file, but I couldn't find it.
I compared the results in the console with those from registering on the foswiki website, but cannot see a difference.

I was able to get an answer on the IRC. It is an issue with the quickmenu skin. I stopped using the skin and the issue was corrected.

Related

How to stop React application from going back to home page on clicking save button?

I am developing an application using React/Redux. The application reads from a Json file and saves changes back to the json file.
Its a two page application but I am not using any router. All the editing and saving part is done on the second page, where I am hiding the home page.
My problem is that whenever I am saving something it goes back to the home page, which I know is the default behavior as the source is getting updated. So it is re-rendered. I am using different action for the second page rendering.
But what I am looking for is a simple solution for it to stay on the second page where I can show a success message that the data was saved.
"Where you are hiding the home page" - this suggests you are looking for clientside routing, for which react router would be the normal option: https://github.com/ReactTraining/react-router. You can also look into doing it purely with hooks: https://blog.logrocket.com/how-react-hooks-can-replace-react-router/

What might be adding parameters to the URL?

I have a login form with username and password parameters. During development while refreshing the browser, on a few occasions I have seen my form parameters get put in the URL. This catches my attention since it's a username and password.
For example: http://localhost:8080/ui/?username=xxxxx&password=xxxxx#/login?redirectedFrom=%2Fsomewhere
However, I don't recall exactly what I did prior to this, and I am unable to reproduce it. I've seen it 3 times over a period of weeks.
Any ideas what might be causing the form parameters to be put in the URL?
I'm not sure if any of this is relevant, but I'm using angular with ui-router. The parameters are also parameters to POST, but I don't recall whether I submitted them. I think (although not sure) each time this has happened it was shortly after my login times out and I am redirected to the login page, which adds a ?redirectedFrom parameter. I'm using Chrome and it remembers and fills in the username/password inputs. Chrome developer tools is open. It might be after restarting the server. A browser refresh was done.
I believe you submitted the form again.
In login form always use POST action in your form tag, like this:
<form action="POST">
Don't press F5 to refresh your page after you submit the form. Click in your URL and enter again in your form page.

How do i redirect a user to the previous page they came from after logging in? HTML/ASP

Hi i need to redirect my users to the same page they were just on after logging into my site, the redirectory code will obviously be a different page depending on the page tehy were last at, any help would be appreciate :)
Put an identifier for the page they are coming from in a hidden input in the form.
Copy it to the form you show on a "Login failed, try again" situation (if there is a failed login, otherwise go directly to 3).
Use that identifier to determine the URL to redirect to with a Location: header after a successful login

Leaving a asp.net application then hitting back isn't working

I have an asp.net application and am experiencing a surprising behavior.
Whenever I leave one particular page in the application, The back button starts behaving in the following way:
hitting back (which should take me to the offending page) makes the current screen flash - as if going back - but then reloads the current page instead.
It doesn't matter how I leave that page I see this effect. If I click on a link on the offending page and hit back, same thing. If I am on the offending page and type in a new address in the address bar, then hit back, same thing. It doesn't matter if I go to another page in the same application or an external application, same thing.
I tried using fiddler to see what is going on, and all that I see when I hit back, is all of the external links (css, jquery, etc) get reloaded on the current site. I don't see a 320 from the offending page at all.
Note: disabling Active Scripts hides this symptom.
Most likely the external page either is tampering with your browser history (via JS) and setting the same page as the last page in your history when the site is being loaded, or it has another page set between that redirects to the page you are seeing, and when you click back you are loading the redirect page again.
Try to disable JavaScript and see if it is still happening. If yes, try to analyse the first load of the page with fiddler and see if another page is redirecting you.
False alarm:
This is an inherited project and I hadn't read all the code. There is javascript that says:
<script type="text/javascript">
if (window.history.forward(1) != null)
window.history.forward(1);
</script>
Problem solved.

an iframe for multiple users

I am trying to create a web page with the following :
Buttons and input fields etc. in the top half of the page that allow the user to define certain criteria, when the user clicks submit, the page calls some php code that writes an iframe referenced html file which is then shewn on the bottom part of the web page.
I think I understand how to do this for a web page referring to a single iframe document source but there may be more than one user running the page so how do I have the iframe pointing to the correct iframe source for each user?
Some web searching sugests that this is the kind of thing done with XMLHttpRequest, I'll have a look into that.
If I understand correctly, your PHP code creates an HTML file and then loads it in an iframe.
You could have your PHP script output the HTML, then load the PHP script in your iframe directly. Now there is no way for another user to accidentally get the other users' output.
I'm not sure if I understand exactly what you want to do.. but if you have already existing database of users, make a new table with Iframe preferences... so when they click submit, the preferences will be saved to the database with the user_id.. so next time just check if the user has already chosen... if yes, get the preferences from database.. if not -> redirect him to do so.
I don't know if that's exactly what you want