All nodes created with title, but without content

Created on 1 August 2023, over 1 year ago
Updated 16 December 2023, 11 months ago

Problem/Motivation

Using 2.0.0-alpha2 on drupal 9.5.9, all exported nodes get created on site:install (with a profile), but none of them have any content other than the title. This seems to be true for all my content types and all field types. Some content types are very simple. The content is often just the word 'test'. Translations are enabled, but there are no active translations for these nodes.

No errors are reported during install.

Steps to reproduce

- Install and enable default_content
- export some nodes with content into a module as documented
- reinstall the site with a profile (that requires that module)
- see the nodes are created, with the right title, but without content

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands commonpike

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @commonpike
  • πŸ‡³πŸ‡±Netherlands commonpike
  • πŸ‡«πŸ‡·France frondeau Nantes, FRANCE

    Hello commonpike,
    Is this issue functionally fixed on your side ? If so, can you explain the way you've fixed the issue and turn this issue as solved ?
    If not, can you explain if:

    • when exporting:the json files contain exported content in nodes, and related entities ?
    • when installing the profile the bundles are created ? nodes related bundles: paragraphs, blocks ...

    There might be some special configuration or relations on your project.
    Regards.

  • πŸ‡ΊπŸ‡ΈUnited States jmickela SF Bay Area, California

    I'm having the same problem.

    I'm using YML files, they do contain the content (in my case block_content and taxonomy entities).

    During the profile install the bundles are all created and everything seems to go well. If I uninstall my default content module and reinstall it all content will get created as expected.

  • πŸ‡ΊπŸ‡ΈUnited States jmickela SF Bay Area, California

    I managed to get around this issue by adding a task in hook_install_tasks and enabling the module with the content in it from there.

    This way it installs after everything else is completely done. I tried to accomplish this by setting a lot of dependencies on other modules, but I don't think the configuration was getting loaded when the module was enabled, so the default content module is getting installed before fields exist.

  • πŸ‡§πŸ‡―Benin delacosta456

    hi all
    i was facing this issue too until i realize that node's that have block_content, does not export the block content when runing "drush dcer ..." command . below are the applied patches that resolve it for me (exporting the entity with reference)

            "patches": {
                "drupal/default_content": {
                    "1 - Add a Normalizer and Denormalizer to support Layout Builder - https://www.drupal.org/project/default_content/issues/3160146#comment-14814050": "https://www.drupal.org/files/issues/2022-12-06/default_content-3160146-53.patch",
                    "2 - Do not reimport existing entities": "https://www.drupal.org/files/issues/2022-07-29/default_content-fix-uuid-duplicate-entry-2698425.patch",
                    "3 - Update inline block usage on import - https://www.drupal.org/project/default_content/issues/3359137#comment-15042582": "https://www.drupal.org/files/issues/2023-05-09/default_content-3359137-3.patch"
                },
Production build 0.71.5 2024