User tests: Successful: Unsuccessful:
Regression from PR #13019.
This PR adapts the show custom fields setting in contacts to the new field groups.
Only the values from the fields "Demo Field 1" and "Demo Field" should be shown.
The groups are not shown on the back end Contact options and on the front is the following warning displayed:
Notice: Undefined property: stdClass::$catid in /joomla-cms/components/com_contact/views/contact/tmpl/default_user_custom_fields.php on line 24
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_contact Front End Templates (site) |
Milestone |
Added: |
Guess it is time to define what happens with fields which do not belong to a group. IMO they should be displayed. No group means for me that it belongs to all groups.
The tooltip indicates something else.
Also when nothing is selected, no fields are shown (as expected), but when I add a single group, actually two groups are shown. That's a bit unexpected to me.
Which tooltip are you talking about?
There is the default group called fields if you dont put a field in a named group
So if a field belongs to no group, should it be displayed or not? Current implementation is, it will be displayed as for me a field which doesn't belong to a group, it is some kind of in all groups (it starts to become strange as I'm typing this phrase). But I'm fine with whatever makes more sense.
What I expect is if I select only one group, only the fields of that group should show.
If I select "All", it should also show the ones without any group.
Done
Thanks.
Imho only fields from the selected group should be shown.
MY view is
if you select ALL then all fields should display
if you select GROUP1 then only fields in that group should display
The problem comes with fields that are not in a group (these are my generic fields).
So for example I have GROUP1, GROUP2 and some fields not in a group. How would I display the fields that are not in a group and GROUP1 but not GROUP2
We can add another option to select like "No grouped fields", maybe, not sure, hmmm.
Or maybe we require fields to be in a groups just as we require articles etc to be in categories
We could require the group. Or we could just say if you want to show those non-grouped fields here, create a group and group them
Adding an option for not grouped fields imho only asks for troubles. It complicates the code and it's also not that simple to find a good option name.
Or we could just say if you want to show those non-grouped fields here, create a group and group them
Sometimes the answer is so easy. I would go that way.
Changed code to show only fields of the selected groups.
I have tested this item
Notice is gone, and specific field groups can be selected in com_contact options in addition to "All".
Yes, I tested successfully most of the cases. Users and Contacts with several Field Groups and Fields (including fields with no group).
.... But "Show User Custom Fields" only shows All... What am I missing?
You can control which user custom fields should be shown on the contact view on the front end based on the field groups.
Yes, I know... but it only allows to select "All"
Did you create some User (not contact) field groups? I assume you have the latest staging checked out.
Yep, I created Field Groups and Fields in Users and Contacts. They work perfectly well.
Which is the method that populates this field?
@jeckodevelopment done. Can you please test it, would be great to have it in the first alpha?
@anibalsanchez I guess I found the issue. Because of PR #13175 the identifier changed from extension to context. I'v fixed it in my last commit. Now it should work again as expected.
I have tested this item
Test OK!
I have tested this item
Test still good.
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-12-21 11:42:35 |
Closed_By | ⇒ | rdeutz | |
Labels |
Added:
?
|
Is it expected that fields which belong to no group are shown as well when I select only "Group2"? Seems a bit counter-intuitive to me.