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

Warning thrown when importing a new field instance through configuration manager #6766

Open
argiepiano opened this issue Nov 29, 2024 · 2 comments · May be fixed by backdrop/backdrop#4914
Open

Comments

@argiepiano
Copy link

Description of the bug

The warning Warning: Trying to access array offset on value of type null in node_config_create_validate() (line 3747 of /Users/XXX/Sites/localhost/bdtesting/core/modules/node/node.module). is thrown when you try to import a field instance configuration through the configuration manager.

Steps To Reproduce

The easiest way to reproduce this is with a development and production site, simply by importing a new field instance created in the dev site, into the production site.

To test on a single test site (e.g. on a tugboat demo site):

  1. Create a field and attach it to page type
  2. Then attach the same field to post type
  3. Go to configuration manager > single export, and copy the json code for the instance you created for the post type
  4. Delete the instance from the post type
  5. Go to configuration manage > single import and past the code you copied above
  6. See the warning notice

Actual behavior

Warning thrown.

Expected behavior

No warning.

Additional information

  • Backdrop CMS version: 1.29.2

There should be a check for null in $all_changes in line 3747. If null, then set $type_created to false.

@argiepiano
Copy link
Author

argiepiano commented Nov 29, 2024

Very simple, one line PR provided. backdrop/backdrop#4914

@quicksketch
Copy link
Member

quicksketch commented Nov 29, 2024

PR looks good to me but I did not yet manually test it.

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

Successfully merging a pull request may close this issue.

2 participants