When you login to usermin and when (the following is important) the user exists on Webmin Users List there is UI problem happens because theme_header is not printed and old ugly one is provided by the following sub header function.
When you login as I described, this (if (defined(&theme_header))) never evaluates to true.
/usr/libexec/usermin/web-lib-funcs.pl
:
sub header
{
return if ($main::done_webmin_header++);
my $ll;
my $charset = defined($main::force_charset) ? $main::force_charset
: &get_charset();
&PrintHeader($charset);
&load_theme_library();
if (defined(&theme_header)) {
$module_name = &get_module_name();
&theme_header(@_);
$miniserv::page_capture = 1;
return;
}
...
When you login to Usermin using regular/system user credentials - all is fine.
How to reproduce the bug.
- Import virtual server using Virtualmin
- Tick create Webmin user.
- Login to Usermin using that user
- Try clicking on some modules, like Apache or Fetchmail Mail Retrieval and you see what you get.
If you use regular mode - like if there is no Webmin user, then all is fine.
Please fix this bug or correct me if I'm wrong.
Regards, Ilia
Status:
Active
Comments
Submitted by JamieCameron on Thu, 11/06/2014 - 18:22 Comment #1
So this problem happens in usermin , but is only a problem if there is a webmin user with the same name?
That is very odd, as Usermin shouldn't even know which Webmin users exist.
The fact might be different. I just deleted that Webmin user (created by Virtualmin) - the result is the same - old header(theme_header never read, even obviously it exists).
If I go to user and groups, there is only one visible difference between working/not working users - the switch for
Rename group if username changes?
in not working user.Whatever it is, I don't know what but you must definitely take a look.
I can't believe that I really see it... I just login at first with one user - all is fine. Second logout and login with the not working user, and some modules - right frame - not getting theme_header but old one.
Uuff.. Please try to reproduce the error.
Submitted by JamieCameron on Sun, 11/09/2014 - 01:00 Comment #3
Which theme are you seeing this with - the default (Virtualmin Framed), or a custom theme that you're developing?
I see it on my theme! But I wouldn't think it's a bug unless it worked with users that weren't imported by Virtualmin (but I might be wrong all about the real cause). What is for sure, that when I login to Usermin with different users, I get different result. The result is missing
theme_header
(which is obviously there) on one of the users.See the screenshoots:
Normal (working) user. Not working user.
Same theme, same server, nothing is changed. Isn't it weird? What that could be?
Submitted by JamieCameron on Sun, 11/09/2014 - 23:55 Comment #5
Ok, let me give this a try on a test system.
Is your theme the same for both Webmin and Usermin? Or do you have a special Usermin-specific branch?
Alright, please try.
Yes, my theme works fine and the same for both Webmin/Usermin and even for Virtualmin module.
Regards, Ilia
Submitted by JamieCameron on Mon, 11/10/2014 - 20:26 Comment #7
So I just tested this, and on my system the theme worked fine!
Jamie, thank you for the message on the main page! :)
If it works, then fine. But I will try to find the way to re-create the bug, so if it's really there it could be fixed.
P.S. Probably logging using a user that was imported by Virtualmin makes the trick.
Regards, Ilia