# Errors en oplossingen

Verzameling van errors die zijn voorgekomen tijdens Drupal development en de bijhorende oplossingen

# Overzicht

<div class="wiki-page-header has-sidebar-toggle detail-page-header border-bottom-0 gl-flex gl-flex-wrap !gl-pt-0" id="bkmrk-last-e"><header class="gl-my-5 gl-flex gl-flex-wrap gl-items-center gl-justify-between gl-gap-y-3 gl-w-full"><p class="callout warning">Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces</p>

</header></div><div class="js-wiki-page-content md" data-testid="wiki-page-content" id="bkmrk-oplossing-%C2%A0-%C2%A0-%C2%A0"><details><summary>Oplossing</summary>

Wijzig:

```
drush @self.staging sql-dump --structure-tables-list=cache,cache\_\* > staging.sql -y
```

Naar:

```
drush @self.staging sql-dump --extra-dump=--no-tablespaces --structure-tables-list=cache,cache\_\* > staging.sql -y
```

</details>---

</div><p class="callout warning">The command "/app/vendor/drush/drush/drush sql-query --strict=0 --file=/tmp/ID73339\_systaging\_20210329\_072955.sql.gz --file-delete --uri=default --root=/app/web" failed.</p>

<div class="js-wiki-page-content md" data-testid="wiki-page-content" id="bkmrk-oplossing-%C2%A0-%C2%A0-%C2%A0-%C2%A0"><details><summary>Oplossing</summary>

LOKAAL EN op HOSTING:

```
vendor/drush/drush/includes/drush.inc
```

lijn 358 volgende toevoegen:

```
'application/gzip',
```

</details></div><p class="callout warning">\[ERROR\] Configuration objects (core.entity\_view\_mode.paragraph.preview) provided by paragraphs already exist in active configuration</p>

---

<div class="js-wiki-page-content md" data-testid="wiki-page-content" id="bkmrk-oplossing"><details><summary>Oplossing</summary>

```
drush cdel core.entity_view_mode.paragraph.preview
```

</details></div><p class="callout warning">Column not found: 1054 Unknown column revision.revision\_uid in field list</p>

<details id="bkmrk-oplossing-2"><summary>Oplossing</summary>

```
drush entup
```

</details><p class="callout warning">Notice: Undefined index: name in /app/web/core/modules/field\_ui/src/Element/FieldUiTable.php on line 228</p>

<details id="bkmrk-oplossing-%C2%A0"><summary>Oplossing</summary>

- zoeken in config naar tabnaam van de manage form display
- vervang: region: hidden door region: content

</details><p class="callout warning">You have requested a non-existent service "cache.backend.null". Did you mea n one of these: "cache.backend.memory", "cache.backend.apcu", "cache.backen d.php"</p>

<details id="bkmrk-oplossing-%C2%A0-1"><summary>Oplossing</summary>

op server: sites/development.services.yml file moet aanwezig zijn

</details><p class="callout warning">TypeError: Argument 1 passed to Drupal\\webform\\WebformEntityReferenceManager::getParagraphWebformsRecursive() must implement interface Drupal\\Core\\Entity\\EntityInterface, null given, called in /app/web/modules/contrib/webform/src/WebformEntityReferenceManager.php on line 306 in Drupal\\webform\\WebformEntityReferenceManager-&gt;getParagraphWebformsRecursive() (line 281 of modules/contrib/webform/src/WebformEntityReferenceManager.php).</p>

<details id="bkmrk-oplossing-%C2%A0-2"><summary>Oplossing</summary>

webform laatste dev installeren

</details><p class="callout warning">/app/vendor/bin/drush: 1: /app/vendor/bin/drush: ../drush/drush/drush: not found</p>

<details id="bkmrk-oplossing-%C2%A0-3"><summary>Oplossing</summary>

- vendor/bin/drush verwijderen
- vendor/drush verwijderen
- composer install

</details><p class="callout warning">Module colorbutton has an entry in the system.schema key/value storage, but is not installed.</p>

<details id="bkmrk-oplossing-4"><summary>Oplossing</summary>

```
lando drush php-eval "\Drupal::keyValue('system.schema')->delete('colorbutton');"
```

</details><p class="callout warning">Command cim was not found. Drush was unable to query the database. As a result, many commands are unavailable. Re-run your command with --debug to see relevant log messages.</p>

<details id="bkmrk-oplossing-%C2%A0-4"><summary>Oplossing</summary>

Ga naar php my admin: er is iets mis met de DB zelf. bv db import is op nieuwe db gebeurd ipv in de huidige drupal8 db te importeren

</details><p class="callout warning">Failed to remove directory .drush/cache/factory: rmdir(.drush/cache/factory): Directory not empty</p>

<details id="bkmrk-oplossing-%C2%A0-5"><summary>Oplossing</summary>

drush cr opnieuw doen

</details><p class="callout warning">The command "ssh -o LogLevel=ERROR -StrictHostKeyChecking=no maxusmotorsch@ssh059.webhosting.be 'drush status --uri=https://dev.maxusmotors.ch --root=/data/sites/web/maxusmotorsch/subsites/dev.maxusmotors.ch/web'" failed. Exit Code: 255(Unknown error)</p>

<details id="bkmrk-oplossing-6"><summary>Oplossing</summary>

```plaintext
lokaal en op server:
rm vendor/bin/drush
rm -rf vendor/drush
composer install
chmod +x vendor/drush/drush/drush
chmod +x vendor/bin/drush
ssh naar remote
chmod +x vendor/drush/drush/drush
chmod +x vendor/bin/drush
-> in drush/sites/self.site.yml host: ssh059.webhosting.be vervangen door: host: 5.134.7.51

```

</details><p class="callout warning">Attempting to re-run cron while it is already running.</p>

<details id="bkmrk-oplossing-8"><summary>Oplossing</summary>

```
drush sqlq "DELETE FROM semaphore WHERE name = 'cron';"
```

</details><p class="callout warning">Either the path '/node/3829' is invalid or you do not have access to it.</p>

<details id="bkmrk-oplossing-10"><summary>Oplossing</summary>

-&gt; permissions: Link naar elke pagina  
-&gt; in sommige gevallen werkt deze patch ook:  
https://www.drupal.org/project/drupal/issues/3101344

</details><p class="callout warning">Fatal error: Allowed memory size of 1572864000 bytes exhausted</p>

<details id="bkmrk-oplossing-12"><summary>Oplossing</summary>

```
$settings['rebuild_access'] = TRUE;
```

http://henrad.lndo.site/core/rebuild.php

</details><p class="callout warning">The "--structure-tables-list" option does not accept a value.</p>

<details id="bkmrk-oplossing-14"><summary>Oplossing</summary>

PHP versie (lokaal en productie) naar 7.4 brengen

</details><p class="callout warning">Interface 'Psr\\Cache\\CacheItemPoolInterface' not found</p>

<details id="bkmrk-oplossing-16"><summary>Oplossing</summary>

```
git rm --cached vendor/psr/cache
git rm --cached vendor/psr/cache/.git
git add .
git commit -am "fixed google analytics inside the website"
git push
```

</details>---

<p class="callout warning">Changing an existing embedded media's alignment or alt data attributes does not get saved with CKEditor  
D9.4 [https://www.drupal.org/files/issues/2022-04-13/3102249-42.patch](https://www.drupal.org/files/issues/2022-04-13/3102249-42.patch)</p>

<p class="callout warning">requires ext-imagick \* -&gt; the requested PHP extension imagick is missing from your system</p>

<details id="bkmrk-oplossing-%C2%A0-%C2%A0"><summary>Oplossing</summary>

Gebruik --ignore-platform-reqs:

```
composer require drupal/geolocation --ignore-platform-reqs
```

</details><p class="callout warning">Installation request for drupal/file\_mdm (locked at 1.1.0, required as ^1.1) -&gt; satisfiable by drupal/file\_mdm\[1.1.0\].</p>

<details id="bkmrk-oplossing-18"><summary>Oplossing</summary>

```
composer require 'drupal/image_effects:^3.0' --no-update
composer require 'drupal/file_mdm:^2.1' --no-update
composer update drupal/image_effects drupal/file_mdm --with-dependencies
```

</details><p class="callout warning">The "composer/installers" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.</p>

<details id="bkmrk-oplossing-%C2%A0-6"><summary>Oplossing</summary>

composer.lock verwijderen  
vendor folder verwijderen  
composer update --with-all-dependencies --prefer-dist

</details><p class="callout warning">polyfill-php81/bootstrap.php): failed to open stream</p>

<details id="bkmrk-oplossing-20"><summary>Oplossing</summary>

```
rm -rf vendor composer.lock && composer clearcache && composer install
```

  
(- rechten van sites/default aanpassen naar 755)

```
rm -rf vendor/symfony
composer install
```

</details><p class="callout warning">PHP Warning: require(vendor/composer/../phpseclib/phpseclib/phpseclib/bootstrap.php): failed to open stream: No such file or directory in /data/sites/web/albintrabe/subsites/development/vendor/composer/autoload\_real.php on line 75</p>

<details id="bkmrk-oplossing-22"><summary>Oplossing</summary>

```
-> composer.json aanpassen:
"remove-git-submodules": [
            "echo \"Starting to remove all .git subfolders\";",
            "find ./vendor -mindepth 2 -type d -name .git | xargs rm -rf",
            "find ./web/modules/contrib -mindepth 2 -type d -name .git | xargs rm -rf",
            "find ./web/modules/custom -mindepth 2 -type d -name .git | xargs rm -rf",
            "echo \"Finished removing .git subfolders\";"
        ],
-> volgende uitvoeren in shell:
rm -rf vendor composer.lock && composer clearcache && composer install
OF
er zit ergens een .git gecommit.
git rm --cached vendor/google/apiclient
git rm --cached vendor/google/apiclient-services
git rm --cached vendor/google/auth
git rm --cached vendor/phpseclib/phpseclib
git add .
git commit -am "removed cached .git subfodlers"
```

</details><p class="callout warning">psr/container 1.1.2 requires php &gt;=7.4.0 -&gt; your php version (7.3.33) does not satisfy that requirement</p>

<details id="bkmrk-oplossing-24"><summary>Oplossing</summary>

```
-> php versie vastleggen in composer.json:
"config": {
        "preferred-install": "dist",
        "autoloader-suffix": "Drupal8",
        "sort-packages": true,
        "optimize-autoloader": true,
        "platform": {
            "php": "7.3.33"
        },
        "allow-plugins": {
            "composer/installers": true,
            "kylekatarnls/update-helper": true,
            "cweagans/composer-patches": true,
            "drupal/console-extend-plugin": true,
            "drupal/core-composer-scaffold": true,
            "wikimedia/composer-merge-plugin": true,
            "zaporylie/composer-drupal-optimizations": true
        }
    },
-> dan composer update runnen
```

</details><p class="callout warning">segmentation fault</p>

```
rm -rf vendor/
composer install
```

<p class="callout warning">Problem 1 - drupal/core-recommended\[9.3.0-beta1, ..., 9.3.0-beta2\] require symfony/serializer v4.4.33 -&gt; satisfiable by symfony/serializer\[v4.4.33\]. - Conclusion: don't install symfony/serializer v4.4.33 (conflict analysis result) - drupal/core-recommended\[9.3.0-beta3, ..., 9.4.x-dev\] require symfony/serializer v4.4.35 -&gt; satisfiable by symfony/serializer\[v4.4.35\]. - Conclusion: don't install symfony/serializer v4.4.35 (conflict analysis result) - symfony/serializer v4.4.31 conflicts with phpdocumentor/reflection-docblock 2.0.5. - symfony/serializer v4.4.31 conflicts with phpdocumentor/reflection-docblock 2.0.0. - symfony/serializer v4.4.31 conflicts with phpdocumentor/reflection-docblock 2.0.0a1. - drupal/core-recommended 9.3.0-alpha1 requires symfony/serializer v4.4.31 -&gt; satisfiable by symfony/serializer\[v4.4.31\]. - Root composer.json requires drupal/core-recommended ^9.3 -&gt; satisfiable by drupal/core-recommended\[9.3.0-alpha1, ..., 9.4.x-dev\]. - Root composer.json requires phpdocumentor/reflection-docblock ^2.0 -&gt; satisfiable by phpdocumentor/reflection-docblock\[2.0.0a1, ..., 2.0.5\].</p>

```
composer remove phpdocumentor/reflection-docblock --no-update
```

<p class="callout warning">fatal: unable to checkout working tree warning: Clone succeeded, but checkout failed.</p>

<details id="bkmrk-oplossing-26"><summary>Oplossing</summary>

```
git reset
git checkout *
```

</details><p class="callout warning">error: The following untracked working tree files would be overwritten by merge:</p>

<details id="bkmrk-oplossing-28"><summary>Oplossing</summary>

```
git clean -d -n
git clean -d -f
```

</details><p class="callout warning">error: The following untracked working tree files would be overwritten by checkout:</p>

<details id="bkmrk-oplossing-30"><summary>Oplossing</summary>

```
git checkout -f production
```

</details>---

**Drupal module handmatig disabled/unisntallen als het via drush vast hangt**

```
lando drush -v eval "\$module_data = \Drupal::config('core.extension')->get('module'); unset(\$module_data['http2_server_push']); \Drupal::configFactory()->getEditable('core.extension')->set('module', \$module_data)->save();"
```

<p class="callout warning">Probleem starten db container</p>

<details id="bkmrk-oplossing-32"><summary>Oplossing</summary>

```
lando poweroff
lando rebuild -s database
lando start
```

</details><p class="callout warning">lando: ERROR: for ssangyong\_node\_1 Cannot start service node: driver failed programming external connectivity on endpoint ssangyong\_node\_1</p>

<details id="bkmrk-oplossing-%C2%A0-7"><summary>Oplossing</summary>

```
netstatfor a in 'docker ps -a -q'; do echo "Stopping container - $a"; docker stop $a; donefor a in 'docker ps -a -q' do echo "Stopping container - $a" docker stop $a done
```

</details><p class="callout warning">lando DB problemen</p>

<details id="bkmrk-oplossing-34"><summary>Oplossing</summary>

docker ps  
-&gt; kopieer container id van database container  
docker exec -ti 545ee4f69564 /bin/sh

</details><p class="callout warning">OCI runtime exec failed: exec failed: container\_linux.go:349: starting container process caused "exec format error": unknow</p>

<details id="bkmrk-oplossing-36"><summary>Oplossing</summary>

```
OPLOSSING 1: Kijk na of je in de root folder van je project zit
OPLOSSING 2:
rm vendor/bin/drush
rm -rf vendor/drush
composer install
OPLOSSING 3:
lando file drush toevoegen:
tooling:
  drush:
    service: appserver
    cmd:
      - "vendor/drush/drush/drush"
```

</details><p class="callout warning">OCI runtime exec failed: exec failed: container\_linux.go:349: starting container process caused "function not implemented": unknown</p>

<details id="bkmrk-oplossing-%C2%A0-8"><summary>Oplossing</summary>

docker herstarten

</details><p class="callout warning">attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408</p>

<details id="bkmrk-oplossing-38"><summary>Oplossing</summary>

```
lando ssh --user root
nano /etc/ImageMagick-6/policy.xml
find the line <policy domain="coder" rights="none" pattern="PDF" /> and replace "none" by "read|write"
lando restart
```

</details><p class="callout warning">GuzzleHttp\\Exception\\ConnectException: cURL error 6: Could not resolve host: updates.drupal.org (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) in GuzzleHttp\\Handler\\CurlFactory::createRejection() (Zeile 200 in /app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php).</p>

<details id="bkmrk-oplossing-40"><summary>Oplossing</summary>

```
cd /etc/docker

sudo touch daemon.json

sudo nano daemon.json

toevoegen en opslaan:

{
	"dns": ["8.8.8.8", "8.8.4.4"]
}

terminal: terug naar je project folder gaan

lando stop

sudo service docker stop

sudo service docker start

lando start
```

</details><p class="callout warning">Error generating document: Failed to generate PDF: ../vendor/rvanlaak/wkhtmltopdf-amd64-centos7/bin/wkhtmltopdf-amd64: error while loading shared libraries: libpng15.so.15: cannot open shared object file: No such file or directory</p>

<details id="bkmrk-oplossing-42"><summary>Oplossing</summary>

```
lando ssh
find . -iname libpng*
cd /home
wget 'https://sourceforge.net/projects/libpng/files/libpng15/1.5.30/libpng-1.5.30.tar.gz'
tar -xvf libpng-1.5.30.tar.gz
rm libpng-1.5.30.tar.gz
cd rm libpng-1.5.30
./configure --prefix=/usr/local/libpng
make check
make install
make check
find / -iname libpng15.so*
now we will create a NEW LINK (shortcut) of that file to "/usr/lib/":
ln -s /usr/local/libpng/lib/libpng15.so.15 /usr/lib/libpng15.so.15
```

</details><p class="callout warning">chmod: cannot operate on dangling symlink ‘vendor/bin/drush’</p>

<details id="bkmrk-oplossing-%C2%A0-%C2%A0-1"><summary>Oplossing</summary>

```
unlink vendor/bin/drush
git add .
git commit -am "unlinked vendor/bin/drush"
git push
composer install
git add .
git commit -am "new composer install to finish unlinking vendor/bin/drush"
```

</details><p class="callout warning">PHP Fatal error: Uncaught Error: Class 'Drupal\\Core\\Database\\Database' not found in /usr/local/drush/vendor/drush/drush/src/Sql/SqlBase.php:102</p>

`-> ofwel fout pad bij een environment in self.site.yml, of mogelijk geen vendor of vendor/drush folder ofzo op doel hosting`

<p class="callout warning">The zip extension and unzip command are both missing, skipping.</p>

`sudo apt-get install php-zip`

<p class="callout warning">Error: Undefined class constant 'MYSQL\_ATTR\_USE\_BUFFERED\_QUERY' in /home/pc054/projects/ssangyong/web/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php on line 404 #0 /home/pc054/projects/ssangyong/web/core/lib/Drupal/Core/Database/Database.php(374): Drupal\\Core\\Database\\Driver\\mysql\\Connection::open()</p>

`sudo apt-get install php-mysql`

<p class="callout warning">error 500: Premature end of script headers: index.php</p>

<details id="bkmrk-oplossing-%C2%A0-9"><summary>Oplossing</summary>

In elke service.yml file (zowel development als default):

```
parameters:
  http.response.debug_cacheability_headers: false
```

</details><p class="callout warning">ImagickException: cache resources exhausted</p>

<details id="bkmrk-oplossing-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-"><summary>Oplossing</summary>

ImageMagick memory aanpassen door custom policy aan te maken: Ga via SSH naar de hosting.

`cd ~`

`mkdir .config`

`cd .config`

`mkdir ImageMagick`

`cp /etc/ImageMagick-6/policy.xml ~/.config/ImageMagick`

`nano ~/.config/ImageMagick/policy.xml`

Aanpassingen:

`policy domain="coder" rights="read|write" pattern="{AI, PSD, PDF, PS, PS2, PS3, EPS, XPS}"`

`policy domain="resource" name="memory" value="1GiB"`

`policy domain="resource" name="map" value="1GiB"`

`policy domain="resource" name="area" value="1GiB"`

`policy domain="resource" name="disk" value="5GiB"`

In lokaal DDEV project:- bewerk .ddev/web-build/Dockerfile- zie DAM voor aanpassing en voor policy.xml file.

</details><p class="callout warning">Google \\ Protobuf \\ Internal \\ GPBDecodeException: Error occurred during parsing: Fail to push limit.</p>

<details id="bkmrk-oplossing-%C2%A0-11"><summary>Oplossing</summary>

In elke service.yml file (zowel development als default):

```
rm -rf vendor/google/analytics-data
ddev composer install
```

.gitattributes file aanpassen om automatische line endings te vermijden bij git commit:

```
vendor/google/analytics-data/** -text diff
```

</details><p class="callout warning">SameSite cookie attribute This attribute should be explicitly set to Lax, Strict or None.</p>

<details id="bkmrk-oplossing-%C2%A0-13"><summary>Oplossing</summary>

In elke service.yml file (zowel development als default) 'cookie\_samesite: Lax' toevoegen bij session.storage.options:

```
parameters:
   session.storage.options: { cookie_samesite: Lax, gc_probability: 1, gc_divisor: 100, gc_maxlifetime: 200000, cookie_lifetime: 2000000, sid_length: 48, sid_bits_per_character: 6 }
```

