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

Tagged Unpublished Categories appear in Tag listing #12120

Closed
ColinM2 opened this issue Sep 21, 2016 · 3 comments
Closed

Tagged Unpublished Categories appear in Tag listing #12120

ColinM2 opened this issue Sep 21, 2016 · 3 comments

Comments

@ColinM2
Copy link

ColinM2 commented Sep 21, 2016

This relates to Categories other than Article categories such as Contacts Categories, News Feed Categories that have Tags. Basically these tagged categories appear in tagged lists when they are Unpublished. Generally they have a link which if used gives a 404 error.
This is also part of a problem with Tags in Component related Tags #12038 which in turn is related to Commit #10304

Steps to reproduce the issue

For example create a category in Contacts component and give it a tag. Also create a Contact in the Category. It is perhaps convenient to also to give that the same tag so it appears in the Tag Listing. Add same tag to a regular article. View article and cick on tag. Check that both the Contact Category and Contact Item appear in a tag list as well as article. Now Unpublish the Contact Category. Clear cache and again click on the tag in article.
Note this also applies to News Feed Categories, to Banner Categories (to a lesser extent as they are not linkable) and possibly in other content category types I have not tested.
Note also the general problem with Tags in other user provided Components failing to appear as noted in #12038

Expected result

The Contact Category should not appear, The Contact Item should not appear.

Actual result

The Contact Item does not appear,which is good.
The Contact Category still appears, which is wrong. Further if you click on the link in the list then a 404 error occurs.

System information (as much as possible)

Standard Joomla! 3.6.2

Additional comments

Note also the general problem with Tags in other user provided Components failing to appear as noted in #12038 as a result of Commit #10304
I have no suggested solution

@eshiol
Copy link
Contributor

eshiol commented Oct 28, 2016

There is a bug in the publishing

replace the line 1023 in the file libraries/legacy/model/admin.php

        $context = $this->option . '.' . $this->name;

with

        if ($this->option != 'com_categories')
        {
            $context = $this->option . '.' . $this->name;
        }
        elseif ($extension = JFactory::getApplication()->input->get('extension', ''))
        {
            $context = $extension . '.' . $this->name;
        }
        else
        {
            $context = $this->option . '.' . $this->name;
        }

Republish and unpublish the category before test the tag listing

@zero-24
Copy link
Contributor

zero-24 commented Oct 28, 2016

Can you send that code as pull request against staging?

@brianteeman
Copy link
Contributor

Closed as we have a PR for testing thanks #12613

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

4 participants