Logo image is not displayed after user login
-
@JonathanLee Tried different devices, including 2 phones, all are same, the logo is not displayed.
-
The file, yours is called captiveportal-logo.png, is (should be) present in the portal web server root folder.
Mine is called "captiveportal-nvxx-logo.png".[23.09.1-RELEASE][root@pfSense.bhf.tld]/usr/local/captiveportal: ls -al total 96 lrwxr-xr-x 1 root wheel 43 Nov 19 13:13 captiveportal-2style.css@ -> /var/db/cpelements/captiveportal-2style.css lrwxr-xr-x 1 root wheel 43 Nov 19 13:13 captiveportal-custom.css@ -> /var/db/cpelements/captiveportal-custom.css -rw-r--r-- 1 root wheel 82730 Dec 6 21:10 captiveportal-default-logo.png lrwxr-xr-x 1 root wheel 47 Nov 19 13:13 captiveportal-mac-block.html@ -> /var/db/cpelements/captiveportal-mac-block.html lrwxr-xr-x 1 root wheel 46 Nov 19 13:13 captiveportal-nvxx-logo.png@ -> /var/db/cpelements/captiveportal-nvxx-logo.png -rw-r--r-- 1 root wheel 14429 Dec 6 21:10 index.php
As you can see, the file is actually a linked file to (fir me) : /var/db/cpelements/captiveportal-nvxx-logo.png
Lets check /var/db/cpelements/ :
[23.09.1-RELEASE][root@pfSense.bhf.tld]/usr/local/captiveportal: ls -al /var/db/cpelements/ total 463 -rw-r--r-- 1 root wheel 2573 Dec 21 07:40 captiveportal-2style.css -rw-r--r-- 1 root wheel 143940 Dec 21 07:40 captiveportal-custom.css -rw-r--r-- 1 root wheel 709 Dec 21 07:40 captiveportal-mac-block.html -rw-r--r-- 1 root wheel 16886 Dec 21 07:40 captiveportal-nvxx-logo.png
So here is my image file, captiveportal-nvxx-logo.png.
You find the same ?
-
@Gertjan This is what I get, only the css file is a link file to /var/db/cpelements/captiveportal-style.css.
As I mentioned before, I can open the logo file using this link: https://portal.test.com:8003/captiveportal-logo.png[2.7.2-RELEASE][admin@portal01]/root: ls /var/db/cpelements/
captiveportal-style.css[2.7.2-RELEASE][admin@portal01]/root: ls /usr/local/captiveportal/
captiveportal-background.png captiveportal-style.css
captiveportal-default-logo.png index.php
captiveportal-logo.png[2.7.2-RELEASE][admin@portal01]/root: ls -l /usr/local/captiveportal/
total 123
-rw-r--r-- 1 root wheel 16916 Nov 3 18:55 captiveportal-background.png
-rw-r--r-- 1 root wheel 82730 Dec 7 04:09 captiveportal-default-logo.png
-rw-r--r-- 1 root wheel 7619 Nov 8 08:53 captiveportal-logo.png
lrwxr-xr-x 1 root wheel 42 Nov 1 17:26 captiveportal-style.css -> /var/db/cpelements/captiveportal-style.css
-rw-r--r-- 1 root wheel 14429 Dec 7 04:09 index.php -
@yanqian have you tried to create a symbolical link to that file in the folder that doesn’t have it??
-
@JonathanLee But we do have the logo file in the web root folder.
I think this issue is not caused by file missing, I can view the logo file using the link:
https://portal.test.com:8003/captiveportal-logo.pngIt is same as the src path of logo image in source code of the screen capture ("/captiveportal-logo.png").
As you may see, the web page is logout page, but the URL in location bar is the "redirect URL", maybe this is what casued the issue.
-
@yanqian port number has changed to 8003? It might not be set to use that port on the redirect. I had that issue with Squid blocked urls and I had to create a manual redirect in squidguard that used my new gui port
-
@yanqian said in Logo image is not displayed after user login:
As you may see, the web page is logout page
Hummmmm.
I was wrong ... and you also.
The image you've shown isn't the login page (I was thinking so) - and neither the logout page.
edit 2024-04-17 : I was drunk again ? Not "logout", but Disconnect is clearly shown in the image below.
The word "logout" isn't shown no whereThe page you've shown, I actually never saw it during all my 10++ years of portal usage.
This page is shown when you hit the "captive portal web server if you are already logged in".
Question : why would you do that ? What purpose ?
I this because you manually typed in the URL "https://portal.test.com:8003/index.php?zone=etcetc" ?I'e logged in with my phone and then I typed in my URL ( what a pain, the slight error in the URL and nothing shows up)
The "Proceed to" is there because I have a (not so) neutral landing zone :
:
I've chosen this one because every one on planet earth will know that when that page shows up, they are 'connected'.
I do see an image : the pfSense logo ....
The page you've seeing comes from here.The default logo-image comes from here.
Can you use your navigator using web admin stuff (inspect the downloaded html) to see what actually the name of the image is that it tries to load ?
Mine was "captiveportal-default-logo.png" which is actually an image file in the /usr/local/portal/ folder - not a linked file.
Do you have that file ?
If not : you're missing system default files.
=> copy your own image file and name it "captiveportal-default-logo.png" ?! -
@Gertjan where do you set this up at too?
Updated I found it, Netgate has amazing stuff.
-
@Gertjan As I said before, the screen capture I posted is the page after user has passed the captive portal authentication, the URL in the location bar will be what user tried to access, it depends on what user was going to access.
I guess it should be redirect to the destination URL, but it hadn't done the redirection, and shows the non-good status page, I will post the settings page of the captiveportal zone tomorrow, all are default settings, and enabled logout page.
The URL in screenshot is the windows network detection behavior, this page popup automatically, I will also try to access some other URL, https://www.bing.com , for example. -
@Gertjan
Thank you for your reply, I forgot to answer your questions, here is my reply.Question : why would you do that ? What purpose ?
yanqian: I did nothing, just connect to wifi, the CP login page pop-up, input username and password, then get the webpage as screenshot shows.
Can you use your navigator using web admin stuff (inspect the downloaded html) to see what actually the name of the image is that it tries to load ?
yanqian: Same as yours, I also have the logo file, that is why I also tried to access the URL of logo image directly, and it will shows normally. It just don't show in the page after authentication (the screenshot in first post).
-
Here is the login window with logo image.
BTW, there is some misunderstanding here, I found that the screen capture I posted before is not the logout out pop-up window.
It is a small window with the dark background, as it shows below.Here is the HTML source code, I tried to trigger the captiveportal page with different website, that's why the URLs in location bar are different.
I also tried to disable the custom logo, use the default one, still have this issue, if I click the refresh button on the no-logo page, I will get the destination web site (it is like a manual redirection).
Here is the capture of the settings page before I disable the custom logo.
Update:
It is not 100% reproducible, sometimes it will be redirected to the URL they initially tried to access.Anyway, it is not a big issue, if others haven't got the same issue, then I will just ignore this, thank you. @Gertjan
-
@yanqian does that file have the privileges set correctly? If it is a custom image it might also be required to be set the file to a different chmod setting as the program is accessing it now. I had a text file I needed to set chomod 777 on so that I could use storeID database with it for Squid once.
-
@JonathanLee said in Logo image is not displayed after user login:
does that file have the privileges set correctly?
All the files in /usr/local/captiveportal/ are place there and handles by the system.
The default files are already "ok to go".
User uplaoded files are also "ok".
No need to do anything with these files: owner or access rights. If modifications are needed, the system is, IMHO, already in a degrade state, or worse : I advise a clean install.I never hand to modify, copy or do what so ever with these portal files since ..... pfSense version 0.xx ( a decade ago ).
But there is one possible thing : changing the interface language should be completely neutral.
Again : "should be". Never take it for granted. Switch pfSense to native mode (english) and re test behavior.
The same goes for the files you upload. -
@Gertjan @JonathanLee
It has been fixed, found the same issue.
https://redmine.pfsense.org/issues/15404