Missing argument 2 for GalleryCoreApi::addMapEntry()
cosmicelf
Joined: 2005-08-21
Posts: 153 |
Posted: Thu, 2006-11-16 02:38 |
I'm sure this has something do do with the API updates... $ret = GalleryCoreApi::addMapEntry(array('externalId' => $eventId, 'entityType' => 'GalleryAlbumItem', 'entityId' => $album->getId())); if ($ret) { return $ret->wrap(__FILE__, __LINE__); } GalleryEmbed::done(); return GalleryStatus::success(); The error I get is this... Warning: Missing argument 2 for GalleryCoreApi::addMapEntry(), called in /website/gallery/createEventsGallery.php on line 85 and defined in /website/phpgallery/modules/core/classes/GalleryCoreApi.class on line 2919 seems this is the last thing broken since my upgrade. I found this page.. http://gallery.menalto.com/apidoc/GalleryCore/Classes/GalleryCoreApi.html#methodaddMapEntry seems I am missing the first argument $mapname.. how do I know what mapname to use? thanks! |
|
Posts: 32509
I guess you're confusing GalleryEmbed::addExternalIdMapEntry() with GalleryCoreApi::addMapEntry().
Posts: 153
oh really? can I do one of these :
$ret = GalleryCoreApi::addMapEntry("ExternalIdMap",array('externalId' => $eventId,
'entityType' => 'GalleryAlbumItem', 'entityId' => $album->getId()));
or should I be using GalleryEmbed::addExternalIdMapEntry()
Posts: 153
Is this:
$ret = GalleryCoreApi::addMapEntry("ExternalIdMap",array('externalId' => $eventId,
'entityType' => 'GalleryAlbumItem', 'entityId' => $album->getId()));
the same as using:
GalleryEmbed::addExternalIdMapEntry()
Posts: 32509
the result is the same yes.
but there's a point in having a versioned API for embedding. you should check the API version when using it.
if you're also using the core API, you need to check the core API version as well.
else you're application is prone to version mismatches and related errors when you update your g2.
Posts: 153
oh good.. thanks you.
just wanted to make sure they would be saving to the same table if some scripts use on and possibly some use the others.
what is the best method of checking these versions?
what am i looking for?