? Success

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
16 Dec 2016

Pull Request for Issue #13222 .
Currently, the assigned category ids are stored as a coma separated string into the #__fields table.
As Hannes pointed out in the referenced issue that is not optimal.

Summary of Changes

This PR removes that data field from the #__fields table and moves it to a cross-reference table #__fields_categories.

Testing Instructions

  • Create and edit fields and assign categories to them. Make sure they save correctly. Also try to remove them again so they show "All" again.
  • Test that the fields show up as expected in the article/user/contact edit forms and frontend views.

Documentation Changes Required

None

avatar Bakual Bakual - open - 16 Dec 2016
avatar Bakual Bakual - change - 16 Dec 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 16 Dec 2016
Category SQL Administration com_admin Postgresql com_fields Installation
avatar Bakual
Bakual - comment - 16 Dec 2016

This should also remove the need to port "FIND_IN_SET" to non-MySQL databases like done in #12642

avatar Bakual Bakual - change - 18 Dec 2016
Labels Added: ?
avatar zero-24
zero-24 - comment - 18 Dec 2016

@Bakual there are conflicts ;)

avatar Bakual
Bakual - comment - 18 Dec 2016

@zero-24 fixed :)

avatar laoneo
laoneo - comment - 19 Dec 2016

I have tested this item successfully on b9cad02


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

avatar laoneo laoneo - test_item - 19 Dec 2016 - Tested successfully
avatar Bakual
Bakual - comment - 19 Dec 2016

@alikon Can you test this on PostgreSQL? I remember something about PostgreSQL needing additional fields specified in the group clause but not sure anymore.

avatar ralain
ralain - comment - 19 Dec 2016

Syntax error on PostgreSQL when attempting to access the fields view:

screen shot 2016-12-19 at 12 28 39

Tried changing GROUP_CONCAT(fc.category_id SEPARATOR ',') to STRING_AGG(fc.category_id::text, ',') and executing the query in pgAdmin:

screen shot 2016-12-19 at 13 23 23

avatar Bakual
Bakual - comment - 19 Dec 2016

So GROUP_CONCAT doesn't work in PostgreSQL? That's interesting since we already use it in the content search plugin. I guess that one doesn't work as well then?

I have to see if we really need that assigned_cat_ids or if we can do that in a different way. Maybe an own query is better anyway.

avatar ralain
ralain - comment - 19 Dec 2016

It would appear not. Just tried search and that fails, too.

avatar Bakual
Bakual - comment - 19 Dec 2016

Can you open a new issue for the search? I will try to solve it here in a different way then.

avatar ralain
ralain - comment - 19 Dec 2016

Yep, will do.

avatar anibalsanchez
anibalsanchez - comment - 19 Dec 2016

I have tested this item successfully on b9cad02

Test OK


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

avatar anibalsanchez anibalsanchez - test_item - 19 Dec 2016 - Tested successfully
avatar rdeutz rdeutz - change - 19 Dec 2016
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-12-19 16:33:05
Closed_By rdeutz
avatar rdeutz rdeutz - close - 19 Dec 2016
avatar rdeutz rdeutz - merge - 19 Dec 2016
avatar rdeutz rdeutz - reference | 5983026 - 19 Dec 16
avatar rdeutz rdeutz - merge - 19 Dec 2016
avatar rdeutz rdeutz - close - 19 Dec 2016
avatar zero-24 zero-24 - change - 19 Dec 2016
Milestone Added:
avatar alikon
alikon - comment - 19 Dec 2016

we need to do a couple of fix for postgres

  • GROUP_CONTACT() translation
  • group by
avatar alikon alikon - reference | c443eaf - 19 Dec 16
avatar Bakual Bakual - head_ref_deleted - 19 Dec 2016
avatar alikon alikon - reference | 76c7f98 - 21 Dec 16
avatar alikon alikon - reference | 1d43641 - 21 Dec 16
avatar cpfeifer cpfeifer - reference | fb3e6ba - 22 Dec 16

Add a Comment

Login with GitHub to post a comment