Problem/Motivation

I've noticed that after installing Byte, there is an empty public: folder in web. This happens when installing from the repo as well as via composer-create. Doesn't happen with Starter though so possibly related to the repo split?

Steps to reproduce

  1. Clone the repo
  2. Run ddev launch
  3. Run ddev install-byte
  4. See there is an empty public: folder under web

Issue fork drupal-3554133

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

pameeela created an issue. See original summary.

phenaproxima’s picture

Assigned: Unassigned » phenaproxima

I would imagine this is something to do with a content import gone wrong. I'll look into it.

phenaproxima’s picture

Title: Empty "public:" directory in /web created after installing Byte » Default content importer creates a `public:` directory in the web root when copying certain files
Project: Drupal CMS development repository » Drupal core
Version: » 11.x-dev
Component: Site Templates » default content system

I think this is a bug in core's \Drupal\Core\DefaultContent\Importer::copyFileAssociatedWithEntity() method.

If you have a URI like public://byte-logo.png, which Byte does, then dirname('public://byte-logo.png') yields public:. That's exactly the name of the directory that gets created.

Moving this to core's queue, because this is an unambiguous bug.

phenaproxima changed the visibility of the branch 3554133-default-content-importer to hidden.

darren oh made their first commit to this issue’s fork.

darren oh’s picture

Assigned: phenaproxima » Unassigned
Priority: Normal » Major
Status: Active » Needs review
phenaproxima’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, @darren-oh! Tests pass with this change and fail exactly as expected without it, so I say ship it. All I did was write the test here, which was one line, so I feel good about RTBCing it.

alexpott’s picture

Version: 11.x-dev » 11.2.x-dev
Status: Reviewed & tested by the community » Fixed

Committed 2d67d38 and pushed to 11.x. Thanks!
Committed ab303a0 and pushed to 11.3.x. Thanks!
Committed b6c78e3 and pushed to 11.2.x. Thanks!

Nice find, nice fix, nice test. Thanks everyone.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • alexpott committed b6c78e32 on 11.2.x
    Issue #3554133 by pameeela, phenaproxima, darren oh: Default content...

  • alexpott committed ab303a00 on 11.3.x
    Issue #3554133 by pameeela, phenaproxima, darren oh: Default content...

  • alexpott committed 2d67d387 on 11.x
    Issue #3554133 by pameeela, phenaproxima, darren oh: Default content...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.