Open jimtrue opened 6 years ago
@jimtrue Line 1977 in the 2.x
branch is now empty. Please use the full URL to that the correct line number in that commit (press Y
or select Copy Permalink from the option to the left of the line number), so that the reference persists.
Yeah unfortunately I didn't create this bug initially and this is not my area of expertise (referencing a bit of code that has been moved around specifically, can't quite tell if this is intended to be off of 1986 now or not. https://github.com/pods-framework/pods/blob/2.x/classes/fields/pick.php#L1986
@GaryJones See notes in initial bug report linked above. https://github.com/pods-framework/pods-gravity-forms/issues/97#issuecomment-395730023
@mgratch is the original reporter maybe he has some new insights!
Here is the original code I was referring to when I came across the bug.
Here is the current version
I will try to make time to supply test data. If I remember correctly the project requirements changed and we didn't have to deal with the bug allowing for safe updates.
Describe the bug For full details, read the commentary at Pods GF Add-on at: https://github.com/pods-framework/pods-gravity-forms/issues/97#issuecomment-395730023
it seems self::$related_objects is not setup yet when the first field replacement is fired.
https://github.com/pods-framework/pods/blob/2.x/classes/fields/pick.php#L1977
adding $this->setup_related_objects( true ) to the conditional statement https://github.com/pods-framework/pods/blob/2.x/classes/fields/pick.php#L1977 fixes it, I don't have the time to work out why.... please let me know if you can shed some light on this. Otherwise I will circle back if I have time later.