? Success

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
10 Jul 2014

A state check when loading the categories should only be done when the publishing flag is set, otherwise it is not possible to get the unpublished or archived categories trough JCategories.

Testing instructions

  1. Open the categories manager for articles in the back end, Content -> Category Manager.
  2. Create two categories.
  3. Add the following code to the file administrator/components/com_content/views/articles/view.html.php after the line 33 (public function display($tpl = null) {)

    $categories = JCategories::getInstance('Content', array(
        'access' => false,
        'published' => false
    ));
    $cats = $categories->get('root')->getChildren();
    echo 'Found '.count($cats).' categories!';die;
  4. On the back end go to Content -> Article Manager.

Expected result

On the web browser is shown Found 0 categories!. After applying the patch, you will see Found 2 categories!. This is correct, because we want to fetch all categories, ignoring the categories where we don't have access and which are archived or unpublished.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar laoneo laoneo - open - 10 Jul 2014
avatar infograf768
infograf768 - comment - 11 Jul 2014

Please create a tracker on joomlacode and give test instructions

avatar laoneo
laoneo - comment - 1 Aug 2014

How should the testing instructions be as it is development only. In form of a unit test?

avatar Bakual
Bakual - comment - 1 Aug 2014

MAybe add some example code and tell where to insert it and what to echo or so.
Or write a small plugin which does the job. That would probably the easiest way to test something.

avatar brianteeman brianteeman - change - 21 Aug 2014
Status New Pending
avatar nicksavov nicksavov - change - 21 Aug 2014
Labels Removed: ?
avatar brianteeman brianteeman - change - 17 Oct 2014
Category Libraries
avatar RCheesley
RCheesley - comment - 25 Oct 2014

Happy to test if there are instructions on how to do so :)

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

avatar roland-d roland-d - close - 20 Aug 2015
avatar roland-d roland-d - close - 20 Aug 2015
avatar roland-d roland-d - change - 20 Aug 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-08-20 19:32:10
Closed_By roland-d
avatar roland-d
roland-d - comment - 20 Aug 2015

Hello @laoneo

Thank you for your contribution but due to lack of activity I am going to close this issue. Feel free to open it anytime when you want to follow up on it.


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

avatar laoneo
laoneo - comment - 27 Aug 2015

Updated the description of the patch. But can't open the pull request. Maybe someone of you guys can do it.

avatar zero-24
zero-24 - comment - 27 Aug 2015

@laoneo you have deleted the repo. You need to open a new PR with the code and the description ;)

avatar zero-24
zero-24 - comment - 27 Aug 2015

Text is: laoneo wants to merge 1 commit into joomla:staging from unknown repository

The unknown repository means that the patch behind this Pull don't exitsts anymore.

avatar laoneo
laoneo - comment - 27 Aug 2015

Thanks for the info. Cleaned up my old repo and now all PR's are gone. Anyway, opened a new one.

avatar zero-24
zero-24 - comment - 27 Aug 2015

:+1:

Add a Comment

Login with GitHub to post a comment