Breadcrumbs path duplicate

Phoca Download - download manager
Luke
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 13 Oct 2017, 12:34

Breadcrumbs path duplicate

Post by Luke »

Hi,

first of all congratulations for the great Phoca Download component ...

I would have a problem with Phoca Download + Joomla 3.8.1 ...

my menu structure is as follows:

Home> Downloads> Applications > Binary Money

which correctly mirrors the URL of the site:

http: // localhost: 8089 / downloads / applications / binary-money

but unfortunately the Joomla breadcrumbs path with Phoca Download displays the duplicate path as follows:

Home > Downloads > Applications > Binary Money > Applications > Binary Money

I would have liked to post a more detailed picture but from what I see in your forum you can not attach pictures! ...

can you help me with this problem?

is there a Phoca Download option to set up to solve?

thank you
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Breadcrumbs path duplicate

Post by Jan »

Hi, no there are no options to manage breadcrumbs in Joomla! by Phoca Download.

How many menu links to Phoca Download did you create? Which view (category, categories, file) is the one which produces double links in breadcrumb? Which version of Phoca Download do you use?


See:
viewtopic.php?t=9922&start=20#p103202
there are such problems but only on some servers, commenting the code can help but still there was no solution which can be used for all servers (most of all servers do not get such problem :-( )

Jan
If you find Phoca extensions useful, please support the project
Luke
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 13 Oct 2017, 12:34

Re: Breadcrumbs path duplicate

Post by Luke »

Hi, thanks for the timely response ...

my menu structure is the following ...

- Downloads (Alias: downloads) Phoca Download » List of Files (Category View)
– - Applicazioni (Alias: applicazioni) Phoca Download » List of Files (Category View)
– - - Binary Money (Alias: binary-money) Phoca Download » List of Files (Category View)
– - - - Binary Money Pack (Alias: binary-money-pack) Phoca Download » File View

Downloads > Applications > Binary Money > Binary Money Pack

thank you
Luke
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 13 Oct 2017, 12:34

Re: Breadcrumbs path duplicate

Post by Luke »

Hello,
after further insights it seems that the problem only occurs when creating subcategories of a root category.

In fact, Phoca Downloads assigns the title "Title" to the subcategory in the "Category - Subcategory" format where "Category" is the root category. Probably the name in that format with the dash "-" instead of the classic tree-tree structure used by the Joomla categories ("-" "-" "---") could confuse the Joomla breadcrumbs module!

I do not know if I was able to explain it well.

I've also tried other external breadcrumbs modules than Joomla and everyone behaves the same way.

Is there a way to solve the problem? ... with the next update?

thank you
Luke
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 13 Oct 2017, 12:34

Re: Breadcrumbs path duplicate

Post by Luke »

ah I forgot to write that the version of Phoca Downloads I'm using is the latest 3.1.4 ... ;)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Breadcrumbs path duplicate

Post by Jan »

Hi, in such case I think the following code needs to be customized:

See:
components\com_phocadownload\views\category\view.html.php

At the bottom there is the following code:

Code: Select all

// Start comment if problem with duplicated pathway
		// /*
		if (isset($this->category[0]->parentid)) {
			if ($this->category[0]->parentid == 0) {
				// $pathway->addItem( JText::_('COM_PHOCADOWNLOAD_CATEGORIES'), JRoute::_(PhocaDownloadRoute::getCategoriesRoute()));
			
			} else if ($this->category[0]->parentid > 0) {
				$curpath = $pathway->getPathwayNames();
				
				if(isset($this->category[0]->parenttitle) && isset($curpath[count($curpath)-1]) && $this->category[0]->parenttitle != $curpath[count($curpath)-1]){
					
					
				 	$pathway->addItem($this->category[0]->parenttitle, JRoute::_(PhocaDownloadRoute::getCategoryRoute($this->category[0]->parentid, $this->category[0]->parentalias)));
				}
			}
		}
		// */
		// End comment when problem with duplicated pathway
Just follow the comment information and comment this part of code.

Jan
If you find Phoca extensions useful, please support the project
Luke
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 13 Oct 2017, 12:34

Re: Breadcrumbs path duplicate

Post by Luke »

Thanks Jan, it worked! ... now i would like to override the modified file (view.html.php) but i tried to put it in the directory:

\templates\g5_hydrogen\html\com_phocadownload\category

but it did not work ... Is the path for override correct?

thank you so much for your availability and professional support!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Breadcrumbs path duplicate

Post by Jan »

Hi, you can only override output files - the files behind the tmpl folder :-( not the view.html.php :-(

Jan
If you find Phoca extensions useful, please support the project
Luke
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 13 Oct 2017, 12:34

Re: Breadcrumbs path duplicate

Post by Luke »

Ok, thanks Jan, I'll make the change without override, hoping that perhaps with the upcoming updates you will add a button in options that will allow you to ignore that part of code for those who have the duplicate path problem on some servers. I've done several tests on both Windows servers and Linux servers, and the problem is equally reoccurring.

Thank you for everything and soon.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Breadcrumbs path duplicate

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply