?
avatar Bakual
Bakual
3 Nov 2016

Steps to reproduce the issue

Check the options tab of a custom field and try the various parameters.

Expected result

All having an effect

Actual result

Most don't have any effect

Additional comments

From what I see we don't need the following parameters in the field form:

  • title isn't used as far as I see except for the fields manager. In the forms and item views the label is used instead. One of it is useless imho. Used as an identifier in the fields manager.
  • alias isn't used anywhere and doesn't make sense for a field.
  • image and image alternate text is unused as far as I saw.

From what I see we don't need the following columns in the database table #__fields:

  • title or label (see above)
  • alias (see above)
  • options - couldn't find a way to populate that
  • attributes - couldn't find a way to populate that
  • created_by_alias - doesn't make sense for a field
  • version - fields doesn't seem to support versioning anyway Already removed with #12674
  • publish_up and publish_down - currently unused.
  • hits - doesn't make sense for a field Already removed with #12674
avatar Bakual Bakual - open - 3 Nov 2016
avatar joomla-cms-bot joomla-cms-bot - change - 3 Nov 2016
Labels Added: ?
avatar alikon
alikon - comment - 3 Nov 2016

Version and hits has been already removed can't remember the pr number

avatar Bakual
Bakual - comment - 3 Nov 2016

Version and hits has been already removed can't remember the pr number

For reference #12674
Thanks for the reminder.

avatar infograf768
infograf768 - comment - 3 Nov 2016

Concerning Title and Label, I think we should keep them as LABEL can be translatable via a new language string and, in this case, it has to obey to our usual rules for string constants.
This may not be really readable vs Title.

avatar Bakual Bakual - edited - 3 Nov 2016
avatar brianteeman brianteeman - change - 3 Nov 2016
Category com_fields
avatar Bakual Bakual - change - 5 Nov 2016
Title
[com_fields] Useless pramaters and table columns for fields
[com_fields] Useless parameters and table columns for fields
avatar laoneo
laoneo - comment - 7 Nov 2016

Images can be used in a template override, but this is not implemented yet, just one more possibility for the site admin when he is doing an override.

avatar Bakual
Bakual - comment - 7 Nov 2016

Images can be used in a template override, but this is not implemented yet, just one more possibility for the site admin when he is doing an override.

Yes sure, in overrides everything is possible. But I don't see the usecase for it to store data which eventually could be used in an override. If we have the options, it should be used in core or removed. Otherwise users will be confused and telling us core is broken.

avatar Bakual
Bakual - comment - 7 Nov 2016

Found out the alias is used as the field id in the HTML code. So maybe it should be named differently?

avatar laoneo
laoneo - comment - 7 Nov 2016

Many users of DPFields did use the alias also for a more human readable lookup.

avatar ggppdk
ggppdk - comment - 7 Nov 2016

Found out the alias is used as the field id in the HTML code. So maybe it should be named differently?

Many users of DPFields did use the alias also for a more human readable lookup.

I have a similar thing to 'alias' called 'name' of the field,

  • that appears in html code, and elsewhere, (e.g. when in a field selector, 2 fields have the same title, i will append the fleld's name to distiguish them)
avatar tonypartridge
tonypartridge - comment - 2 Dec 2016

I would suggest we have an advanced config option in com_fields which is used if doing template overrides which shows the additional input values that the user can then use in the front end in an override. Displaying inputs which have no effect in the default output would lead to a very confused user.

avatar Bakual
Bakual - comment - 2 Dec 2016

There is (currently) no configuration at all for com_fields.
Imho it makes no sense to have additional database columns which may only be used (or not) by templates overrides.
Most of the mentioned fields even don't make sense in an override. For example "hits", "created_by_alias", "publish_up" and "publish_down". They would need code to deal with it.
The image may be used in an override, but really what is the usecase? Why would you want to attach an image to a field? If you need a template override anyway to show it, you could as well just add some code there hardcoded to show that image you want. Or even better use CSS and show the image based on a class on the field.

avatar tonypartridge
tonypartridge - comment - 2 Dec 2016

I think it's also for the fact the DPFields will have to provide a migration for it's current users.

We should probably look at adding ACL for com_fields, what ACL is controlling who can add fields?

avatar Bakual
Bakual - comment - 2 Dec 2016

ACL should be working with PR #13019.

As for the users of DPFields, I have no clue. Does that one use the same component name (com_fields)? If so then it's an issue, otherwise not. I'd rather rename com_fields component then to something else to avoid that issue. DPFields can add a migration path to its extension, not a core issue to deal with.

avatar Bakual Bakual - edited - 3 Dec 2016
avatar infograf768
infograf768 - comment - 3 Dec 2016

DPfields is "com_dpfields"

avatar Bakual Bakual - change - 17 Jan 2017
The description was changed
avatar Bakual Bakual - edited - 17 Jan 2017
avatar Bakual
Bakual - comment - 17 Jan 2017

Closing as there is a PR for the remaining issues.
#13621

avatar Bakual Bakual - change - 17 Jan 2017
The description was changed
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-01-17 15:41:28
Closed_By Bakual
avatar Bakual Bakual - close - 17 Jan 2017

Add a Comment

Login with GitHub to post a comment