Skip to content

Conversation

@aniket190705
Copy link

Pull Request for Issue #46214.

Summary of Changes

This PR fixes an issue where a Subform field appears inside its own subfields
dropdown. Selecting the Subform itself creates a recursive configuration, which
breaks the edit view of any item (e.g., articles) using that field.

The fix ensures that the currently edited field is correctly detected, even
inside a nested Subform context, and excluded from the dropdown options.

Testing Instructions

  1. Go to Content → Fields.
  2. Create a custom field (e.g., a Text field).
  3. Create a Subform field and add the custom field to it.
  4. Save the Subform.
  5. Edit the Subform again.
  6. Open the dropdown under Subform Options.

Actual result BEFORE applying this Pull Request

  • The Subform field appears in its own dropdown.
  • It can be selected.
  • Doing so creates a recursive configuration and breaks the edit view when used
    in Articles or other content.

Expected result AFTER applying this Pull Request

  • The Subform currently being edited does not appear in the dropdown.
  • Other fields continue to appear normally.
  • The Subform behaves correctly without causing recursion.

Link to documentations

  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed

@richard67
Copy link
Member

richard67 commented Dec 3, 2025

@aniket190705 Can it be that the description of this PR and the code were generated by AI? To me it seems so.

The code add at 2 places sequences of empty lines.

Have you reviewed your PR yourself before submitting it?

And have you tested your change yourself before submitting this PR?

Our contribution guidelines say that PR authors shall test their PRs before submitting.

P.S.: As you can see all code style checks in our CI actions fail for your PR. Please check and fix. Thanks in advance.

@richard67 richard67 changed the title [5.3] Fix subform field dropdown showing current field (Fixes #46214) [5.4] Fix subform field dropdown showing current field (Fixes #46214) Dec 3, 2025
@aniket190705
Copy link
Author

Hi @richard67
I did use AI to help me with the PR description and to discuss a possible approach to solve the issue, but I implemented and tested the change myself locally before submitting the PR and the code worked completely fine.

I am a beginner in open source contributions, I did not know extra spaces can cause issues. I will fix the code style and push the updated commit.

I am contributing as part of my preparation for Google Summer of Code 2026, so I appreciate your guidance and feedback.

@richard67
Copy link
Member

@aniket190705 Thanks for your reply. The log files of the failed CI checks will tell you what needs to be fixed on code style and how it can be fixed automatically when having a development environment with the code style check tools. Just use the links to the details for each failed check.

Thanks in advance, and have a good time and success with GSoC.

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.

3 participants