-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[com_fields] Undefined property: stdClass::$assigned_cat_ids, com_fields #13565
Comments
@laoneo That's because com_users doesn't use categories, right? The parameter is thus missing in the field definition as well. |
This issue reveals a problem when a component doesn't use categories for grouping. Correctly implemented, we need to offer for the component a way to define the hardcoded category_id more dynamically
I guess this would mean that we can't use the category form field here https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_fields/models/forms/field.xml#L35. Instead of we need to make our own generic one. But I don't know if this is doable in a stable way? |
The first one isn't an issue as $tupel->category_id refers to the #__fields_categories table. That will always be that column name 😄 The other one may be an issue if an extension doesn't use catid as property. However it may also be possible for them to just copy the property to catid before it goes through fields. Otherwise we would need a way to alias the category property of an item. But it isn't the cause of the issue here. The category field however is fine. That should work with all extensions using com_categories. |
See PR #13570 Closing this. |
Like it is now, it ONLY works for categories. It is not possible to assign fields to user groups or other component specific grouping items. |
Ah sure, that isn't possible. But it's also not something which we tried to support so far. |
That's what I wanted to say 🙊 |
Steps to reproduce the issue
Expected result
No notice
Actual result
Notice: Undefined property: stdClass::$assigned_cat_ids, com_fields/helpers/fields.php on line 453
System information (as much as possible)
Additional comments
The text was updated successfully, but these errors were encountered: