Mailing List Archive

Fresh install of IC 5.10.0 from git clone and other adding new users failure in Admin an other locations
I am having issues on a fresh install of IC from git using the strap
demo.

I do the install, everything installs no errors. Then I get an error
from the Admin on create a new user.

The error message on the admin page is

table userdb: set_slice error as called by Vend::Data: DBD::mysql::st
execute failed: Field 'usernick' doesn't have a default value at
/usr/local/interchange/lib/Vend/Table/DBI.pm line 1448. query was:insert

into userdb (`username`,`b_state`,`s_nickname`,`phone_night`,`mv_shipmode`,`preferences`,`price_level`,`zip`,`fname`,`p_nickname`,`b_address1`,`mail_list`,`address3`,`address1`,`password`,`carts`,`lname`,`b_lname`,`address_book`,`file_acl`,`credit_limit`,`email`,`state`,`b_address3`,`accounts`,`b_address2`,`city`,`company`,`dealer`,`phone_day`,`country`,`b_company`,`b_zip`,`address2`,`acl`,`b_nickname`,`inactive`,`b_country`,`mod_time`,`b_phone`,`b_city`,`db_acl`,`fax`,`b_fname`,`owner`)
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
values were:'00002','','','801-295-5022','','','','','','','','offer newsletter alert upgrade','','','sh8835','','','','','','','sales@lyndist.com','','','','','','','','801-295-5022','','','','','','','','','','','','','','',''

So the problem is on second '', which should be the email not '' null if
`b_state` were email there would not be a failure

the strap userdb txt has usernick with email I think the problem is

usernick 198.144.111.124 Denied attempted login with nonexistent
(indirect from usernick) user name 'U00014'

This issue also happens on checkout of the strap demo. The logs always
show '' which needs to have a value and be Unique.

Thanks,

--
Boyd Gerber <gerberb@zenez.com> 801 849-0213
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047


_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Re: Fresh install of IC 5.10.0 from git clone and other adding new users failure in Admin an other locations [ In reply to ]
On Monday 2017-01-23 23:23, Boyd Lynn Gerber wrote:

> I am having issues on a fresh install of IC from git using the strap demo.
>
> I do the install, everything installs no errors. Then I get an error from the
> Admin on create a new user.
>
> The error message on the admin page is
>
> table userdb: set_slice error as called by Vend::Data: DBD::mysql::st execute
> failed: Field 'usernick' doesn't have a default value at
> /usr/local/interchange/lib/Vend/Table/DBI.pm line 1448. query was:insert
>
> into userdb
> (`username`,`b_state`,`s_nickname`,`phone_night`,`mv_shipmode`,`preferences`,`price_level`,`zip`,`fname`,`p_nickname`,`b_address1`,`mail_list`,`address3`,`address1`,`password`,`carts`,`lname`,`b_lname`,`address_book`,`file_acl`,`credit_limit`,`email`,`state`,`b_address3`,`accounts`,`b_address2`,`city`,`company`,`dealer`,`phone_day`,`country`,`b_company`,`b_zip`,`address2`,`acl`,`b_nickname`,`inactive`,`b_country`,`mod_time`,`b_phone`,`b_city`,`db_acl`,`fax`,`b_fname`,`owner`)
> VALUES
> (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
> values were:'00002','','','801-295-5022','','','','','','','','offer
> newsletter alert
> upgrade','','','sh8835','','','','','','','sales@lyndist.com','','','','','','','','801-295-5022','','','','','','','','','','','','','','',''
>
> So the problem is on second '', which should be the email not '' null if
> `b_state` were email there would not be a failure

I was wrong it is not b_state but usernick being ''

> the strap userdb txt has usernick with email I think the problem is
>
> usernick 198.144.111.124 Denied attempted login with nonexistent (indirect
> from usernick) user name 'U00014'

> This issue also happens on checkout of the strap demo. The logs always show
> '' which needs to have a value and be Unique.

The is when placing an order in the logs shows usernick as being '' and
it is not allowed.


--
Boyd Gerber <gerberb@zenez.com> 801 849-0213
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047


_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Re: Fresh install of IC 5.10.0 from git clone and other adding new users failure in Admin an other locations [ In reply to ]
Quoting Boyd Lynn Gerber (gerberb@zenez.com):
> On Monday 2017-01-23 23:23, Boyd Lynn Gerber wrote:
>
> > I am having issues on a fresh install of IC from git using the strap demo.
> >
> > I do the install, everything installs no errors. Then I get an error
> > from the Admin on create a new user.
> >
> > The error message on the admin page is
> >
> > table userdb: set_slice error as called by Vend::Data: DBD::mysql::st
> > execute failed: Field 'usernick' doesn't have a default value at
> > /usr/local/interchange/lib/Vend/Table/DBI.pm line 1448. query was:insert

This admin customer-creation page was the only place affected by
this issue.

The solution was to allow usernick to be NULL, which is a small step
backwards, since it allows for easier introduction of missing usernicks
in customer records.

If a usernick is missing, then it means the user will be unable to
login, with the default Strap settings.

In a perfect world, a database trigger would be used to keep usernick
in-sync with email. However, it is not practical for that to be part of
the Interchange demo catalog distribution.

Instead, the allowance of NULL for usernick allows the customer-creation
page to work, however, you will still need to take one of the following
actions to allow these users to login:

1. Alter your customer-creation page in the Admin to be able to set the
usernick field along with the others. The usernick as used in stock
Strap catalog should be an email address. The form submission should
fail if the value you used is not unique.

2. Alter your catalog.cfg to set the new UserDB "fallback_login"
config option:
UserDB default fallback_login 1
This will allow your users who don't match on usernick to attempt
to match on the username column. However, you will also need to
alter your login.html page and profile if the username is not an
email address.

We may want to distribute a custom Admin customer-creation page with
Strap, that allows entry of the usernick field. The default one is part
of the global Interchange distribution, so we shouldn't modify it.

--
Josh Lavin
End Point Corporation

_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users