jDownloads Support Forum

Older Versions => jDownloads 3.2 (Support ended) => General => Topic started by: romagromov on 10.02.2015 15:52:51

Title: Duplicate categories in breadcrumbs. - [Fixed in 3.2.25 !!!]
Post by: romagromov on 10.02.2015 15:52:51
Hi!
If menu items to categories created - breadcrumbs module duplicate them like:

mainpage --> category --> subcategory --> category --> subcategory --> download

In old version of jdownloads I fixed this issue by commenting lines:

  $breadcrumbs =& $mainframe->getPathWay();
   if ($catid){
       //$breadcrumbs = createPathway($catid, $breadcrumbs, $option);
       //$breadcrumbs->addItem($cat->cat_title, JRoute::_('index.php?option='.$option.'&Itemid='.$Itemid.'&view=viewcategory&catid='.$catid));    
   }


  // actualise pathway
   //$breadcrumbs = createPathway($catid, $breadcrumbs, $option);
   //$breadcrumbs->addItem($cat[0]->cat_title, '');
   



 $breadcrumbs =& $mainframe->getPathWay();
  //$breadcrumbs = createPathway($file->cat_id, $breadcrumbs, $option);
  //$breadcrumbs->addItem($cat->cat_title, JRoute::_('index.php?option='.$option.'&Itemid='.$Itemid.'&view=viewcategory&catid='.$cat->cat_id, false));
  $breadcrumbs->addItem($file->file_title, '' );



function showSearchForm($option,$cid){
   global $mainframe;
   
  //$breadcrumbs =& $mainframe->getPathWay();
  //$breadcrumbs->addItem(JText::_('COM_JDOWNLOADS_FRONTEND_SEARCH_TITLE'), JRoute::_('index.php?option='.$option));
   
   jlist_HTML::showSearchForm($option);
}    
           
function showSearchResult($option,$cid){
  global $mainframe, $Itemid;
                                                                                                     
  //$breadcrumbs =& $mainframe->getPathWay();
  //$breadcrumbs->addItem(JText::_('COM_JDOWNLOADS_FRONTEND_SEARCH_TITLE'), JRoute::_('index.php?option='.$option.'&Itemid='.$Itemid.'&view=search'));
  //$breadcrumbs->addItem(JText::_('COM_JDOWNLOADS_FRONTEND_SEARCH_RESULT_TITLE'),'');
   
   jlist_HTML::showSearchResult($option);
}



In new version of Jdownloads I can't find this lines and $breadcrumbs variable.

Can you point me in right direction? Where to search this one?
Title: Re: Duplicate categories in breadcrumbs.
Post by: Arno on 10.02.2015 16:21:59
Hi,
please wait on the next beta version. Is in work and coming very soon...  ;)
Quote
If menu items to categories created - breadcrumbs module duplicate them like:

mainpage --> category --> subcategory --> category --> subcategory --> download
I will check this.
Title: Re: Duplicate categories in breadcrumbs.
Post by: romagromov on 11.02.2015 17:18:40
I just want note, that breadcrumbs displays absolutely unpredictable.

So, as I already wrote if SEF disabled breadcrumbs on download pages looks like:

mainpage --> category --> subcategory --> category --> subcategory --> download

Then, If native Joomla SEF enabled always displays main page instead download pages (but url displays correctly - /ofis/rozpiznavannya-tekstu/download/45-rozpiznavannya-tekstu/229-cuneiform)
Categories and subcategories displays ok.

At least if ArtioSEF + Jdownloads plugin enabled - all urls looks fine.
But breadcrumbs displays different paths:

If Download present in any Jdownloads module path looks like

mainpage --> subcategory --> download (without main category)

If Download NOT present in any Jdownloads module path looks like

mainpage --> category --> subcategory --> category --> subcategory --> download

I'm confused...   ???

I like urls which generates ArtioSEF, but I need normal path in breadcrumbs.

And finally, If i disable all menu items for all categories and enable ArtioSef breadcrumbs displays like

mainpage --> subcategory --> download (without main category)

for all downloads (no matter is they are present in modules)

But in subcategories view breadcrumbs don't displays parent categories:

(http://monosnap.com/image/g8S9TOFFlB0qZxnahKj6WBLmKqfYpx.png)
Title: Re: Duplicate categories in breadcrumbs.
Post by: romagromov on 11.02.2015 20:23:06
I'm sure it because Jdownloads generate different non SEF urls from component and modules.

This is link to download from component

/index.php?option=com_jdownloads&view=download&id=71:pc-radio&catid=12&Itemid=152

and this is a link to same download from modules (top and recently updated)

/index.php?option=com_jdownloads&view=download&catid=12&id=71&Itemid=152



This issue was in old Jdownloads and it seems in new Jdownloads too...
Title: Re: Duplicate categories in breadcrumbs.
Post by: romagromov on 12.02.2015 14:24:30
SO, I have only one question:

How to remove alias from non sef urls and make urls from component and modules same:

/index.php?option=com_jdownloads&view=download&id=71:pc-radio&catid=12&Itemid=152

or add alias to urls from modules.
Title: Re: Duplicate categories in breadcrumbs.
Post by: Arno on 12.02.2015 21:25:53
Quote from: romagromov on 12.02.2015 14:24:30
SO, I have only one question:

How to remove alias from non sef urls and make urls from component and modules same:

/index.php?option=com_jdownloads&view=download&id=71:pc-radio&catid=12&Itemid=152

or add alias to urls from modules.

I have worked on this so you should wait on the next version. I hope i can publish it tomorrow.

QuoteThis is link to download from component

/index.php?option=com_jdownloads&view=download&id=71:pc-radio&catid=12&Itemid=152

and this is a link to same download from modules (top and recently updated)

/index.php?option=com_jdownloads&view=download&catid=12&id=71&Itemid=152
Also this should be fixed in coming 3.2.25.
Title: Re: Duplicate categories in breadcrumbs.
Post by: Arno on 13.02.2015 00:21:51
Please install the pre-release below and check it then again.

[gelöscht durch Administrator]
Title: Re: Duplicate categories in breadcrumbs.
Post by: romagromov on 14.02.2015 13:47:12
Thanks Arno!
Now all links the same.
And when I enable ArtoSef breadcrumbs same too.
But but in download page breadcrumbs still duplicates categories

mainpage --> category --> subcategory --> category --> subcategory --> download

And in subcategory pages breadcrumbs sometimes different and looks like
mainpage --> category
or
mainpage --> category --> subcategory --> category

It because links for subcategory have differents Itemid (from breadcrumbs module):

(http://monosnap.com/image/fjHxQxwOQWZVj6B1aBwpVWQ5IoX6UL.png)

Finally, I can't find code to edit to remove menu items from breadcrumbs.
Title: Re: Duplicate categories in breadcrumbs.
Post by: romagromov on 14.02.2015 16:04:17
Ok. I removed code

while ($category && ($menu->query['option'] != 'com_jdownloads' || $menu->query['view'] == 'download' || $id != $category->id) && $category->id > 1)
            {
                $path[] = array('title' => $category->title, 'link' => JdownloadsHelperRoute::getCategoryRoute($category->id, true));
                $category = $category->getParent();
            }


from file  /components/com_jdownloads/views/download/view.html.php

and now breadcrumbs looks fine  :D :D :D

I not sure, is it correct, but it works )))
Title: Re: Duplicate categories in breadcrumbs.
Post by: Arno on 14.02.2015 18:31:29
Quoteand now breadcrumbs looks fine
hm... with ArtioSef or also without ArtioSef.

Please note that you must delete all cached urls in artio before you can check it again.

I can not reproduce some of your problems here, as for me works the breadcrumbs (without any special sef component).
Title: Re: Duplicate categories in breadcrumbs.
Post by: romagromov on 14.02.2015 19:38:11
Arno, there is no matter if SEF enabled.
Breadcrumbs displays as

mainpage --> category --> subcategory --> category --> subcategory --> download

without any SEF and with ArtioSEF.

But if I remove code
while ($category && ($menu->query['option'] != 'com_jdownloads' || $menu->query['view'] == 'download' || $id != $category->id) && $category->id > 1)
           {
               $path[] = array('title' => $category->title, 'link' => JdownloadsHelperRoute::getCategoryRoute($category->id, true));
               $category = $category->getParent();
           }


everything fine!

The most important thing that you've fixed the problem with different urls from modules.  ;)
Title: Re: Duplicate categories in breadcrumbs.
Post by: Arno on 15.02.2015 11:30:07
romagromov,
i have no idea what you did with artio to get this results, but this has not really what to do with jDownloads.

Here an example:
QuoteBut if I remove code
Code:

while ($category && ($menu->query['option'] != 'com_jdownloads' || $menu->query['view'] == 'download' || $id != $category->id) && $category->id > 1)
           {
               $path[] = array('title' => $category->title, 'link' => JdownloadsHelperRoute::getCategoryRoute($category->id, true));
               $category = $category->getParent();
           }

everything fine!

See pic 1 what we get then (without artio).
With my version it is correct viewed (pic 2).

The same with your 'double' part:
Quotemainpage --> category --> subcategory --> category --> subcategory --> download

I can not reproduce this here, so it must be a result from your artio settings.
So you shold test it without any sef component. I can not change the component so that it is compatible with your artio settings. It must be reverse.
So for me is the breadcrumbs bug fixed now in 3.2.25.

[gelöscht durch Administrator]
Title: Re: Duplicate categories in breadcrumbs.
Post by: romagromov on 15.02.2015 13:03:05
I tested it without any sef (native or 3rd-party)

(http://monosnap.com/image/ecg49EqxsYDXpzyWyVUMVHmyQUkNFo.png)

Anyway, I think, that issue is fixed - I got breadcrumbs that I need by editing view.html.php
Thanks.
Title: Re: Duplicate categories in breadcrumbs.
Post by: Arno on 15.02.2015 13:18:53
Hm... no idea what can be here really wrong. Maybe must we wait until other users have probelm like yours.  ::)
Title: Re: Duplicate categories in breadcrumbs.
Post by: romagromov on 15.02.2015 14:07:55
Quote from: Arno on 15.02.2015 13:18:53
Hm... no idea what can be here really wrong. Maybe must we wait until other users have probelm like yours.  ::)


Are you have created menu items for each category?

I created menu items for each jdownloads category.
Title: Re: Duplicate categories in breadcrumbs.
Post by: Arno on 16.02.2015 00:46:37
Hi,
thanks for the hint. Now i think i have found and fixed also also this bug.  ;)

Please download and install the final version 3.2.25 now again.
Title: Re: Duplicate categories in breadcrumbs.
Post by: romagromov on 17.02.2015 13:51:52
Quote from: Arno on 16.02.2015 00:46:37
Hi,
thanks for the hint. Now i think i have found and fixed also also this bug.  ;)

Please download and install the final version 3.2.25 now again.

Arno, can you say which file you edited to fix this issue?
I created templates overrides and afraid that I will need to recreate them.
Thanks.
Title: Re: Duplicate categories in breadcrumbs. - [Fixed in 3.2.25 !!!]
Post by: Arno on 17.02.2015 14:37:11
See pic.


[gelöscht durch Administrator]