Skip to Content Skip to Menu

help with Gallery2 plugin

  • junkers
  • junkers
  • OFFLINE
  • Posts: 7
  • Thanks: 0
  • Karma: 3
18 years 4 months ago #17512 by junkers
Replied by junkers on topic Re:help with Gallery2 plugin
This bug sure is an ironic one. The error occurs because the references made by the error trapping code cannot be found. ie. the error trapping code is in error!

Anyways, the quick and dirty fix is as I said earlier. Comment out the four lines in the two places they occur in the script. Then G2Bridge will work. Also, as I said, if an error really occurs, you'll get a Fatal Error message, which sounds terrible, but until such a time it's better than nothing.

I do plan to do some debugging on this code and see where in the call stack the references to the error routine were mispointed (some include file is obviously out of sync). Until then, that's the best on offer from me. ;)

Please Log in or Create an account to join the conversation.

18 years 3 months ago #17717 by OriginalSteve
Replied by OriginalSteve on topic Re:help with Gallery2 plugin
Ok...now I've got this problem.

What file do I find the code that you're referencing in? I've lookd through quite a few and can't find it.

Please Log in or Create an account to join the conversation.

  • ffaabbss
  • ffaabbss
  • OFFLINE
  • Posts: 94
  • Thanks: 0
  • Karma: 6
18 years 3 months ago #17759 by ffaabbss
Replied by ffaabbss on topic Re:help with Gallery2 plugin
would be great if somebody could rework the plugin as the dev is currently working on a new website and on holiday... and the problems just don't stop.. recently i noticed that no pics are shown at all in the plugin tab when the visitor is not logged in...

Please Log in or Create an account to join the conversation.

18 years 3 months ago #19405 by Radianation
Replied by Radianation on topic Re:help with Gallery2 plugin
I have the same problem as everybody else. The dirty fix worked for about 75% of my users, but some people were still having error messages even after commenting out the code in two different spots like so:

[code:1]// if ($ret->isError()) {
/* error reporting, use cb style but have to read it first */
// return false;
// }[/code:1]

[code:1]Fatal error: Call to a member function on a non-object in I:\galleries\components\com_comprofiler\plugin\user\plug_g2bridge\g2bridge.php on line 184[/code:1]

...which is within this significant block of code:

[code:1]$searchResults = array();
while ($result = $results->nextResult()) {
$itemId = (int)$result[0];
list($ret, $item) = GalleryCoreApi::loadEntitiesById($itemId);
$fields = array();
$title = $item->getTitle() ? $item->getTitle() : $item->getPathComponent();
$fields = preg_replace('/\r\n/', ' ', $title);
list (, $fields) = GalleryCoreApi::fetchItemViewCount($itemId);
list(,$thumbs) = GalleryCoreApi::fetchThumbnailsByItemIds(array($itemId));
$fields = $urlGenerator->generateUrl(array('view' => 'core.ShowItem', 'itemId' => $thumbs[$itemId]->getderivativeSourceId()));
$fields = $urlGenerator->generateUrl(array('view' => 'core.DownloadItem', 'itemId' => $thumbs[$itemId]->getId()));

$searchResults[] = array('itemId' => $itemId,
'fields' => $fields);
}[/code:1]

Also, I get an error message when trying to sort by "Latest Album".

I would love an update soon! =)

Post edited by: Radianation, at: 2006/08/22 20:12

Please Log in or Create an account to join the conversation.

18 years 3 months ago #19427 by Radianation
Replied by Radianation on topic Re:help with Gallery2 plugin
Here we go, I was able to generate the code:

www.mywebsite.com/index.php?option=com_comprofiler&task=userProfile&user=326&Itemid=6&tab=getg2bridgetab&g2bridgeimg_limitstart=8


[code:1]Fatal error: Call to a member function on a non-object in I:\galleries\components\com_comprofiler\plugin\user\plug_g2bridge\g2bridge.php on line 184[/code:1]

This was after clicking through 3 pages of photos for a specific user.

Post edited by: Radianation, at: 2006/08/25 05:54

Please Log in or Create an account to join the conversation.

18 years 2 months ago #19712 by Radianation
Replied by Radianation on topic Re:help with Gallery2 plugin
The solution is to add the @ in lines 184 and 185

[code:1] $fields = @$urlGenerator->generateUrl(array('view' => 'core.ShowItem', 'itemId' => $thumbs[$itemId]->getderivativeSourceId()));
$fields = @$urlGenerator->generateUrl(array('view' => 'core.DownloadItem', 'itemId' => $thumbs[$itemId]->getId()));[/code:1]

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum