Categories - Select Multiple #35

Closed
opened 2017-01-17 23:20:13 +00:00 by mwweb · 4 comments
mwweb commented 2017-01-17 23:20:13 +00:00 (Migrated from github.com)

Greetings Llewellyn.

Somewhere, in one of the builds, something changed in having a field for Category, with multiple set.

Prior to version 2.2.6, it was working fine. I could add multiple categories to a field, save, and it would create assets for the different categories, and the record would then be attached to those multiple categories, populating the asset_id field with the appropriate category asset id's. Since that version (approximately) something apparently changed. In my case, it populated a single asset_id, even though i selected 2 categories.

Any thoughts on what might be causing the issue?

Greetings Llewellyn. Somewhere, in one of the builds, something changed in having a field for Category, with multiple set. Prior to version 2.2.6, it was working fine. I could add multiple categories to a field, save, and it would create assets for the different categories, and the record would then be attached to those multiple categories, populating the asset_id field with the appropriate category asset id's. Since that version (approximately) something apparently changed. In my case, it populated a single asset_id, even though i selected 2 categories. Any thoughts on what might be causing the issue?

Okay as far as I know, I have not touched the Category concept in a long time... so there should be no changes. Yet I am not clear on where you are... creating a field in component builder or are you in a admin-view of a new component that has a category field.

You will need to realize that I can't help you if you don't give me enough information, I want to help, but you ask questions that can have to many answers, and it is pointless for me to try and answer them all. Please explain the problem a little more in detail.

Like what I must do to duplicate the issue is very important, exactly when and where. Screen-shots or any other visual aid, maybe quick video clip.

Sorry but there is just to many category related places and options... give me some more details.

Okay as far as I know, I have not touched the Category concept in a long time... so there should be no changes. Yet I am not clear on where you are... creating a field in component builder or are you in a admin-view of a new component that has a category field. You will need to realize that I can't help you if you don't give me enough information, I want to help, but you ask questions that can have to many answers, and it is pointless for me to try and answer them all. Please explain the problem a little more in detail. Like what I must do to duplicate the issue is very important, exactly when and where. Screen-shots or any other visual aid, maybe quick video clip. Sorry but there is just to many category related places and options... give me some more details.
mwweb commented 2017-01-19 20:34:11 +00:00 (Migrated from github.com)

Sorry for the delay in responding. The email ended up in spam.

This happens in the admin view, when adding or editing a record. I have the multi-select box, and I can select the categories. However, once I say, the category multi-select box is empty.

When adding or editing, I can select the multiple categories (or even just a single category):
category-before-save

After saving, this is what happens:
category-after-save

Sorry for the delay in responding. The email ended up in spam. This happens in the admin view, when adding or editing a record. I have the multi-select box, and I can select the categories. However, once I say, the category multi-select box is empty. When adding or editing, I can select the multiple categories (or even just a single category): ![category-before-save](https://cloud.githubusercontent.com/assets/19194012/22124155/700bd1b2-de43-11e6-97e4-f1cdd926db3a.png) After saving, this is what happens: ![category-after-save](https://cloud.githubusercontent.com/assets/19194012/22124156/700d44ac-de43-11e6-8aef-0f19998468da.png)

Okay I think the problem here is the storage... so you need to change the Store Method in the category field to json and test if it still does not work.

I must be honest adding more then one category was never fully tested, so if it works it is by accident, and not design. So if it broke, it is possibly not a bug but a correction that stopped the accident from happening.... sorry. The whole Joomla implementation of integration of the category component into 3rd party components does not cater for multiple selection. Just look at articles and you will see that you can only select one category, and that is by design.

The tags field is much better choice for this, and is what I would recommend. Hey you can even add more tags right in the field... it is a powerful field. Give it a try some time!

But adding the storage option to json may work in storing the values to the DB, yet it will not work in the full implementation of the category functionality, well that is as far as I know... and trust me I am still a junior.

Please let me know what happened...

Okay I think the problem here is the storage... so you need to change the **Store Method** in the category field to json and test if it still does not work. I must be honest adding more then one category was never fully tested, so if it works it is by accident, and not design. So if it broke, it is possibly not a bug but a correction that stopped the accident from happening.... sorry. The whole Joomla implementation of integration of the category component into 3rd party components does not cater for multiple selection. Just look at articles and you will see that you can only select one category, and that is by design. The tags field is much better choice for this, and is what I would recommend. Hey you can even add more tags right in the field... it is a powerful field. Give it a try some time! But adding the storage option to json may work in storing the values to the DB, yet it will not work in the full implementation of the category functionality, well that is as far as I know... and trust me I am still a junior. Please let me know what happened...
mwweb commented 2017-01-25 08:31:38 +00:00 (Migrated from github.com)

I kind of had it working, but I'm "tabling" it for right now. I've seen a couple other components that use com_categories, and use multi-select, so when I have more time I will dig into it more.

I kind of had it working, but I'm "tabling" it for right now. I've seen a couple other components that use com_categories, and use multi-select, so when I have more time I will dig into it more.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#35
No description provided.