?
avatar alexgru
alexgru
19 May 2017

Steps to reproduce the issue

in table #__categories for root category field published change value to 0(null)
And try published any Category

Expected result

Expected - 1 (published)

Actual result

Actual - 0 (unpublished)

System information (as much as possible)

joomla CMS 3.7.0 , 3.7.1

Additional comments

Before Joomla 3.7.x for root category I use published = 0 .
It was much easier and it was not necessary in the request to check all the time that this category of root.
Start at version 3.7.x it is necessary root category published = 1, otherwise you will not be able to publish the any categories.
But if root published = 1 then the queries to the database become more complicated, in query to remove the display of this category root , example
$query->where('a.level > 0');
or
$query->where('a.parent_id > 0');

Sorry for my English.

avatar alexgru alexgru - open - 19 May 2017
avatar joomla-cms-bot joomla-cms-bot - labeled - 19 May 2017
avatar csthomas
csthomas - comment - 19 May 2017

in table #__categories for root category field published change value to 0(null)

Why do you change that?
ROOT should be always published.

Table #__categories works like a tree.
If you unpublish parent then you can not publish children.

avatar franz-wohlkoenig franz-wohlkoenig - change - 20 May 2017
Status New Discussion
avatar alexgru
alexgru - comment - 23 May 2017

Hi csthomas.

As example , I have table #__mycategory and this structure

root -----> General Category -----> Sub Category -----> etc.
Before update to version 3.7.x I can root have published = 0 and for the query it was enough to enter
$query->where('a.published > 0');
Start at version 3.7.x with root published = 1 the query is

$query->where('a.published > 0');
$query->where('a.level > 0');//So as not to show the root

So I do not understand why for root to do public publishing 1 and do write an additional query where, if the root is not shown anywhere else.
I understand from the point of view of logic, publish = 1 more correctly, but from the point of view of the convenience of publishing = 0 it is more preferable....IHMO

avatar Bakual Bakual - close - 23 May 2017
avatar Bakual
Bakual - comment - 23 May 2017

Why don't you have a check for the extension? The root entry has the extension "system". If you properly query the categories for your extension only, you don't get the root category.

I'm closing this issue as it is expected behavior. The query needs to be fixed in the 3rd party code (either by filtering by extension or level or whatever).
And no, one additional WHERE claus doesn't make the query much more complex.

avatar Bakual Bakual - change - 23 May 2017
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2017-05-23 08:27:19
Closed_By Bakual

Add a Comment

Login with GitHub to post a comment