Phoca Gallery Finder plugin not updating on save

Phoca Gallery - image gallery extension
olafvdg
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 05 Oct 2016, 17:06

Phoca Gallery Finder plugin not updating on save

Post 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?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery Finder plugin not updating on save

Post 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 :idea:

Jan
If you find Phoca extensions useful, please support the project
olafvdg
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 05 Oct 2016, 17:06

Re: Phoca Gallery Finder plugin not updating on save

Post 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.... ;-(
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery Finder plugin not updating on save

Post by Jan »

:-(
If you find Phoca extensions useful, please support the project
Post Reply