Skip to content
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

Next: Redirect after setup doesn't point to subfolder #7

Open
raffaelj opened this issue May 18, 2018 · 4 comments
Open

Next: Redirect after setup doesn't point to subfolder #7

raffaelj opened this issue May 18, 2018 · 4 comments

Comments

@raffaelj
Copy link

After the setup procedure and clicking "OK, done" I get redirected to http://localhost/dashboard/ instead of http://localhost/cockpit-next/dashboard/.

Windows7, Xampp with PHP7, tested with Firefox and Opera, with a fresh download of cockpit-next

@zontarian
Copy link
Collaborator

Sorry, I could not reproduce this behaviour.
Just downloaded everything anew today (cockpit + Hugo) and it worked as expected
My setup is nginx/PHP7 on Mac Osx.

The only thing weird was that I was already logged with another user, prior to reinstalling everything, and indeed after installing Cockpit i was redirected to the dashboard. After logging out and logging in with the proper user everything was fine.

BTW by cockpit-next, are you referring to the stable or the next gen?
I usually download from https://github.com/agentejo/cockpit the master branch

@raffaelj raffaelj changed the title Redirect after setup doesn't point to subfolder Next: Redirect after setup doesn't point to subfolder Jun 7, 2018
@raffaelj
Copy link
Author

raffaelj commented Jun 7, 2018

Ah, sorry for not mentioning - I use the next branch.

The last commit in the master branch is from 3 months ago. After reading a lot of issues and comparing the cool new features posted on Twitter, it felt like the next branch is the one to use.

@zontarian
Copy link
Collaborator

zontarian commented Jun 7, 2018 via email

@raffaelj
Copy link
Author

raffaelj commented Jun 7, 2018

I tested it again with the master branch. It's the same behavior.

Steps to reproduce:

  • download the master branch from here https://github.com/agentejo/cockpit/archive/master.zip
  • copy the files to E:\xampp7\htdocs\cockpit-master
  • open localhost/cockpit-next/install
  • login with admin/admin
  • create two test collections
  • copy hugocockpit files to E:\xampp7\htdocs\cockpit-master\addons\Hugo
  • run Hugo installer and follow all steps
  • Click "OK, done!"

I get redirected to localhost/dashboard instead of localhost/cockpit-next/dashboard.
To be sure, I tested it with Opera 53.0 without plugins and with Firefox ESR with script blockers.

So it's not a problem with the next branch.


And now I looked in the code and found the solution here:
https://github.com/iakta/hugocockpit/blob/feature/6-checkbox-toggling/views/installer.php#L295

I replaced location.href='..'; with location.href=App.base_url + "/hugo";

I hate these moments, when I test multiple browsers, repos, reinstall everything, think about Apache configurations and then I look at the source, need 5 minutes, change one line and it works.

Should I make a pull request? There are a few lines, which are commented out. So I'm not sure, if you had other plans with the last Done-Redirect. And actually, for a pure redirect it's not neccessary to use a button. It would be more intuitive, if there was a massage with "OK, Done!" with two links below: "Go to Hugo" and "Go to Dashboard".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants