hugocockpit
hugocockpit copied to clipboard
Next: Redirect after setup doesn't point to subfolder
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
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
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.
Ok. I’ll investigate the next branch
Walter Gamba [email protected] +39 348 5610576 Iakta srl Via A. Da Montefeltro 2 10134 Torino - Italy
On 7 Jun 2018, at 09:47, Raffael [email protected] wrote:
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.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
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".