Client Registration Page not working

Good Day Everyone.

The client registration field for my docker instance does not work. I read and found that I need to add data to my database (But I do not know what I am doing). I am currently running a MariaDB.

I connected to the DB via ubuntu command line but I am having issues finding the correct command line to type in. Can anyone just help correct me:

INSERT INTO companies (client_registration_fields) values (‘[{“key”:“first_name”,“required”:true},{“key”:“last_name”,“required”:true},{“key”:“email”,“required”:true},{“key”:“phone”,“required”:false},{“key”:“password”,“required”:true},{“key”:“name”,“required”:false},{“key”:“website”,“required”:false},{“key”:“address1”,“required”:false},{“key”:“address2”,“required”:false},{“key”:“city”,“required”:false},{“key”:“state”,“required”:false},{“key”:“postal_code”,“required”:false},{“key”:“country_id”,“required”:false},{“key”:“custom_value1”,“required”:false},{“key”:“custom_value2”,“required”:false},{“key”:“custom_value3”,“required”:false},{“key”:“custom_value4”,“required”:false},{“key”:“public_notes”,“required”:false},{“key”:“vat_number”,“required”:false}]’);

Hi,

@david do you have any suggestions?

@Surgit

If you have command line access try this:

php artisan tinker

\App\Models\Company::query()->update(['client_registration_fields' => \App\DataMapper\ClientRegistrationFields::generate()]);

1 Like

@david

No Luck. Sorry I am not clued up with regards to Accessing any MySQl database.
Below is example of how I connected to the database via Command Line (If it helps):

mysql -h 166.78.144.191 -u username -ppassword database_name

@Surgit

This isn’t a command to execute in mysql, if you navigate to the root directory of the project. then type those two commands.

php artisan tinker will open a direct DB connection via Laravel, and the next statement injects the required fields into the database for you.

Issue solved. Thanx David

For anyone else having a similar issue:
If your running Invoice Ninja via Docker. Access the container via the following:

sudo docker exec –it /bin/sh

As David mentioned type:
php artisan tinker

then:
\App\Models\Company::query()->update([‘client_registration_fields’ => \App\DataMapper\ClientRegistrationFields::generate()]);

Restart the containers and your Registration page should work as intended

2 Likes