Skip to content

[5.3] Customfields: Also look at context when checking uniqueness#44161

Merged
laoneo merged 3 commits intojoomla:5.3-devfrom
Hackwar:5.3-customfields-alias
Oct 10, 2024
Merged

[5.3] Customfields: Also look at context when checking uniqueness#44161
laoneo merged 3 commits intojoomla:5.3-devfrom
Hackwar:5.3-customfields-alias

Conversation

@Hackwar
Copy link
Member

@Hackwar Hackwar commented Sep 29, 2024

Pull Request for Issue #44154 .

Summary of Changes

Customfields should only be uniquely named per context, so you should be able to have a field test in both articles and users. So far this is prohibited and you can only name a field uniquely system wide. This PR should fix that.

Testing Instructions

Create a customfield with name test in articles and in users.

Actual result BEFORE applying this Pull Request

Creating the second field is denied.

Expected result AFTER applying this Pull Request

Both fields can be saved.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@brianteeman
Copy link
Contributor

The error message needs to be updated as currently it says
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 a custom field in another extension)."

It can now be simplified and made more consistent with other strings eg
COM_FIELDS_ERROR_UNIQUE_NAME="Another Field has the same name (remember it may be a trashed item)."

@Fedik Fedik added the bug label Sep 30, 2024
@ghost
Copy link

ghost commented Oct 2, 2024

I have tested this item ✅ successfully on 58ccfe1

Test same Field name on

  • Content
    • Articles
    • Category
  • Contact
    • Contact
    • Mail
    • Category
  • Users

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

@Quy Quy added the Updates Requested Indicates that this pull request needs an update from the author and should not be tested. label Oct 2, 2024
@BertaOctech
Copy link

I have tested this item ✅ successfully on 58ccfe1

I tried to create a custom field in Content and Users with the same name.
It was not possible until I applied the patch.
Later on I used both the user field and the content field and each one kept its value and appeared in the correct place.


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

@laoneo
Copy link
Member

laoneo commented Oct 5, 2024

@Hackwar can you also change the text in the mentioned string from @brianteeman?

@laoneo laoneo self-assigned this Oct 5, 2024
@joomla-cms-bot joomla-cms-bot added the Language Change This is for Translators label Oct 10, 2024
@Hackwar
Copy link
Member Author

Hackwar commented Oct 10, 2024

Done

@Quy Quy added Updates Requested Indicates that this pull request needs an update from the author and should not be tested. and removed Updates Requested Indicates that this pull request needs an update from the author and should not be tested. Language Change This is for Translators labels Oct 10, 2024
@Quy
Copy link
Contributor

Quy commented Oct 10, 2024

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Oct 10, 2024
@Quy Quy added Language Change This is for Translators and removed Updates Requested Indicates that this pull request needs an update from the author and should not be tested. labels Oct 10, 2024
@laoneo laoneo added this to the Joomla! 5.3.0 milestone Oct 10, 2024
@laoneo laoneo merged commit 8b5133b into joomla:5.3-dev Oct 10, 2024
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Oct 10, 2024
@laoneo
Copy link
Member

laoneo commented Oct 10, 2024

Thanks!

@bembelimen bembelimen mentioned this pull request Nov 14, 2024
HLeithner pushed a commit that referenced this pull request Nov 16, 2024
@laoneo
Copy link
Member

laoneo commented Nov 21, 2024

Just for reference, this one has been reverted with #44462. Should probably be implemented in 6.0.

@heelc29 heelc29 mentioned this pull request Feb 13, 2025
4 tasks
@Hackwar Hackwar deleted the 5.3-customfields-alias branch February 17, 2025 16:32
Kostelano added a commit to JPathRu/localisation that referenced this pull request Apr 14, 2025
joomla/joomla-cms#41496 - (upmerge с 5.2х)
joomla/joomla-cms#42530 +
joomla/joomla-cms#43994 - (upmerge с 5.2х)
joomla/joomla-cms#44009 - (upmerge с 5.2х)
joomla/joomla-cms#44010 - (upmerge с 5.2х)
joomla/joomla-cms#44161 +
joomla/joomla-cms#44187 - (upmerge с 5.2х)
joomla/joomla-cms#44207 - (upmerge с 5.2х)
joomla/joomla-cms#44271 +
joomla/joomla-cms#44273 +
joomla/joomla-cms#44288 - (только для en-GB)
joomla/joomla-cms#44348 - (upmerge с 5.2х)
joomla/joomla-cms#44366 +
joomla/joomla-cms#44367 - (upmerge с 5.2х)
joomla/joomla-cms#44434 - (upmerge с 5.2х)
joomla/joomla-cms#44448 - (upmerge с 5.2х)
joomla/joomla-cms#44462 +
joomla/joomla-cms#44487 - (upmerge с 5.2х)
joomla/joomla-cms#44587 +
joomla/joomla-cms#44600 +
joomla/joomla-cms#44604 +
joomla/joomla-cms#44621 - (upmerge с 5.2х)
joomla/joomla-cms#44623 +
joomla/joomla-cms#44632 +
joomla/joomla-cms#44640 - (позже был REVERT joomla/joomla-cms#44845)
joomla/joomla-cms#44714 - (upmerge с 5.2х)
joomla/joomla-cms#44756 +
joomla/joomla-cms#44768 - (upmerge с 5.2х)
joomla/joomla-cms#44792 - (только для en-GB)
joomla/joomla-cms#44813 +
joomla/joomla-cms#44822 - (upmerge с 5.2х)
joomla/joomla-cms#44839 +
joomla/joomla-cms#44871 +
joomla/joomla-cms#44954 +
joomla/joomla-cms#45034 - (upmerge с 5.2х)
joomla/joomla-cms#45058 - (только для en-GB)
joomla/joomla-cms#45064 +
joomla/joomla-cms#45078 - (только для en-GB)
joomla/joomla-cms#45130 - (upmerge с 5.2х)
joomla/joomla-cms#45240 - (upmerge с 5.2х)
joomla/joomla-cms#45246 - (только для др. пакетов)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants