Page 1 of 1
Phoca Gallery Finder plugin not updating on save
Posted: 05 Oct 2016, 17:10
by olafvdg
The finder plugin works fine and indexes fine when using the "Index" command in the Finder component.
However, when making changs to individual images, the items are not automatically re-indexed.
It seems like the "onFinderAfterSave" function is never called.
Does this mean we have to manually re-index all items after every change of a single item?
Re: Phoca Gallery Finder plugin not updating on save
Posted: 07 Oct 2016, 19:13
by Jan
Hi, the plugin does include the method.
Code: Select all
public function onFinderAfterSave($context, $row, $isNew)
{
// We only want to handle web links here. We need to handle front end and back end editing.
if ($context == 'com_phocagallery.phocagalleryimg' || $context == 'com_phocagallery.img' )
{
// Check if the access levels are different
if (!$isNew && $this->old_access != $row->access)
{
// Process the change.
$this->itemAccessChange($row);
}
// Reindex the item
$this->reindex($row->id);
}
// Check for access changes in the category
if ($context == 'com_phocagallery.phocagallerycat')
{
// Check if the access levels are different
if (!$isNew && $this->old_cataccess != $row->access)
{
$this->categoryAccessChange($row);
}
}
return true;
}
It should behave the same way like other finder (smart search) plugins
Jan
Re: Phoca Gallery Finder plugin not updating on save
Posted: 12 Oct 2016, 09:15
by olafvdg
Hi Jan,
I know, I found the method as well. However, it seems the method is not called or errors out.
You can reproduce by running a manual index first and then update an item via the component. You will not see any updates appearing in the #__finder_links table upon save.
Too bad, I guess I will have to stick to the 'old' search component.... ;-(
Re: Phoca Gallery Finder plugin not updating on save
Posted: 14 Oct 2016, 18:38
by Jan