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

Default Field Editors does not recognize Link field type #1180

Open
catdalfonso opened this issue Jul 8, 2022 · 2 comments
Open

Default Field Editors does not recognize Link field type #1180

catdalfonso opened this issue Jul 8, 2022 · 2 comments
Labels
stale Used to mark when there was no activity for a set period of time

Comments

@catdalfonso
Copy link

Case

 <Field sdk={sdk} />

where this is being rendered in a reference field.

Expected result

Field renders the default Contentful editor for a reference field.

Actual Result

The field does not render, with this in the console:

 controls-defaults.js?6882:240 Uncaught Error: Invalid field type
    at Object.getDefaultControlOfField (controls-defaults.js?6882:240:1)
    at getDefaultWidgetId (default-field-editors.esm.js?aacc:48:1)
    at Field (default-field-editors.esm.js?aacc:104:1)

Logging the sdk.field.type appears to log Link, which the underlying function here: https://github.com/contentful/contentful-management.js/blob/master/lib/constants/editor-interface-defaults/controls-defaults.ts#L50 does not seem to work with - it expects this to be Entry.

This appears to be a regression introduced with https://github.com/contentful/field-editors/pull/943/files#diff-5a67f874c5238f3bca3597587cd0915ed3758475ad2f884ff97c496f4bb6f28d .

Versions

 "@contentful/default-field-editors": "^1.1.33",
  "@contentful/app-sdk": "^4.8.0",
@catdalfonso
Copy link
Author

As a temporary workaround, I'm reverting to @contentful/default-field-editors@1.0.7.

@github-actions
Copy link

github-actions bot commented Aug 8, 2022

Marking issue as stale since there was no acitivty for 30 days

@github-actions github-actions bot added the stale Used to mark when there was no activity for a set period of time label Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Used to mark when there was no activity for a set period of time
Projects
None yet
Development

No branches or pull requests

1 participant