Fixed No list created when creating a new form

AlainR

Member
On a Joomla! 4.3.2, I just installed FabrikDelta4 and created 2 forms.
In both cases, I got the following error message and no list created:
Fabrik error storing list data: Field 'created' doesn’t have a default value

If I create a list manually, everything is created again:
  • the form
  • the group
  • the id and datetime fields
Moreover, the initial fields are not attached to anything, as can be seen in the screenshot :
Capture d’écran du 2023-06-02 17-33-22.png
 
Shouldn't creating a new form with the 'New' button been disabled? So this kind of problem wouldn't occur?
Or implement a redirect (with explanation) to the list creation...
 
Last edited:
There are times you might want different forms for the same list, using different groups for example. So we would want the ability to create new forms. Maybe we need to make selecting an existing list a requirement. On the other hand, I have many forms that are listless, i.e. don't store in the database. This is very handy.
 
@wezetel No, the problem shouldn't occur so is obviously a bug. However if you want a list as the OP does then you should create a list and not a form.

@achartier I think the case here is that the OP wants a list but there may be an issue. And yes, there are times when you want forms only but then you would switch off "Record in database" when creating the form.

@troester I tried creating a form only and specifying a new table name. The list was created but not attached to a table and the table wasn't created.

Error message was "Fabrik error storing list data: Field 'introduction' doesn't have a default value" - I set the List->introduction field to default as NULL, (phpmyadmin) and tried again.

This time the error was "Fabrik error storing list data: Field 'created' doesn't have a default value" - I set the List->created to CURRENT_TIMESTAMP and this time the list was created.


The install script shows that there are no default's set.

CREATE TABLE IF NOT EXISTS `#__fabrik_lists` (
-----
`introduction` TEXT,
-----
`created` DATETIME NOT NULL,
------
 
Yes. The issue is replicatable.
It could be fixed by setting a default on table definition.
But J! "created" standard is not null/no default.

So we should fix the missing date default on form's list creation.

But:
If you are creating a form with "Record to database" = no, it's ok (and this is the "usual" case if you start with a new form).
If you want to record to database and have a list you should start with a new list, not with a new form.
So I think it's no show stopper.
 
But J! "created" standard is not null/no default.

Whatever works is fine. :)

If you are creating a form with "Record to database" = no, it's ok (and this is the "usual" case if you start with a new form).
If you want to record to database and have a list you should start with a new list, not with a new form.
So I think it's no show stopper.
.

Agreed.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top