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

Admin "Login to Server" button does not work for custom admin subdirectory names #5

Closed
jayjayuk85 opened this issue Jan 20, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@jayjayuk85
Copy link

We have added the server and it seem to pull through the details in the client are.

However the 'Login to Server' button in the admin section doesn't seem to work?

@mason-cometbackup
Copy link
Contributor

Hi @jayjayuk85 , thanks for trying out this plugin and for your feedback -

When clicking the "Login to Server" button, do you see a popup-blocker warning in the address bar?

@jayjayuk85
Copy link
Author

jayjayuk85 commented Jan 20, 2021

@mason-cometbackup no, it changes the address to 'ourdoiman.com/configservers.php?CometSSO=(load of code here)
It shows a 404 page.

@mason-cometbackup
Copy link
Contributor

That's interesting - it should redirect to {your-whmcs-server}/admin/configservers.php?CometSSO={token} as per https://github.com/CometBackup/comet-whmcs-module/blob/master/cometbackup.php#L448 .

The plugin then catches the CometSSO parameter on the next page load, to handle the real redirect. But in your case it landed upon some other page on the website that didn't load our comet-whmcs-module at all.

  • Is your WHMCS installation under a subdirectory, or does it have the domain all to itself?

@jayjayuk85
Copy link
Author

jayjayuk85 commented Jan 20, 2021

@mason-cometbackup

its a sudomain, so:

client.mydomain.com

I have worked out the issue. You base your link on 'admin' being the default for WHMCS
{your-whmcs-server}/admin/configservers.php?CometSSO={token}

however our admin section is a different name, when I update the 'admin' in the link to our whmcs admin area it works. How can we adjust this please?
{your-whmcs-server}/myadmin/configservers.php?CometSSO={token}

Should I update line 448 with our admin area?

@mason-cometbackup
Copy link
Contributor

Yes, you can go ahead and update it.

A full fix would be if the plugin would determine the name automatically by parsing the $_SERVER['REQUEST_URI'] variable, or, just redirecting to ?CometSSO={token} without specifying the path at all.

@jayjayuk85
Copy link
Author

jayjayuk85 commented Jan 20, 2021

Yeah, that's what I thought, but I wasn't sure on how to do that.

I edited line 448 for now.

@mason-cometbackup mason-cometbackup changed the title Login to server Admin "Login to Server" button does not work for custom admin subdirectory names Jan 20, 2021
@mason-cometbackup mason-cometbackup added the bug Something isn't working label Jan 20, 2021
@ersin-comet
Copy link
Contributor

fixed in #30df73 with the fix @mason-cometbackup recommended

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants