?
avatar brianteeman
brianteeman
3 Dec 2016

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

avatar brianteeman brianteeman - open - 3 Dec 2016
avatar brianteeman brianteeman - labeled - 3 Dec 2016
avatar Bakual
Bakual - comment - 3 Dec 2016

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.

avatar brianteeman
brianteeman - comment - 3 Dec 2016

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/

avatar laoneo
laoneo - comment - 3 Dec 2016

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.

avatar Bakual
Bakual - comment - 3 Dec 2016

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?

avatar brianteeman
brianteeman - comment - 3 Dec 2016

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/

avatar ggppdk
ggppdk - comment - 3 Dec 2016

Even if the "field-alias" is not unique globally,

It should be made unique per component since by looking at the code, i see

  • that alias is used to index field data

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

avatar brianteeman
brianteeman - comment - 9 Dec 2016

So long and farewell

avatar brianteeman brianteeman - change - 9 Dec 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-12-09 15:34:14
Closed_By brianteeman
avatar brianteeman brianteeman - close - 9 Dec 2016

Add a Comment

Login with GitHub to post a comment