[SOLVED] Can not add new user with User Administration panel in my project

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
10 posts • Page 1 of 1
yosu
Posts:22
Joined: Wed Mar 14, 2012 4:14 pm

[SOLVED] Can not add new user with User Administration panel in my project

Post by yosu »

I am trying to add several users with the User Administration panel in WinCC OA 3.14patch15 and it always tells me that user already exists after first user is added.

Here I show how I configure the first user.
Image

And after user is added.
Image

Then I try to add a new user and it tells me already exists.
Image

I tested it under Centos 7.3 and OpenSUSE Tumbleweed.

Greetings

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Can not add new user with User Administration panel on Centos 7.3 / OpenSuse (WinCC OA 3.14)

Post by leoknipp »

I have tested using WinCC OA 3.14 + patch P014.
No error occured when adding new users.

Can you please check if errors are reported in the PVSS_II.log file when you are adding users.
If possible please install the newest patch P015.

Best Regards
Leopold Knipp
Senior Support Specialist

yosu
Posts:22
Joined: Wed Mar 14, 2012 4:14 pm

Re: Can not add new user with User Administration panel on Centos 7.3 / OpenSuse (WinCC OA 3.14)

Post by yosu »

I can see this error:

Code: Select all

WCCOAui      (1), 2017.12.21 15:53:18.724, CTRL, WARNING,    76, Invalid argument in function, 
    Module: Vision_8
    Panel: /opt/WinCC_OA/3.14/panels/vision/ud_users.pnl []
    Object: 16 named: "ok" of type: PUSH_BUTTON
    Script: Clicked
    In panel scope library: vision/ud_users.pnl []
    Line: 95, user
I test it in a new project and it works good. It is something in my project.

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Can not add new user with User Administration panel on Centos 7.3 / OpenSuse (WinCC OA 3.14)

Post by leoknipp »

I added some DebugTN statements to the CTRL code.
Can you please copy the attached panel to the directory /panels/vision and test it again.
When adding the user you should see some debug messages. If the error occurs again please post the debug messages.

Best Regards
Leopold Knipp
Senior Support Specialist https://www.winccoa.com/fileadmin/image ... _users.zip
Attachments
ud_users.zip
(36.41 KiB) Downloaded 247 times

yosu
Posts:22
Joined: Wed Mar 14, 2012 4:14 pm

Re: Can not add new user with User Administration panel in my project

Post by yosu »

Logviewer shows this:

Code: Select all

WCCOAui1:2017.12.22 09:20:51.683["save"][96]["user"]["-1"][""]
WCCOAui1:2017.12.22 09:20:51.683["save"][107]["user"]["-1"][""]
WCCOAui1:2017.12.22 09:20:51.686["save"][133]["user"]["-1"][""]
WCCOAui1:2017.12.22 09:20:51.687["save"][152]["user"]["-1"][""]
WCCOAui1:2017.12.22 09:20:51.687["save"][193]["user"]["-1"][dyn_string 7 items
WCCOAui1:     1: "root"
WCCOAui1:     2: "para"
WCCOAui1:     3: "operatorAll"
WCCOAui1:     4: "operator"
WCCOAui1:     5: "guest"
WCCOAui1:     6: "gast"
WCCOAui1:     7: "demo"
WCCOAui1:][0]
WCCOAui      (1), 2017.12.22 09:20:51.682, CTRL, WARNING,    76, Invalid argument in function, 
    Module: Vision_7
    Panel: /home/yosu/svn/base/panels/vision/ud_users.pnl []
    Object: 16 named: "ok" of type: PUSH_BUTTON
    Script: Clicked
    In panel scope library: vision/ud_users.pnl []
    Line: 95, user
I don't know why always panel setup username as -1. I write "user1" but after click "ok", it shows -1

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Can not add new user with User Administration panel in my project

Post by leoknipp »

When looking at the screenshot where the first user was added you can see the username "-1".
It is the same information written by the debug message. The username which is read from the text field is "-1" and not the string you have entered, e.g. "user1".

I do not know why the getting the text returns "-1" instead of the user name defined.

Can you please load the attached panel in a Vision module. Afterwards write some text in the text fields and click "OK".
Do you get the same information (strings entered in the text fields) in the Debug messages?

Best Regards
Leopold Knipp
Senior Support Specialist https://www.winccoa.com/fileadmin/image ... etText.zip
Attachments
getText.zip
(751 Bytes) Downloaded 258 times

yosu
Posts:22
Joined: Wed Mar 14, 2012 4:14 pm

Re: Can not add new user with User Administration panel in my project

Post by yosu »

No. I get this:

Code: Select all

WCCOAui1:2017.12.22 14:58:06.305["save"][6]["user"]["-1"]
WCCOAui1:2017.12.22 14:58:06.306["save"][9]["fullname"]["userFull1"]
WCCOAui      (1), 2017.12.22 14:58:06.305, CTRL, WARNING,    76, Invalid argument in function, 
    Module: _QuickTest_
    Panel: /home/yosu/svn/base/panels/vision/getText.pnl []
    Object: 2 named: "ok" of type: PUSH_BUTTON
    Script: Clicked
    In panel scope library: vision/getText.pnl []
    Line: 5, user
I write "user1" in the upper fieldtext and "userFull1" in the bottom fieldtext.

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Can not add new user with User Administration panel in my project

Post by leoknipp »

Thanks for doing the test.
I discussed it with our UI developer in we potentially found the cause for the problem.
It looks like you have defined a variable with the name "user" in some script/CTRL library.

Can you please check the scripts to detect where the variable is defined and change the code in your script.

Best Regards
Leopold Knipp
Senior Support Specialist

yosu
Posts:22
Joined: Wed Mar 14, 2012 4:14 pm

Re: Can not add new user with User Administration panel in my project

Post by yosu »

Yes, you are right. I found one script which defines a general variable called "user". I rename that variable and now User Administration panel works good.

Any other variable name that can we not define as global?

Thanks

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Can not add new user with User Administration panel in my project

Post by leoknipp »

There are a lot of objects used in the standard panels and we do not know all their names. Therefore we cannot tell you which variable names you should not use.

If you want to avoid conflicts you could add a prefix to the variables defined in your scripts, e.g. the datatype in a short form, "s" for string, "f" for float.
Instead of "user" the variable can then be "sUser" or "s_user".
You can also add some other information, e.g. a shortcut for your company name.

Best Regards
Leopold Knipp
Senior Support Specialist

10 posts • Page 1 of 1