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

Relation controller with dependsOn #5829

Open
pittss opened this issue Dec 18, 2024 · 0 comments
Open

Relation controller with dependsOn #5829

pittss opened this issue Dec 18, 2024 · 0 comments

Comments

@pittss
Copy link

pittss commented Dec 18, 2024

Hello,

I’ve encountered strange behavior with the "relation controller / Belongs To / Morph One" when using dependsOn.

Environment

Test environment: OctoberCMS 3.7.6 with the test-plugin.

Issue

If you add dependsOn: review to the content field in /plugins/october/test/models/post/fields.yaml:

    content:
        label: Content
        type: codeeditor
        size: huge
        tab: Code Editor
        # language: text
        commentAbove: Code editor field.
        dependsOn: review

And then navigate to a post record (for example, https://localhost/admin/october/test/posts/update/1#primarytab-reviews) and perform any operation on the review field (e.g., update, create, etc.), the content field enters an infinite loop (constantly refreshing). The only way to resolve this is to reload the page.

Cause

It seems that if there are fields with identical names in different configurations, it causes this infinite loop. In this case, there are content fields in both:

  • /plugins/october/test/models/review/fields_simple.yaml
  • /plugins/october/test/models/post/fields.yaml

This appears to trigger the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant