You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm using podio-php in Laravel project. And I have problem saving podio item from one my custom Registrations app. Items from other app can be saved without problem - but when I try to save Registration Podio Item previously fetched by get or get_basic function - it fails with error in library code.
This is the simplest code causing the issue:
$registration = PodioItem::get(1149458930);
//commented code - working with registration data...$registration->save();
And error I get:
Undefined index: value - in /code/vendor/podio/podio-php/models/PodioItemField.php:1125
Stack trace:
/code/vendor/podio/podio-php/models/PodioItemField.php:1125
/code/vendor/podio/podio-php/models/PodioItemField.php:1142
/code/vendor/podio/podio-php/models/PodioItemField.php:46
/code/vendor/podio/podio-php/lib/PodioObject.php:322
/code/vendor/podio/podio-php/models/PodioItem.php:85
/code/vendor/podio/podio-php/models/PodioItem.php:63
/code/app/Jobs/RegistrationConfirmJob.php:44
Of course, given ID is valid item_id from registration app. Before calling $registration->save(); I can successfully work with registration fields and relationships but the save function fails even if I comment out all the code between - so basically item is loaded and I try to save it without modification.
I found out that in PodioObject.php around line 322 there is suspicious block of code:
// TODO: This really should be moved to PodioCollection (should implement as_json)// and PodioItemFieldCollection for the special caseelseif (get_class($this->__attributes[$name]) === 'PodioItemFieldCollection') {
$key = $item->external_id ? $item->external_id : (string)$item->field_id;
$list[$key] = $item->as_json(false);
}
...but I have no idea what can I do since it looks like problem in library code and I don't want to modify it.
Can anyone help me with this? Thanks in advance.
The text was updated successfully, but these errors were encountered:
thanks for reporting this - this really looks like a bug of this library!
To find the cause, it would be helpful, if you could share the (anonymized) raw json response from the item 1149458930 (or any other item that this can be reproduced with). You can access this via Podio::$last_response->body or by Podio::set_debug(true).
Thank you for your reaction
Here I attach the (anonymized) result of Podio::$last_response->body after fetching registration item. hemis-podio-response.txt
Hope you can find the cause as soon as possible - since there are deadlines for this app to work correctly.
Hi @GREPY,
I could only reproduce this with version 4.3.0 but not with the latest version 4.4.0 - would you mind to check if it works for you with the latest version? If this error persists, please provide details on OS, PHP version etc.
Hi, I'm using podio-php in Laravel project. And I have problem saving podio item from one my custom Registrations app. Items from other app can be saved without problem - but when I try to save Registration Podio Item previously fetched by
get
orget_basic
function - it fails with error in library code.This is the simplest code causing the issue:
And error I get:
Of course, given ID is valid item_id from registration app. Before calling
$registration->save();
I can successfully work with registration fields and relationships but the save function fails even if I comment out all the code between - so basically item is loaded and I try to save it without modification.I found out that in PodioObject.php around line 322 there is suspicious block of code:
...but I have no idea what can I do since it looks like problem in library code and I don't want to modify it.
Can anyone help me with this? Thanks in advance.
The text was updated successfully, but these errors were encountered: