Hi Denis,
Thank you for fixing the issue about the display of tags in an article.
That left me with some more issues about which article are displayed on the Tags listing page. As I said earlier:
- I don't see the aticles that I have specifically tagged
- I do see many articles that I have not specifically tagged
- There are many duplicates in the articles list
I have now solved a part of 1 here:
For an article/sef_url to show in the tag page listing:
- Tagging must be enabled in the Metadata
- The tag name must be in the MetaKeywords in one of these formats: 'tag,' ', tag', ', tag,'
- The Metadata Title must not be empty
- The Metadata must be published
The MetaKeyword part has a bug: it will not find a lone keyword if there are no commas before or after. Here is a fix for this in models/tags.php around line 123
Code: |
$tag4 = $this->_db->Quote($this->_db->getEscaped($tag, true), false);
$where[] = "(m.keywords LIKE {$tag1} OR m.keywords LIKE {$tag2} OR m.keywords LIKE {$tag3} OR m.keywords LIKE {$tag4})";
|
For 2 I found that Tags are enabled on many SEF URLs that I did not set so I guess that there is some automatic process here that I haven't tracked down.
A fix for this is to limit the Tag list to Custom SEF URLs. I have done this by adding
Code: |
$where[] = "u.params LIKE '%custom=1%'";
|
at around line 97 in the models/tags.php file This effectively blocks all the auto-enabled SEF URLs. It would be good to see this as a configuration option.
For issue 3 the duplication can be fixed by adding a GROUP BY statement around line 81 of models/tags.php
Code: |
$this->_query = "SELECT m.id, m.url_sef, m.title, m.description, m.keywords, u.url_real FROM #__acesef_metadata AS m, #__acesef_urls AS u {$where} GROUP BY m.`id` ORDER BY m.title ";
|
Bob