Page 1 of 1

Login Page Not working Properly

Posted: 2023-02-11 00:57
by rpierce
Hi All,

My login page has stopped working as expected. Normally when users log in to the site they see a background image and the dialog for entering username and password. At some point the login dialog and background image have stopped appearing. Users can still get logged in by clicking on the green "Sign In" button at the top right of the index.php page. I notice that when I first go to the site the URL does not include ?signin=1. After clicking the "Sign In" button the URL is updated to include that and the BG image and Sign in dialog appear.

Which file do I need to inspect to find the issue?

Thanks for your help

The login screen should appear this way:
Capture2.JPG
Capture2.JPG (155.96 KiB) Viewed 24064 times
But it is currently appearing this way:
Capture1.JPG
Capture1.JPG (17.46 KiB) Viewed 24064 times

Re: Login Page Not working Properly

Posted: 2023-02-11 07:12
by jsetzer
I can see a small gap at the very top of 2nd screenshot. Don't know if this is just a matter of screenshot offset or if this is a spacer due to some unwanted HTML output.

Just a few ideas from my experience with similar output:
  • You should check your php files for any content before the leading <?php token
  • You should check for any var-dump() or echo() or print_r() output (or similar output commands) somewhere in the beginning of the rendering sequence, perhaps in header-extras.php, in __global.php or in __bootstrap.php
  • You should check if any relevant php file has been stored as "utf-8 WITH BOM", which actually means there are (invisible) characters in the beginning of the file (=before the leading <?php-token, but invisible in many code editors, by default)
  • For narrowing down, try with removing your login-page customizations, especially in header-extras.php.
(Just my 2 ¢)

Re: Login Page Not working Properly

Posted: 2023-02-11 17:17
by rpierce
Thank you Jan!

I'll investigate those tips.

Note: I think the gap at the top of the screen shot is simple where I cropped it using the Snip tool.

Ray

Re: Login Page Not working Properly

Posted: 2023-02-11 18:04
by rpierce
Hi Again Jan,

Where is the _bootstrap.php file located?

I have tried what you talked about with no success.
  • All files so far are UTF-8
    There are no leading characters before <?
    I have removed all code in header_extras and als investigated footer_extras
Do you have any other possibilities?

Re: Login Page Not working Properly

Posted: 2023-02-11 20:24
by jsetzer
hooks/__bootstrap.php will be used in new versions of AppGini. If you don't have it, it doesn't matter.

Small note: it is "__bootstrap.php" (double underscore), not "_bootstrap.php"

No more ideas right now except the standard questions we are always asking:
  • Are there any javascript errors in console tab of your browser's development tools?
  • Do you clear browser cache when reloading?

Re: Login Page Not working Properly

Posted: 2023-02-11 22:07
by rpierce
Jan,

Yes, I clear browser cache frequently but that doesn't help,

I never think to check the console. I did and holy cow! Errors are there. I'm posting a snip image to see if you have any ideas of what I need to do about them.
Capture.JPG
Capture.JPG (92.73 KiB) Viewed 24006 times

Re: Login Page Not working Properly

Posted: 2023-02-12 06:42
by jsetzer
Well, as the error messages say, there is a problem with CKEditor (WYSIWYG HTML editor). This is not part of standard AppGini generated code. So I guess you have included that library somewhere, perhaps in header-extras.php.

For narrowing down, I would comment out the script-include and all code related to that CKEditor.