I'm getting this upon trying to test the photos functionality on my OSSN site. I can add/set cover photos, but for some reason whenever I try to delete them, only the file itself is deleted but not the entry, and I end up with the aforementioned error message. My data folder permissions are set to 777, and I did install OSSN to a T as stated in the tutorial. Also, it appears to work properly on regular photos and on those uploaded on the timeline.
Another thing is that there's no feature to delete or edit albums as well, which is, suffice it to say, quite an inconvenience.
i think this is the correct way
if($this->deleteEntity($this->fileid)){
//delete file
unlink($source);
$params['photo'] = getobjectvars($file);
ossntrigger_callback('delete', 'profile:cover:photo', $params);
> return true;
}
Actually It's not working properly
becouse photo was deleted but massage appear
"Cannot delete photo! Please try again later"
you should change the return value
sorry about my English :P
* Delete profile cover photo
*
* @return bool;
*/
public function deleteProfileCoverPhoto() {
if (isset($this->photoid)) {
$this->file_id = $this->photoid;
$this->entity = new OssnEntities;
$file = $this->fetchFile();
$source = ossn_get_userdata("user/{$file->owner_guid}/{$file->value}");
if($this->deleteEntity($this->file_id)){
//delete file
unlink($source);
$params['photo'] = get_object_vars($file);
ossn_trigger_callback('delete', 'profile:cover:photo', $params);
}
}
**return true;** -- change here
}
You're welcome! :D
Oh and what about the album editing/deletion functionality?
Thanks for report, we have fixed it now:
https://github.com/opensource-socialnetwork/opensource-socialnetwork/issues/427
You can download a components/OssnPhotos/classes/OssnPhotos.php file, and replace it to your existing Ossn 2.3 file.
Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.
$199 (Life Time)