?
avatar dgt41
dgt41
3 Oct 2014

Few days ago I made a PR #4316 for unifying the way joomla responds for duplicate alias in com_content. Although this unifies, at some extend, the user experience in articles creation the rest of a joomla installation might still behave differently when you input (or leave it blank) an alias that might already exists.
One posible site wide solution will be the introduction of a new field type, lets call it Alias, that will take care of the uniqueness of the alias.
What I am thinking is four changes:
1. Create a new field alias.php at legacy/form/field
2. In xxxx.xml of every component that incorporates an alias field so it uses the new one
3. In legacy/controller/form.php to introduce some ajax check (e.g.: on save) for the given or blank alias
4. In legacy/model/form.php the actual code that the ajax calls

This is what I think that the alias field should consists of (this is for articles):

<field name="alias" type="text" label="JFIELD_ALIAS_LABEL"
        itemid="id"
        itemalias="alias"
        itemtable="content"
        categoryid="id"
        categoryalias="alias"
        categorytable="categories"
        description="JFIELD_ALIAS_DESC"
        hint="JFIELD_ALIAS_PLACEHOLDER"
        size="40" />

Do you think is a good idea?
Will it break the universe harmony?
Is it useless?
Some input before I spent some time coding this will be highly appreciated.

avatar dgt41 dgt41 - open - 3 Oct 2014
avatar Hackwar
Hackwar - comment - 14 Nov 2014

Hi @dgt41, I don't think this is very usefull. The whole alias thing is a pretty component specific thing that might work this or that way in different components. People now get a warning once when there is already an identical alias and I think that is ok enough. Introducing an ajax call for this seems like quite an overkill from my POV.

avatar zero-24 zero-24 - close - 14 Nov 2014
avatar zero-24 zero-24 - close - 14 Nov 2014
avatar dgt41
dgt41 - comment - 14 Nov 2014

I’ll close it for now, since I don’t have much code to demonstrate.

avatar dgt41 dgt41 - close - 14 Nov 2014
avatar dgt41 dgt41 - change - 14 Nov 2014
The description was changed
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-11-14 22:55:57
avatar zero-24 zero-24 - change - 7 Jul 2015
Labels Added: ?

Add a Comment

Login with GitHub to post a comment