What is going on when i enable the module?

Created on 4 February 2023, about 2 years ago

Problem/Motivation

I installed the module with composer and then used drush to enable. As i usually do i then flipped to another window to continue with what i was doing. After 20 min or so i happened to notice lines scrolling by in that window and it appeared as though this module, on enable, was going through my entire db and assigning uuids to every piece of content. It was in the middle of adding them for the 1000s of commerce log entries on my site.

Is this what this was doing? Why would it possibly do this? I certainly have no intention of using this to sync log entries (or 95% of the other content types define on my site).

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Active

Version

3.0

Component

Code

Created by

🇨🇦Canada liquidcms

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

Comments & Activities

  • Issue created by @liquidcms
  • 🇺🇸United States jnicola

    Looking through the code now, it fires ContentExportForm::snapshot()

    A method with no commenting or documentation at all. Gross.

    Looks like on install it attempts to do a full site export right away! Snapshot gets every entity type, calls ::generateExportBatch() for each entity type.

    The batches called for each type are generateSiteUUIDFile() and processContentExportFiles()

    Generate Site UUID file doesn't seem to do more than just a singular site UUID.

    processContentExportFiles() with the snapshot param writes every single entity of every single type to a table?!?

    The more I look at this, the more it seems this module is designed for sinking entire sites between each other, not portions of entire sites.

    That appears to be the case with generating a full snapshot in a database table... which god forbid you have a massive site with millions of pieces of content because you just doubled that amount of content to yet another database table...

  • 🇨🇦Canada liquidcms

    I know that is not the intent of the module as it has config to select which content types you want to sync. That being said, its silly for it to be creating UUIDs for every piece of content before selecting which types you want to sync.

    Just trying to verify that that is what it is doing.. and verify that is a bug.

  • 🇮🇳India prashant.c Dharamshala

    This is written in the . install file and trigger during module installation through hook_installto create entries for each and every entity type found on your installation.

    However, not sure why it is done during installation, it should be through the configuration form for selected entities only.

Production build 0.71.5 2024