</details><p class="callout warning">Transaction isolation level REPEATABLE-READ The recommended level for Drupal is "READ COMMITTED"</p>

<details id="bkmrk-oplossing-%C2%A0-15"><summary>Oplossing</summary>

settings.db.php aanpassen en onderaan init\_commands toevoegen:

```
$databases['default']['default'] = array (
  'database' => 'xxxxxxxxxx',
  'username' => 'xxxxxxxxxx',
  'password' => 'xxxxxxxxxx',
  'prefix' => '',
  'host' => 'xxxxxxxxxx',
  'port' => '3306',
  'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
  'driver' => 'mysql',
  'init_commands' => [
    'isolation_level' => 'SET SESSION transaction_isolation=\'READ-COMMITTED\'',
  ],
);
```

</details><p class="callout warning">Het is mogelijk onveilig om oEmbed-inhoud vanaf hetzelfde domein als de Drupal site weer te geven in een frame, omdat dan externe code uitgevoerd zou kunnen worden</p>

<details id="bkmrk-oplossing-%C2%A0-17"><summary>Oplossing</summary>

Komt wrs van Media type 'youtube\_video'. Bekijken of je dit wel nodig hebt in je project.

</details><p class="callout warning">Creation of dynamic property Drupal\\layout\_builder\\SectionComponent::$legacyAdditionalModuleKey is deprecated</p>

<details id="bkmrk-oplossing-in-een-.mo"><summary>Oplossing</summary>

in een .module file toevoegen:

```
use Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage;
use Drupal\node\Entity\Node;
```

```
/**
 * Usage: drush php:eval "_fix_sections_d11();"
 */
function _fix_sections_d11() {
  // Get all Layoutbuilder nodes.
  $nids = \Drupal::entityQuery('node')->accessCheck(FALSE)->condition('layout_builder__layout', '', '<>')->execute();
  $nodes = Node::loadMultiple($nids);

  $count = count($nodes);
  $node_index = 0;

  echo "Processing $count nodes to get all sections\n";

  // Loop all Layout Builder nodes.
  foreach ($nodes as $node) {
    $resave_node = FALSE;
    $node_index++;
    $section_index = 0;
    $nid = $node->id();

    // Get all sections for the current node.
    /** @var \Drupal\layout_builder\Entity\LayoutEntityDisplayInterface $layout */
    $layout = $node->get(OverridesSectionStorage::FIELD_NAME);
    /** @var \Drupal\layout_builder\Section[] $sections */
    $sections = $layout->getSections();
    foreach ($sections as &$section) {

      $section_index++;
      $component_index = 0;

      // Get all components for the current section.
      $components = $section->getComponents();
      foreach ($components as $component) {

        $component_index++;

        echo "- Processing node $nid - section $section_index - component $component_index:";

        // Get all variables of the current component.
        $object_vars = get_object_vars($component);

        // Validate: If there are no variables, then there certainly will not be any legacyAdditionalModuleKey variable.
        if (empty($object_vars)) {
          echo " ----- DONE! it does NOT contain legacyAdditionalModuleKey\n";
          continue;
        }

        // We cannot simply use isset() because that does not work with binary strings like $object_vars["\x00*\x00legacyAdditionalModuleKey"].
        // Instead, convert to json string and see if that contains legacyAdditionalModuleKey.
        $json = json_encode($object_vars);
        // Validate.
        if (!str_contains($json, '\u0000*\u0000legacyAdditionalModuleKey')) {
          echo " ----- DONE! it does NOT contain legacyAdditionalModuleKey\n";
          continue;
        }

        // If we are here, the $component has a legacyAdditionalModuleKey variable.
        // To fix it, we convert the object to array and then create object again from that array.
        // This gets rid of the legacyAdditionalModuleKey!.
        echo " ----- It DOES contain legacyAdditionalModuleKey !\n";
        $component_array = $component->toArray();
        $new_component = $component->fromArray($component_array);
        $section->insertAfterComponent($component->getUuid(), $new_component);
        $section->removeComponent($component->getUuid());
        $resave_node = TRUE;
        echo "-- Fixed the section component !\n";
      }
      if ($resave_node) {
        $node->save();
      }
    }
  }
}
```

</details>