Skip to content
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] Error message when creating a field with a name already existing #16069

Merged
merged 3 commits into from Sep 3, 2018

Conversation

stellainformatica
Copy link
Contributor

@stellainformatica stellainformatica commented May 17, 2017

Steps to reproduce the issue

Try to create a custom field (i.e. in contacts) that has the same name of a custom field created for another extension (i.e. contents).

Expected result

The ideal would be to let creating custom fields with the same name, if they are associated to different extensions, but, if not possible, a message should explain better why that field already exists.
I've modified the message like this:
COM_FIELDS_ERROR_UNIQUE_NAME="Another Field has the same name (remember it may be a trashed item or it may be already present as custom field in another extension)."

Actual result

appears this message:
"Save failed with the following error: Another Field has the same name (remember it may be a trashed item)."

Pull Request for Issue #16070 .

If you try to create a custom field that has the same name of a custom field created for another extension, appears this message:
"Save failed with the following error: Another Field has the same name (remember it may be a trashed item)."

This PR adds more explanation for the user to understand where can be the other field with the same name.
@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-staging labels May 17, 2017
@stellainformatica stellainformatica changed the title Update en-GB.com_fields.ini [com_fields] Error message when creating a field with a name already existing May 17, 2017
@zero-24
Copy link
Contributor

zero-24 commented May 17, 2017

@laoneo @Bakual is this the expected behavior? that you can only create one field with the same name over the cms?

@@ -6,7 +6,7 @@
COM_FIELDS="Fields"
COM_FIELDS_BATCH_GROUP_LABEL="To Move or Copy your selection please select a group."
COM_FIELDS_BATCH_GROUP_OPTION_NONE="- No Group -"
COM_FIELDS_ERROR_UNIQUE_NAME="Another Field has the same name (remember it may be a trashed item)."
COM_FIELDS_ERROR_UNIQUE_NAME="Another Field has the same name (remember it may be a trashed item or it may be already present as custom field in another extension)."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as a custom field not as custom field

Corrected as suggested by Brian
@stellainformatica
Copy link
Contributor Author

Corrected, thanks Brian

@laoneo
Copy link
Member

laoneo commented May 17, 2017

I see no limitation as it will be not possible to have two fields for two extensions on one form. I would rather break up that restriction than this pr.

@Bakual
Copy link
Contributor

Bakual commented May 17, 2017

I see no limitation as it will be not possible to have two fields for two extensions on one form. I would rather break up that restriction than this pr.

The problem isn't the name of the field (which needs to be unique per form). It's the id of the field (which needs to be unique per page). And since you in theory can have multiple forms per page, that field name/id has to be unique sitewide.

@BertaOctech
Copy link

I have tested this item ✅ successfully on f3cc64f


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16069.

1 similar comment
@ghost
Copy link

ghost commented Aug 25, 2018

I have tested this item ✅ successfully on f3cc64f


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16069.

@ghost
Copy link

ghost commented Aug 25, 2018

Ready to Commit after two successful tests.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Aug 25, 2018
@mbabker mbabker added this to the Joomla 3.9.0 milestone Sep 3, 2018
@mbabker mbabker merged commit dba0744 into joomla:staging Sep 3, 2018
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Sep 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Change This is for Translators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants