SUMMARY
On a Category view, the Sub-Categories block emits five literal {cat_link}
placeholders as anchor tags before each subcategory, instead of substituting
the category URL. The placeholder appears in both the link text and the href.
This reproduces on three different layouts, including two stock ones, so it
does not appear to be a layout customization problem.
ENVIRONMENT
jDownloads: [4.1.7]
Joomla: [6.1.3]
PHP: [8.3.33]
Installation: Fresh install of jDownloads. I think Joomla was a fresh install from 6.x (but unsure).
Template: YOOtheme Pro
SEF URLs: On
STEPS TO REPRODUCE
1. Fresh jDownloads installation.
2. Create a parent category, and several subcategories beneath it.
3. Assign a Category-type layout that includes the Sub-Categories block.
4. View the parent category on the front end.
5. View source, or inspect the Sub-Categories area.
EXPECTED
Each subcategory renders with its own resolved URL, for example:
/download-library/category/5-analyzer-apis
ACTUAL
Five anchors per subcategory are emitted with the placeholder unresolved:
/{cat_link}The site root is prepended, but {cat_link} itself is passed through verbatim.
So the substitution is not running at all, rather than resolving to an empty
value.
THE PRECISE SHAPE OF IT
This seems the most diagnostic part. Within EACH subcategory block:
5 anchors contain the unresolved {cat_link} placeholder
2 anchors - the folder icon and the subcategory title - resolve
correctly to the real category URL
So the same page substitutes the category link correctly in two places and
fails to substitute it in five others, inside the same repeated block. That
suggests the placeholder is valid in one context of the layout and not in
another, rather than being globally broken or misspelled.
The count scales exactly with the number of subcategories:
7 subcategories -> 35 unresolved anchors
8 subcategories -> 40 unresolved anchors
WHAT IT IS NOT
Ruled out by testing, so these should not need to be asked:
- Not a custom layout. First seen on a customized Category layout, then
reproduced on the stock default layout, then again on a second, older
stock layout. Three layouts, identical output.
- Not a single category. Every subcategory in the list is affected, and it
recurred after the category set was changed and re-sorted.
- Not an upgrade artifact. This is a fresh installation, not carried forward
from an earlier jDownloads series.
- Not template-related as far as can be determined. The surrounding markup
renders correctly, and the two working links sit in the same block.
IMPACT
Cosmetically, visitors see repeated /{cat_link} text above every subcategory.
More seriously, each one is a live anchor pointing at a URL that does not
exist, so:
- search engines crawl and index broken links
- screen readers announce five meaningless links before every category
- the page fails link validation
A CSS rule hides them from sighted visitors:
a[href$="{cat_link}"] { display: none; }
But they remain in the served HTML, so that is a workaround rather than a fix.
POSSIBLE CAUSE
Offered tentatively, having not read the code: {cat_link} may be a placeholder
that is only resolved within one section of a layout type, while the
Sub-Categories block is rendered by a different handler that does not process
it. The two anchors that do work in the same block would then be built from a
different variable rather than from this placeholder.
If that is right, the stock Category layout is shipping {cat_link} in a
section where it cannot resolve.
Reported by In Color - https://incolor.dev
I should mention that this was using the "Standard Bootstrap 5 Subcategories Layout - Multiple Column List v4.1" layout.