Try to remove item but no success :(

kappuccino

Joined: 2010-05-25
Posts: 2
Posted: Tue, 2010-05-25 09:09

hello everybody,

I have built a "viewer" app runing with gallery embed api... I have no problem with getting data, BUT when I try to remove an item (photo), I have "broken picture" in Gallery...

I mean, the real file seems to be removed from filesystem, but relationship between tables in database show that some elements are steel in there (g2_PhotoItem). I think this mess (between removed rows and not remove rows) break my picture...

My Code

Quote:
GalleryCoreApi::deleteEntityById($item-to-remove, 'GalleryItem');

any result

Quote:
GalleryCoreApi::deleteEntityById($item-to-remove, 'GalleryPhotoItem');

big result like "Missing object for 134259" (134259 is my GalleryPhotoItem ID I WANT TO REMOVE)

Any Idea ?

 
kappuccino

Joined: 2010-05-25
Posts: 2
Posted: Wed, 2010-05-26 13:44

Pb solved,
if someone read this page, yout should consider to add this line at the bottom of your page (it will save hours of time)

Quote:
GalleryEmbed::done();