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
Conversation
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.
@@ -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)." |
There was a problem hiding this comment.
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
Corrected, thanks Brian |
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 |
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
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. |
Ready to Commit after two successful tests. |
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 .