Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Joomla! 3.3.6 the subcategories in menu items do not display on the frontend. #4937

Closed
nemmar opened this issue Oct 26, 2014 · 15 comments
Closed

Comments

@nemmar
Copy link

nemmar commented Oct 26, 2014

Steps to reproduce the issue

Hi,
I have attached 12 screenshots of this Joomla bug issue.

In Joomla! 3.3.6 the subcategories in menu items do not display on the frontend. They displayed correctly prior to the upgrade from J2.5x to J3.3x and I did not change any menu/category/article display settings.

I have all the menu item settings set to "Global". The menu items use the "Global" Article Manager Option settings.
I didn't change any settings before or after upgrading from J2.5x to J3.3x so it should have stayed the same with subcategories displaying like they used to.

The subcategories are not listed on the "List All Categories" menu item pages. For example, if you go to this test site page:
http://2test-directory.nemmar.net/animals-wildlife

Only the top level categories display and no subcategories display. All the top level and sub-level categories should be displaying (like they did prior to the upgrade) on the "List All Categories" menu item pages. You can see examples of sub-categories that should be but are not displaying on the main page at:
http://2test-directory.nemmar.net/animals-wildlife/environmental-and-wildlife-conservation
http://2test-directory.nemmar.net/animals-wildlife/land-species

I cleared the cache and also tested this in Protostar template and my Joostrap template and the same problem occurs in both so it probably is a Joomla 3.3x bug.

Expected result

Actual result

System information (as much as possible)

Additional comments

screen shot 2014-10-26 at 07 45 00
screen shot 2014-10-26 at 07 45 00screen shot 2014-10-26 at 07 45 00screen shot 2014-10-26 at 07 45 00screen shot 2014-10-26 at 07 45 00screen shot 2014-10-26 at 07 45 00screen shot 2014-10-26 at 07 45 01screen shot 2014-10-26 at 07 45 01screen shot 2014-10-26 at 07 45 01screen shot 2014-10-26 at 07 45 01screen shot 2014-10-26 at 07 45 01screen shot 2014-10-26 at 07 45 01

@cardin27
Copy link

True. There seems to be a problem. It happens if we select "Featured Articles" as the menu. Awaiting fix for this. Thanks

@infograf768
Copy link
Member

IMHO, the issue is that, when using List Categories, "All" is not taken into account as the Option for "All" is "-1"
Also, no choice for "None".
The problem would also exists for other components than com_content.
See the code in default_items.php:
<?php if (count($item->getChildren()) > 0 && $this->maxLevelcat > 1) : ?>

@cardin27
Copy link

So, whats the solution? Thanks

@infograf768
Copy link
Member

We have to make a PR correcting this behavior... In the xml as well as the display. If nobody does it, I will look at it in a few days.

@smz
Copy link
Contributor

smz commented Dec 18, 2014

I'm now looking into this: will report shortly (24h max) if I feel like pushing something...

@smz
Copy link
Contributor

smz commented Dec 18, 2014

I would like to report on this issue here, step by step as I proceed, so that someone can "stop" me as soon as I'm taking a "wrong way". If this is inappropriate and considered a nuisance... well... stop me! 😄

First report:

  • Issue confirmed
  • The "None" option doesn't seems to be needed as what is indicated in the options as a "Subcategory Level" is instead "Categories level", i.e. 1=only topmost categories and hence 0 will mean... nothing displayed! This is also consistent with what we do in the back-end for the "Max Levels" options in the various "Search Tools". I propose to change the string to "Max Levels" here too
  • As a simple quick-and-dirty solution (if there is nothing better and obvious to do) I'm fancying the idea to equate -1 to something really big. Would 9999 suffice? Who in the world would need more than 9999 categories levels? 😕 OK, let's make it 2147483647!
  • There is an issue in the "accordion" expanding icon: it is always a + sign, while it should become a - when the corresponding level is opened. Will look into this
  • As far as regards articles count, it is now interpreted as the count of articles belonging directly to a category (excluding articles in its sub-categories). I think this is OK.

smz added a commit to smz/joomla-cms that referenced this issue Dec 19, 2014
For issue description please see joomla#4937

This first commit is just a kludge (or is it a nice hack?) equating the
value of option for "All" categories (-1) to the really big int,
2147483647 (the biggest representable in 32bit PHP compiles)
@smz
Copy link
Contributor

smz commented Dec 19, 2014

We have a PR with a first tentative commit (a.k.a "The kludge")

@infograf768
Copy link
Member

@smz: you are right: "None" makes no sense.

Test instructions:
Set Park Site as top category.
screen shot 2014-12-19 at 09 05 10

"Subcategory Levels" in the "Categories" tab deals with the subcategories of the TOP category
1 => one level subcategories will display Park Blog and Photo Gallery
2 => 2 levels down will also display Animals and Scenery as sub of Photo gallery

@smz proposed solution smz@d752324 works fine here.
When set to All, in this example, 2nd level will now display.

@smz
Copy link
Contributor

smz commented Dec 19, 2014

@infograf768 hmmm... the fact that you pointed to the initial commit and not to the PR makes me think that you don't like me having addressed the icon issue in the same PR... Is this the case? Do you want me to get rid of that and eventually propose a separate PR? No problem for me...

Yes, I agree with the interpretation of "Subcategory Levels": do we want to change strings here?

@infograf768
Copy link
Member

ops, just saw the PR, did not see the # in #4937 (comment)
will look now

@smz
Copy link
Contributor

smz commented Dec 19, 2014

Ouch! My bad, I forgot to mention it... PR is #5469!

@joomla-cms-bot
Copy link

Set to "closed" on behalf of @Harmageddon by The JTracker Application at issues.joomla.org/joomla-cms/4937

@Harmageddon
Copy link
Contributor

Closing this, as #5469 is merged.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4937.

@fbc
Copy link

fbc commented Aug 17, 2018

This seems to be broken again in the recent Joomla Versions

@ghost
Copy link

ghost commented Aug 17, 2018

@fbc can you please open a new Issue as Comments on closed Issues didn't get much Notice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants