Every field has an alias. This alias is used to control the layout/display of the field
But there is no check to prevent more than one field with the same alias
If you have more than one field with the same alias then only one field will be displayed
To confirm create two fields with the same name/alias - they do not have to be the same type of the field. You will get no error creating the fields. Go to a content form and check that only one of the fields is displayed
whatever it is and whatevr it is used for it does need to be unique or the
fields dont work ;)
On 3 December 2016 at 11:02, Thomas Hunziker notifications@github.com
wrote:
The alias is technically the field ID. Imho it should be named differently
to avoid confusion and make clear what it is for.
Then it would also be more clear that you can't have the same ID twice in
a page. It probably needs to be unique across the whole database then and
not just per context or group.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13067 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8S7GUXuzIyf33hKJKP12emQ6pvk5ks5rET44gaJpZM4LDQLB
.
--
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
https://brian.teeman.net/ http://brian.teeman.net/
It is not needed to be unique over all, why should somebody not be able to create a field for users and one for articles with the same alias.
I thought it would also be used as ID when rendered, but there it is generated with the ID of the field.
So the alias is only used to generate the ID of the formfield? Then it makes even less sense to me to have that alias. What was the reason for adding that field?
If we use the id then I dont see the need for the alias - but it must be
being used or I would not have seen the issue I am reporting
If there is another use for the alias I would still make it unique -
otherwise we enter a world of complexity when you might want to (batch)move
a field from one group to another
On 3 December 2016 at 12:52, Thomas Hunziker notifications@github.com
wrote:
I thought it would also be used as ID when rendered, but there it is
generated with the ID of the field.
So the alias is only used to generate the ID of the formfield? Then it
makes even less sense to me to have that alias. What was the reason for
adding that field?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13067 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8YzAL8F8bRKaQFNK66672pAhp5B-ks5rEVgKgaJpZM4LDQLB
.
--
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
https://brian.teeman.net/ http://brian.teeman.net/
Even if the "field-alias" is not unique globally,
It should be made unique per component since by looking at the code, i see
e.g. in records forms, a field having duplicate will not be shown (only the "last" of e.g. 4 duplicate alias field will be shown)
and even if it is shown, then only last duplicate field will be saved and last one will be search-indexed because i see alias also being used as index at:
onContentBeforeSave
onPrepareFinderContent
So long and farewell
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-12-09 15:34:14 |
Closed_By | ⇒ | brianteeman |
The alias is technically the field ID. Imho it should be named differently to avoid confusion and make clear what it is for.
Then it would also be more clear that you can't have the same ID twice in a page. It probably needs to be unique across the whole database then and not just per context or group.