[ic] Fresh install of IC 5.10.0 from git clone and other adding new users failure in Admin an other locations

Josh Lavin jlavin at endpoint.com
Wed Jan 25 22:22:35 UTC 2017


Quoting Boyd Lynn Gerber (gerberb at 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



More information about the interchange-users mailing list