[solved] Errors on GalleryEmbed::getImageBlock
ozgreg
Joined: 2003-10-18
Posts: 1378 |
Posted: Sat, 2005-04-30 01:18 |
I been having trouble with the GalleryEmbed::getImageBlock. I implemented a randomphoto and a get gallery image function but the random function has suddenly failed with the following error... Input Array does not match ?: SELECT DISTINCT g2_AccessMap.g_accessListId FROM g2_AccessMap WHERE (g2_AccessMap.g_userId = NULL OR g2_AccessMap.g_groupId IN (1)) AND g2_AccessMap.g_permission & 1 = I recreated the test function (see below) to reproduce the error.. http://devtest.ozgreg.com/galleryphoto.php require_once(dirname(__FILE__) . '/gallery2/embed.php'); $ret = GalleryEmbed::init(array('embedUri' => 'gallery2.php', 'relativeG2Path' => 'gallery2' ) ); list ($ret, $g2data) = GalleryEmbed::getImageBlock(array ('blocks' => 'randomImage', 'show' => 'none', 'activeUserId' => '', 'maxSize' => '')); if ($ret->isError()) { $ret->getAsHtml(); } print $g2data; |
|
Posts: 1378
Had a IRC session over this and partly solved the issue by calling a fullinit -> true in the GalleryEmbed::init
However I have noticed although 'activeUserId' => '' = null when you click on the random photo it is still creating a session ID
(g2_GALLERYSID=78ddd776dcb1961d5c30363d895f0919)
My understanding is it should not be creating sessionID's for guests??
Posts: 8601
guests do get sessions. search engines do not.
Posts: 7994
Not entirely true. Search engines share the same session. Ie, we create one session for google (per source server) and all googlebot requests are automatically in that session. This allows us to drop the session id from the url which makes our urls more friendly for search engines.
Posts: 8601
oh right, I forgot the "Later on we won't even save the session anyway" comment in the code is incorrect...
Posts: 7994
What do you mean incorrect? It's correct .. uh, now that I updated it. Yeah. :-D