in table #__categories for root category field published change value to 0(null)
And try published any Category
Expected - 1 (published)
Actual - 0 (unpublished)
joomla CMS 3.7.0 , 3.7.1
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.
Status | New | ⇒ | Discussion |
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
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.
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-05-23 08:27:19 |
Closed_By | ⇒ | Bakual |
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.