Problem/Motivation

Since commit 361215bf9f3cbfb7c50187f464e306b05402239c snippet files are being created during installation.

Though, when installing through config installer, the snippet directory does not exist yet.

Proposed resolution

Create the snippet directory during installation.

Remaining tasks

  • Write a patch
  • Review patch
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Syndz created an issue. See original summary.

Syndz’s picture

Assigned: Syndz » Unassigned
Issue summary: View changes
Status: Active » Needs review
FileSize
2.8 KB

Here's a patch that creates the snippets directory during installation.

slucero’s picture

This issue and patch identified and resolved the exact issue I was running into as well with installation errors since introducing the module. Worked great, thanks!

daniel.czegledi’s picture

Status: Needs review » Reviewed & tested by the community
solotandem’s picture

Category: Bug report » Feature request

Someone please explain why config_installer fails to install this module although this task works fine with core. This would seem to be a bug in config_installer which claims to be an "installation profile that takes over the Drupal installer and allows sites to be created from existing configuration". It would seem that config_installer ignores hook_requirements(). If so, why?

Jelle_S’s picture

@solotandem it's not just config_installer. We have the same issue when this module is enabled by a config import vendor/bin/drush cim -y

rbayliss’s picture

Yeah, I can confirm it's not related to config_installer, too. hook_requirements just seems not to get called before enabling modules using the normal CMI tools (or at least using drush cim).

Jelle_S’s picture

Title: Module installation does not work with config_installer » Module installation does not work when enabled through config synchronization
Jelle_S’s picture

FYI, I just had the same error on D7 when this module was enabled in a hook_update_N() of an other (custom) module with module_enable()

fago’s picture

I ran into a related issue: The files are missing when you sync the dump from another site as well. However, the patch here won't save the problem for this case, only when installed via the config sync. I think a more safe approach would be to create the files on-demand, when missing. See #2843994-12: Warnings when snippets files are missing - create them automatically for a patch which does so.

I'd be inclined to mark this as duplicate of #2843994-12: Warnings when snippets files are missing - create them automatically, but I leave it up to the maintainer or others to decide on the approach taken here.

  • solotandem committed 6643c09 on 8.x-1.x
    Issue #2879444 by syndz, solotandem: Create snippet directory in...
solotandem’s picture

Assigned: Unassigned » solotandem
Status: Reviewed & tested by the community » Fixed

Thanks to all for the input.

Status: Fixed » Closed (fixed)

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