Field "user": option "update on edit"=No doesn't work (on list P+CH on child part)

Hi,

I have an error concerned with field/plugin "user" - when use an option: "Update on edit" = "No" this doesn't work.
So, I have in my record1 fields/plugins "user":
Zatwierdzaj?cy ccc
Odpowiedzialny ddd
that are empty in databasetable - so when i use list---view_record this should show: "empty cells" but show current logged in user that is "CC Blue Mouse".

I checked other cases for this problem:
Standard list (Not parent + child) --- is OK
List Parent + Child --- field/plugin "user" in "Parent" --- is OK
List Parent + Child --- field/plugin "user" in "Child" --- is wrong --- ERROR

Please help to solve this bug,
 

Attachments

  • Zaznaczenie_538.png
    Zaznaczenie_538.png
    45.4 KB · Views: 349
  • Zaznaczenie_539.png
    Zaznaczenie_539.png
    45.5 KB · Views: 368
  • Zaznaczenie_540.png
    Zaznaczenie_540.png
    42.4 KB · Views: 340
This doesn't look like a trivial issue. It's fixed in 3.1, but I'll need to do some digging in 3.0.

Remind me in a day or so, as I have to get some stuff done on Pro support, and I just spent an hour working on your other issues, and I can only devote a certain amount of time to any one person's issues in a given day.

BTW, when you post several issues at once, you might want to let me know what the priorities are. I just spent an hour making the 'all' option display in list pagination ... which I'm guessing isn't as important as this one. But I work strictly chronologically, so I hadn't seen this when I started on that pagination one.

-- hugh
 
OK, I've got a fix, but I don't want to commit it to github just yet, as it may cause issues with other usage cases. Can you test this for me ...

In ./plugins/fabrik_element/user/user.php, around line 87, you find this:

Code:
        /**
        * @TODO when editing a form with joined repeat group the rowid will be set but
        * the record is in fact new
        */
        if ($params->get('update_on_edit') || !$rowid || ($this->_inRepeatGroup && $this->_inJoin && $this->_repeatGroupTotal == $repeatCounter))

... change it to this:

Code:
        /**
        * @TODO when editing a form with joined repeat group the rowid will be set but
        * the record is in fact new
        */
        //if ($params->get('update_on_edit') || !$rowid || ($this->_inRepeatGroup && $this->_inJoin && $this->_repeatGroupTotal == $repeatCounter))
        if ($params->get('update_on_edit') || !$rowid)

It's that _inRepeatGroup test which is causing your problem, and I think we don't need it any more, after another change a while back, where we now get the $rowid a different way, so we don't have to worry about it being set when it shouldn't be.

Let me know if a) this fixes your issue, and b) if you notice any new issues / problems with display of the user element.

-- hugh
 
a) this fixes my issue - see screenshoot,
b) at this moment i don't notice any new issues/problems with display user element,
 

Attachments

  • Zaznaczenie_548.png
    Zaznaczenie_548.png
    40.3 KB · Views: 332
I have actualize from GitHub today - version GitHub on 2014-06-30 and i added this change around line 87 as you write in post #5, all works OK.
I think you could add this permanently to GitHub,
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top