phoca search problem - right page wrong menu item

Phoca plugins - support for all Phoca plugins except Phoca Gallery plugins
heyitsben
Phoca Member
Phoca Member
Posts: 15
Joined: 15 Feb 2013, 18:01

phoca search problem - right page wrong menu item

Post by heyitsben »

HI, I've tried searching the forums but have not found anything similar. I have installed the phoca search plugin, it works great but displays the page with the wrong menu title. I have Phoca version 2.8.1

For example, if this is the actual page I want to find during a search:
Image


This is what is found during a search ("Other" is shown rather than "2013"):
Image




If I unpublish the "other" menu item, another menu item is assigned to the page but it is not correct. Is there a way to fix this?
User avatar
europower
Phoca Member
Phoca Member
Posts: 10
Joined: 20 May 2009, 15:53
Location: Belgium
Contact:

Re: phoca search problem - right page wrong menu item

Post by europower »

Same here. The ItemId will always be te lowest Phocagallery related menu item id.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: phoca search problem - right page wrong menu item

Post by Jan »

If you find Phoca extensions useful, please support the project
User avatar
europower
Phoca Member
Phoca Member
Posts: 10
Joined: 20 May 2009, 15:53
Location: Belgium
Contact:

Re: phoca search problem - right page wrong menu item

Post by europower »

Thanks Jan for the quick responds.
We read the article you referred to but that didn't solve our problem. So we did a little coding of our own and found that there is a solution. A small function within the search plugin (you can query the correct MenuID) solved the search problem.
heyitsben
Phoca Member
Phoca Member
Posts: 15
Joined: 15 Feb 2013, 18:01

Re: phoca search problem - right page wrong menu item

Post by heyitsben »

Hi Europower, is there any chance you can share your solution? I am not much of a coder :/
User avatar
europower
Phoca Member
Phoca Member
Posts: 10
Joined: 20 May 2009, 15:53
Location: Belgium
Contact:

Re: phoca search problem - right page wrong menu item

Post by europower »

Hello heyitsben,
We would like to give back to the community, but it's not going to be simple.
We changed several files and some have hardcoded lines inside (we are not happy about that) that will only work in our installation.
For example, we changed following files:
Using Overrides:
templates\yourtemplate\html\com_phocagallery\categories\default_catimg.php (breadcrumbs fix, but hardcoded)
templates\yourtemplate\html\com_search\search\default_results.php (for showing thumbsnails inside search result)
Phoca code adjustments
components\com_phocagallery\views\category\view_html.php (breadcrumbs fix)
plugins\search\phocagallery\phocagallery.php (big changes for breadcumbs and thumbnail view)
Last file has most of the code but also has 2 hardcodes lines (looking to get this fixed)

The thumbnail view within the search is pretty nice do
Image

Let me get back to you regarding the fix (probably after our new website will be released - september this year) maybe we will have a fix for the hardcoded lines.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: phoca search problem - right page wrong menu item

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
heyitsben
Phoca Member
Phoca Member
Posts: 15
Joined: 15 Feb 2013, 18:01

Re: phoca search problem - right page wrong menu item

Post by heyitsben »

Ok it sounds too complicated for me, I will just leave it for now. If you end up with a fix for the hardcoded lines I would be very grateful for the solution. Thanks and good luck with the new website.
Post Reply