DoliCloud/SellYourSaas

Error when creating new Package

karozans opened this issue · 2 comments

Describe the bug
After a new installation of Sell-Your-SaaS, when following the instructions here....

https://github.com/eldy/sellyoursaas/blob/master/doc/Documentation%20SellYourSaas%20-%20Master%20and%20Deployment%20Servers%20-%20EN.asciidoc#setup-of-packages

There is an error when the create button is clicked.

Field 'tms' doesn't have a default value

This appears similar to an old bug #10709.

To Reproduce
Steps to reproduce the behavior:

  1. Log into dolibarr as an admin user.
  2. Click on SaaS icon on top of page.
  3. Click on New Package on Left side of page.
  4. Fill out form exactly according to the documentation found in the installation instructions.
  5. Click Create button.
  6. See error "Field 'tms' doesn't have a default value"
  7. No new package is created.

Expected behavior
The expected behavior is to have the new package created.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
Mac OS Big Sur
Firefox 93

Smartphone (please complete the following information):
N/A

Additional context
Dolibarr version 14.0.3
Latest Sell-Your-SaaS version.

Running on AWS EC2 instance. Ubuntu 20.04 LTS.
Screen Shot 2021-10-13 at 6 51 36 AM

In order to fix this issue, in the dbase table llx_packages, I modified the tms structure.

I added the attributes to create a time stamp in the field upon creation and upon update.

Not sure if that is the right thing to do or not, but it seems to work.

@karozans
Mariadb may have a parameter in my.cnf that prevents setting an automatic value to the Timestamp field, see if you have this line in my.cnf and comment it out,

explicit_defaults_for_timestamp = 1

then restart the Mariadb server.
This will only solve the problem on the new databases created.