Skip to content

PostgreSQL - categories are not ordered#6135

Merged
wilsonge merged 1 commit intojoomla:stagingfrom
alikon:patch-4
Feb 24, 2015
Merged

PostgreSQL - categories are not ordered#6135
wilsonge merged 1 commit intojoomla:stagingfrom
alikon:patch-4

Conversation

@alikon
Copy link
Copy Markdown
Contributor

@alikon alikon commented Feb 21, 2015

Steps to reproduce the issue

In the administration side add a new article item
look on the left to the categories list

Expected result

the categories are ordered
p340a administration article manager add new article

Actual result

the categories are not ordered
p340a administration category manager add a new articles category

System information

PostgreSQL 9.3.5
Joomla 3.4.0.rc

Additional comments

the old query

SELECT DISTINCT a.id AS value, a.title AS text, a.level, a.published

  FROM (
SELECT DISTINCT id,title,level,published,parent_id,extension,lft,rgt

  FROM d7jwf_categories

  WHERE (extension = 'com_content') 
  AND published IN (0,1)

  ORDER BY lft ASC) AS a

  LEFT JOIN `d7jwf_categories` AS b 
  ON a.lft > b.lft 
  AND a.rgt < b.rgt

the new one

SELECT DISTINCT a.id AS value, a.title AS text, a.level, a.published, a.lft

  FROM (
SELECT id,title,level,published,parent_id,extension,lft,rgt

  FROM d7jwf_categories

  WHERE (extension = 'com_content') 
  AND published IN (0,1)) AS a

  LEFT JOIN `d7jwf_categories` AS b 
  ON a.lft > b.lft 
  AND a.rgt < b.rgt

  ORDER BY a.lft ASC

#### Steps to reproduce the issue
In the administration side add a new article item 
look on the left to the categories list 
#### Expected result
the categories are orderd

#### Actual result 
the categories are not orderd
#### System information
PostgreSQL 9.3.5
Joomla 3.4.0.rc
#### Additional comments
@waader
Copy link
Copy Markdown
Contributor

waader commented Feb 21, 2015

@alikon works with postgres, mysql and it solves #6073 too! 👍

@wilsonge wilsonge added this to the Joomla! 3.4.0 milestone Feb 21, 2015
wilsonge added a commit that referenced this pull request Feb 24, 2015
PostgreSQL - categories are not ordered
@wilsonge wilsonge merged commit 777cf7a into joomla:staging Feb 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants