Repeated group problems on form

Hi,

Almost 2 months have passed since I opened this ticket. I did not receive any final answer. This is really very frustrating.
I know that this issue is somehow complicated but at the same time it could be major/minor bug, and resolving it can improve fabrikar as well

As I can see, in this forum that other posts are answered much faster I would really appreciate your immediate help with this issue.


BR
 
It's an intractable issue that I'm still working on. Some issues just take a lot more time to figure out. This is one of them. I'm quite aware that it needs fixing, but it is very resistant to debugging, as it's a "Heisenbug" that goes away when you try and debug it (async timing issues).

Sent from my HTC6545LVW using Tapatalk
 
Dear Hugh,

Thank you for your answer.

I tried to examine the form.php 's validate method as I suspect that here may be located the root of the problem.

I put the print_r inside the method in the following way:

PHP:
    /**
     * Validate the form
     * modifies post data to include validation replace data
     *
     * @return  bool  true if form validated ok
     */
    public function validate()
    {
        $input = $this->app->input;

  print_r($input); // <<<----
  die;        // <<<----

After deleting the row with id 419 (click on minus in repeated group), upon form "Save" the whole $input variable is shown in browser.

I observed 2 things that may be related to the problem:

1. The $input variable contains 3 times the form's data.
2. The problematic repeated group in $input variable contains array of 10 rows from [0] to [9] instead of 11 (or 12 I'm not sure what should be there) as seen on the form (12 rows are also present in the underlying database table). Absent rows are these with XXXXXXXX___Y_payments_provider_id (rowid) 419 & 546


* the field is XXXXXXXX___Y_payments_provider_id is the primary key of the repeated table

** element names are slightly changed due security reasons


Fragment of $input variable representing the repeated group rows:


PHP:
[XXXXXXXX___Y_agreement_code] => Array ( [0] => 204 [1] => 204 [2] => 204 [3] => 204 [4] => 204 [5] => 204 [6] => 204 [7] => 204 [8] => 204 [9] => 204 )
[XXXXXXXX___Y_payments_provider_id] => Array ( [0] => 327 [1] => 414 [2] => 415 [3] => 542 [4] => 543 [5] => 325 [6] => 326 [7] => 416 [8] => 544 [9] => 545 )
[XXXXXXXX___Y_provider_id] => Array ( [0] => Array ( [0] => 280 [1] => 280 ) [1] => Array ( [0] => 304 ) [2] => Array ( [0] => 304 ) [3] => Array ( [0] => 304 ) [4] => Array ( [0] => 304 ) [5] => Array ( [0] => 304 ) [6] => Array ( [0] => 304 ) [7] => Array ( [0] => 304 ) [8] => Array ( [0] => 304 ) [9] => Array ( [0] => 304 ) )
[XXXXXXXX___Y_payment_type_id] => Array ( [0] => Array ( [0] => 15 [1] => 15 ) [1] => Array ( [0] => 1 ) [2] => Array ( [0] => 14 ) [3] => Array ( [0] => 14 ) [4] => Array ( [0] => 1 ) [5] => Array ( [0] => 10 ) [6] => Array ( [0] => 3 ) [7] => Array ( [0] => 2 ) [8] => Array ( [0] => 10 ) [9] => Array ( [0] => 3 ) )
[XXXXXXXX___Y_payment_value] => Array ( [0] => 93.30 [1] => 549.00 [2] => 794.96 [3] => 794.96 [4] => 549.00 [5] => 80.00 [6] => 2000.00 [7] => 40.00 [8] => 80.00 [9] => 2000.00 )
[XXXXXXXX___Y_payment_date] => Array ( [0] => 2016-11-03 00:00:00 [1] => 2016-12-02 00:00:00 [2] => 2017-08-16 00:00:00 [3] => 2017-08-16 00:00:00 [4] => 2017-09-02 00:00:00 [5] => 2017-09-16 00:00:00 [6] => 2017-09-16 00:00:00 [7] => 2017-09-16 00:00:00 [8] => 2017-09-16 00:00:00 [9] => 2017-09-16 00:00:00 )
[XXXXXXXX___Y_payment_term_id] => Array ( [0] => Array ( [0] => 4 [1] => 4 ) [1] => Array ( [0] => 4 ) [2] => Array ( [0] => 4 ) [3] => Array ( [0] => 4 ) [4] => Array ( [0] => 4 ) [5] => Array ( [0] => 1 ) [6] => Array ( [0] => 2 ) [7] => Array ( [0] => 4 ) [8] => Array ( [0] => 1 ) [9] => Array ( [0] => 2 ) )
[XXXXXXXX___change_time_stamp] => Array ( [0] => 2016-11-03 16:20:29 [1] => [2] => 2017-01-25 12:20:49 [3] => [4] => [5] => 2016-11-03 16:20:29 [6] => 2016-11-03 16:20:29 [7] => 2017-01-25 12:20:49 [8] => 2017-03-07 16:08:37 [9] => 2017-03-07 16:08:37 )
[XXXXXXXX___Y_payment_terms] => Array ( [0] => - [1] => - [2] => - [3] => - [4] => - [5] => - [6] => - [7] => - [8] => - [9] => - )
[XXXXXXXX___user_id] => Array ( [0] => Array ( [0] => 0 [1] => 0 ) [1] => Array ( [0] => 0 ) [2] => Array ( [0] => 0 ) [3] => Array ( [0] => 0 ) [4] => Array ( [0] => 0 ) [5] => Array ( [0] => 12 ) [6] => Array ( [0] => 0 ) [7] => Array ( [0] => 12 ) [8] => Array ( [0] => 0 ) [9] => Array ( [0] => 0 ) )


Respective (and Non?) Database rows in the table:


Code:
325 00170916-10 204 304 80.00 2017-09-16 1 10 - 2016-11-03 16:20:29 12
326 00170916-10 204 304 2000.00 2017-09-16 2 3 - 2016-11-03 16:20:29 0
327 00170916-10 204 280 93.30 2016-11-03 4 15 - 2016-11-03 16:20:29 0
414 00170916-10 204 304 549.00 2016-12-02 4 1 - 0000-00-00 00:00:00 0
415 00170916-10 204 304 794.96 2017-08-16 4 14 - 2017-01-25 12:20:49 0
416 00170916-10 204 304 40.00 2017-09-16 4 2 - 2017-01-25 12:20:49 12
419 00170916-10 204 280 12.00 2017-09-29 4 15 - 2017-01-25 12:32:59 0
542 00170916-10 204 304 794.96 2017-08-16 4 14 - 0000-00-00 00:00:00 0
543 00170916-10 204 304 549.00 2017-09-02 4 1 - 0000-00-00 00:00:00 0
544 00170916-10 204 304 80.00 2017-09-16 1 10 - 2017-03-07 16:08:37 0
545 00170916-10 204 304 2000.00 2017-09-16 2 3 - 2017-03-07 16:08:37 0
546 00170916-10 204 280 93.30 2016-11-02 4 15 - 2017-03-07 16:08:37 0


Maybe this could be helpful for further investigation ?



Best Regards
 
Last edited:
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top