Ahoy, :-)
I have an issue with the view file outputs, on the screen:
It looks like it is an issue with this line:
I guess 'my_admin_id' is not defined, but it works fine if I go directly to the URL:
/trongate_administrators/login
What is the difference between accessing the URL directly and using the configuration:
Best regards,
Hugo
Error using trongate_administrators as the home page
2 years ago
2 years ago
#1
2 years ago
#2
Hi Hugo, that is a strange issue you have discovered. I haven't spent much time looking into why it is doing that but you are correct 'my_admin_id' is not defined when the template 'tg_admin_template.php' is being required at line 155. I'm also not sure why you would want your app loading in the admin login form by default as this would normally be a hidden feature of your app. A better approach would be to use the simple members module instead.
However, a quick and easy fix is to leave the welcome module as your default:and change the index method to:
However, a quick and easy fix is to leave the welcome module as your default:and change the index method to:
2 years ago
#3
Thank you DaFa :-)
Yes, I know it is strange, but it follows the pattern of some server hosting control panels.
I know I could deep link it even further, but I wanted to be able to control where to put it. Even if it's in the root of the site and on an alternative port. Actually, I did not think about having an external redirect - like the web server itself. I am still learning, so alternative solutions do pop up in my mind, as the focus is on using Trongate for everything. It's my new favorite goto framework :-)
Best regards,
Hugo
Yes, I know it is strange, but it follows the pattern of some server hosting control panels.
I know I could deep link it even further, but I wanted to be able to control where to put it. Even if it's in the root of the site and on an alternative port. Actually, I did not think about having an external redirect - like the web server itself. I am still learning, so alternative solutions do pop up in my mind, as the focus is on using Trongate for everything. It's my new favorite goto framework :-)
Best regards,
Hugo
2 years ago
#4
Hi Hugo and Simon,
I stumbled across this one and it had me scratching my head too, so I tried to figure it out. Despite the error message displayed, about the missing 'my_admin_id', the question is, why is it looking for that anyway?
Because login() calls load_template(), which requires tg_admin_template.php, which in turn only checks if the 2nd URL segment is neither 'login' nor 'submit_login', before displaying the top gutter, which is where 'my_admin_id' is actually referenced.
So if we've configured Trongate to load the trongate_administrators module and login() method by default, the 2nd URL segment will be an empty string, since we are not explicitly navigating to '/login' or '/submit_login'.
I've submitted pull request https://github.com/trongate/trongate-framework/pull/178 with a proposed fix.
Cheers,
A.K.
I stumbled across this one and it had me scratching my head too, so I tried to figure it out. Despite the error message displayed, about the missing 'my_admin_id', the question is, why is it looking for that anyway?
Because login() calls load_template(), which requires tg_admin_template.php, which in turn only checks if the 2nd URL segment is neither 'login' nor 'submit_login', before displaying the top gutter, which is where 'my_admin_id' is actually referenced.
So if we've configured Trongate to load the trongate_administrators module and login() method by default, the 2nd URL segment will be an empty string, since we are not explicitly navigating to '/login' or '/submit_login'.
I've submitted pull request https://github.com/trongate/trongate-framework/pull/178 with a proposed fix.
Cheers,
A.K.