diff --git a/include/api.php b/include/api.php index 4f7040ab4..a35da5c52 100644 --- a/include/api.php +++ b/include/api.php @@ -519,7 +519,7 @@ function prepare_photo_data($type, $scale, $photo_id, $uid) // retrieve item element for getting activities (like, dislike etc.) related to photo $condition = ['uid' => $uid, 'resource-id' => $photo_id]; - $item = Post::selectFirst(['id', 'uid', 'uri', 'parent', 'allow_cid', 'deny_cid', 'allow_gid', 'deny_gid'], $condition); + $item = Post::selectFirst(['id', 'uid', 'uri', 'uri-id', 'parent', 'allow_cid', 'deny_cid', 'allow_gid', 'deny_gid'], $condition); if (!DBA::isResult($item)) { throw new NotFoundException('Photo-related item not found.'); }