Sub Table Insert Problem

AndyB

Member
You are using DaDaBIK version 9.3-Monterosso enterprise, installed on 06-11-2019 (installation code: 11575579b643f1b03e), the latest version of DaDaBIK is 9.3-Monterosso released on 05-29-2019

You are runnning the last release of DaDaBIK

PHP Version: 7.1.30

mysql version: 5.6.40-84.0-log

Web server: Apache

Client: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:67.0) Gecko/20100101 Firefox/67.0



I have been testing my database after my upgrade to 9.3 and still cannot get the system to insert a sub table record and then return me to the master table. I knew this did not work in version 8 but thought it was fixed in v9.
The parameters below do not seem to make any difference and in fact do not seem to do anything.
Did i miss something?

/ insertion parameters
///////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////

// choose if, in edit and insert forms, you want to see the "multiple inserts" checkbox (0|1)
$show_multiple_inserts_checkbox = 1;

// choose if, after an insert, you want DaDaBIK to display again the insert form (1) or not (0)
$insert_again_after_insert = 1;

// choose if, after an insert, you want DaDaBIK to show you a details page of the record just inserted
$show_details_after_insert = 1;
 

eugenio

Administrator
Staff member
Hello,
I actually don't remember about this bug in v. 8; can you explain more in details what happens after you insert the item record? Please do the test with all the default config parameters.

Best,
 

AndyB

Member
Eugenio,

The details of the issue are

I am logged in as admin and in a master record and have a sub table at the bottom of the screen which is linked to the master record by a unique ID. I can add a record to the sub table from the master record edit but after entering the record the screen returns to the sub table grid view instead of going back to the master record.

If I am logged in as a user, they don’t have direct access to the sub table as the permissions are set as Read = no. After adding a sub record as above the system returns me to a completely blank screen.

Regards

Andy
 

eugenio

Administrator
Staff member
Hello,
you don't need read permissions for an items table, if you have read permissions on the master table, that's enough.

The behaviour you described is strange, can you try the same thing on the on-line demo n.1 (try to add a new item to a quote) and tell me if in the demo you get the expected behaviour and how the behaviour you get in your installation differs? If, from the demo, you enter in admin->form configurator, you can also check how the master details is configured.

Also, I am not sure what you mean when you say "which is linked to the master record by a unique ID".

Best,
 

AndyB

Member
Eugenio,

ok, i tried the demo 1 and it worked as you said it would, however mine does not.
When i did the upgrade i put only the basic info into the config.php file initially and it still behaved in this way.
I also do not get the multiple inserts checkbox.

By linked ot the mater record etc, i meant that the sub record contains the master record unique ID.

I am happy to provide you a login to the database to see what is hapenning.

Regards

Andy
 

eugenio

Administrator
Staff member
Hello,
yes that's strange.

Did you also try a fresh installation? I definitely would try that. If you don't see the multiple inserts checkbox I am pretty sure that something went wrong in the upgrade, by default in config.php you should have $show_multiple_inserts_checkbox = 1, do you have it?

Have you checked in the form configurator if your settings are similar to the ones you see in the demo? Remember that you should set the master/details parameters ONLY for the primary key field of the master table.

If you already did the above checks yes, I can have a look.

Best,
 

AndyB

Member
Eugenio,

I have checked the form configuration details and they look ok.
As per the details copied and pasted from the config.php into my first message you can see the insertion paramenters in my install.
I am not sure i can see how to do a fresh install without having to spend a massive amount of time doing all the form configuration and permissions again with the number of fields and tables i have.

Andy
 

eugenio

Administrator
Staff member
What I meant was I toy installation, just two tables linked in a master/details view, to see if at least this works.
 

AndyB

Member
Eugenio,

I created two tables, test1 and test2 and linked them in a mester details view but none of the insertion paramenters work.
ie No multiple inserts checkbox etc
 

eugenio

Administrator
Staff member
Ok, so leaving the default config parameters, after having inserted an item record, you are not redirected to the master table?
I think there is something wrong in the configuration.
You can send instructions to access the application to support@dadabik.org, I will check the toy application (just be sure that all the config parameters are the default ones).

Best,
 

eugenio

Administrator
Staff member
Just for the records: the problem was due to $show_details_after_insert = 1 in combination with a table without an auto-increment field.
$show_details_after_insert = 1 needs an auto-increment field to work.
 
Top