Problem/Motivation
The update to >= tome-1.9 breaks static site generation for me. Using the webGUI however works.
Steps to reproduce
drush -l my.domain.org tome:static
[warning] array_flip(): Can only flip STRING and INTEGER values! EntityStorageBase.php:312
[warning] array_flip(): Can only flip STRING and INTEGER values! EntityStorageBase.php:312
[warning] array_flip(): Can only flip STRING and INTEGER values! EntityStorageBase.php:312
[warning] array_flip(): Can only flip STRING and INTEGER values! EntityStorageBase.php:312
[warning] array_flip(): Can only flip STRING and INTEGER values! EntityStorageBase.php:312
[warning] array_flip(): Can only flip STRING and INTEGER values! EntityStorageBase.php:312
[warning] array_flip(): Can only flip STRING and INTEGER values! EntityStorageBase.php:312
[warning] array_flip(): Can only flip STRING and INTEGER values! EntityStorageBase.php:312
[warning] array_flip(): Can only flip STRING and INTEGER values! EntityStorageBase.php:312
Generating static HTML...
120/120 [ββββββββββββββββββββββββββββ] 100%
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'/,/contact,/facets-block-ajax,/sitemap.xml,/sitemap.xsl' '--return-json' '--process-count=5'
'--uri=my.domain.org'" after failure...
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'/rss.xml,/node,/veranstaltungen-colloquien-old,/veranstaltungen-colloquien,_entity:node:de:1'
'--return-json' '--process-count=5' '--uri=my.domain.org'" after failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'/,/contact,/facets-block-ajax,/sitemap.xml,/sitemap.xsl' '--return-json' '--process-count=5'
'--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:9,_entity:node:de:8,_entity:node:de:21,_entity:node:de:22,_entity:node:de:23'
'--return-json' '--process-count=5' '--uri=my.domain.org'" after failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'/rss.xml,/node,/veranstaltungen-colloquien-old,/veranstaltungen-colloquien,_entity:node:de:1'
'--return-json' '--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:14,_entity:node:de:66,_entity:node:de:18,_entity:node:de:68,_entity:node:de:2'
'--return-json' '--process-count=5' '--uri=my.domain.org'" after failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:9,_entity:node:de:8,_entity:node:de:21,_entity:node:de:22,_entity:node:de:23'
'--return-json' '--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:27,_entity:node:de:48,_entity:node:de:42,_entity:node:de:50,_entity:node:de:39'
'--return-json' '--process-count=5' '--uri=my.domain.org'" after failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:14,_entity:node:de:66,_entity:node:de:18,_entity:node:de:68,_entity:node:de:2'
'--return-json' '--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:26,_entity:node:de:36,_entity:node:de:32,_entity:node:de:45,_entity:node:de:53'
'--return-json' '--process-count=5' '--uri=my.domain.org'" after failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:27,_entity:node:de:48,_entity:node:de:42,_entity:node:de:50,_entity:node:de:39'
'--return-json' '--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:41,_entity:node:de:33,_entity:node:de:54,_entity:node:de:38,_entity:node:de:34'
'--return-json' '--process-count=5' '--uri=my.domain.org'" after failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:26,_entity:node:de:36,_entity:node:de:32,_entity:node:de:45,_entity:node:de:53'
'--return-json' '--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:37,_entity:node:de:46,_entity:node:de:47,_entity:node:de:55,_entity:node:de:43'
'--return-json' '--process-count=5' '--uri=my.domain.org'" after failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:41,_entity:node:de:33,_entity:node:de:54,_entity:node:de:38,_entity:node:de:34'
'--return-json' '--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:35,_entity:node:de:31,_entity:node:de:44,_entity:node:de:52,_entity:node:de:56'
'--return-json' '--process-count=5' '--uri=my.domain.org'" after failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:37,_entity:node:de:46,_entity:node:de:47,_entity:node:de:55,_entity:node:de:43'
'--return-json' '--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:40,_entity:node:de:77,_entity:node:de:76,_entity:node:de:78,_entity:node:de:74'
'--return-json' '--process-count=5' '--uri=my.domain.org'" after failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:35,_entity:node:de:31,_entity:node:de:44,_entity:node:de:52,_entity:node:de:56'
'--return-json' '--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:73,_entity:node:de:75,_entity:node:de:49,_entity:node:de:51,_entity:node:de:80'
'--return-json' '--process-count=5' '--uri=my.domain.org'" after failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:40,_entity:node:de:77,_entity:node:de:76,_entity:node:de:78,_entity:node:de:74'
'--return-json' '--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:79,_entity:node:de:81,_entity:node:de:94,_entity:node:de:19,_entity:node:de:84'
'--return-json' '--process-count=5' '--uri=my.domain.org'" after failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:73,_entity:node:de:75,_entity:node:de:49,_entity:node:de:51,_entity:node:de:80'
'--return-json' '--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:95,_entity:node:de:20,_entity:node:de:98,_entity:node:de:25,_entity:node:de:28'
'--return-json' '--process-count=5' '--uri=my.domain.org'" after failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:79,_entity:node:de:81,_entity:node:de:94,_entity:node:de:19,_entity:node:de:84'
'--return-json' '--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:29,_entity:node:de:30,_entity:node:de:24,_entity:node:de:61,_entity:node:de:4'
'--return-json' '--process-count=5' '--uri=my.domain.org'" after failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:95,_entity:node:de:20,_entity:node:de:98,_entity:node:de:25,_entity:node:de:28'
'--return-json' '--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:70,_entity:node:de:97,_entity:node:de:64,_entity:node:de:67,_entity:node:de:82'
'--return-json' '--process-count=5' '--uri=my.domain.org'" after failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:29,_entity:node:de:30,_entity:node:de:24,_entity:node:de:61,_entity:node:de:4'
'--return-json' '--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:85,_entity:node:de:86,_entity:node:de:87,_entity:node:de:88,_entity:node:de:89'
'--return-json' '--process-count=5' '--uri=my.domain.org'" after failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:70,_entity:node:de:97,_entity:node:de:64,_entity:node:de:67,_entity:node:de:82'
'--return-json' '--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:90,_entity:node:de:91,_entity:node:de:92,_entity:node:de:93,_entity:node:de:83'
'--return-json' '--process-count=5' '--uri=my.domain.org'" after failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:85,_entity:node:de:86,_entity:node:de:87,_entity:node:de:88,_entity:node:de:89'
'--return-json' '--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:63,_entity:node:de:57,_entity:taxonomy_term:de:1,_entity:taxonomy_term:de:2,_entity:
taxonomy_term:de:3' '--return-json' '--process-count=5' '--uri=my.domain.org'" after
failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:90,_entity:node:de:91,_entity:node:de:92,_entity:node:de:93,_entity:node:de:83'
'--return-json' '--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:taxonomy_term:de:4,_entity:taxonomy_term:de:8,_entity:taxonomy_term:de:9,_entity:taxonomy_te
rm:de:10,_entity:user:de:3' '--return-json' '--process-count=5' '--uri=my.domain.org'" after
failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:node:de:63,_entity:node:de:57,_entity:taxonomy_term:de:1,_entity:taxonomy_term:de:2,_entity:
taxonomy_term:de:3' '--return-json' '--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:user:de:6,_entity:user:de:12,_entity:user:de:17,_entity:user:de:19,_entity:user:de:403'
'--return-json' '--process-count=5' '--uri=my.domain.org'" after failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:taxonomy_term:de:4,_entity:taxonomy_term:de:8,_entity:taxonomy_term:de:9,_entity:taxonomy_te
rm:de:10,_entity:user:de:3' '--return-json' '--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:user:de:694,_entity:user:de:6534,_entity:user:de:9787,_entity:user:de:16707,_entity:user:de:
22280' '--return-json' '--process-count=5' '--uri=my.domain.org'" after failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:user:de:6,_entity:user:de:12,_entity:user:de:17,_entity:user:de:19,_entity:user:de:403'
'--return-json' '--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:user:de:22573,_entity:user:de:26816,_entity:user:de:35466,_entity:user:de:35468,_entity:user
:de:39577' '--return-json' '--process-count=5' '--uri=my.domain.org'" after failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:user:de:694,_entity:user:de:6534,_entity:user:de:9787,_entity:user:de:16707,_entity:user:de:
22280' '--return-json' '--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'/de,/de/contact,/de/facets-block-ajax,/de/sitemap.xml,/de/sitemap.xsl' '--return-json'
'--process-count=5' '--uri=my.domain.org'" after failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'_entity:user:de:22573,_entity:user:de:26816,_entity:user:de:35466,_entity:user:de:35468,_entity:user
:de:39577' '--return-json' '--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Retrying "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'/de/rss.xml,/de/node,/de/veranstaltungen-colloquien-old,/de/veranstaltungen-colloquien'
'--return-json' '--process-count=5' '--uri=my.domain.org'" after failure...
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'/de,/de/contact,/de/facets-block-ajax,/de/sitemap.xml,/de/sitemap.xsl' '--return-json'
'--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[ERROR] Error when running "'/usr/local/bin/drush -y -l my.domain.org' 'tome:static-export-path'
'/de/rss.xml,/de/node,/de/veranstaltungen-colloquien-old,/de/veranstaltungen-colloquien'
'--return-json' '--process-count=5' '--uri=my.domain.org'":
sh: 1: exec: /usr/local/bin/drush -y -l my.domain.org: not found
[OK] Exported static HTML and related assets.
(The warnings have always been there, this is not related, have not found a fix so far)
The steps 1 to 100 are much too fast, nothing is actually done. On a side note: The final statement should not be "OK".
Proposed resolution
Using the webGUI, it works.
If I undo the changes in
https://git.drupalcode.org/project/tome/-/commit/d50d1e8efdf8435cc5f71ae...
to modules/tome_static/src/Commands/StaticCommand.php
and re-add the escapeshellarg() parts:
$command = $this->executable . ' tome:static-export-path ' . escapeshellarg(implode(',', $chunk)) . ' --return-json --process-count=' . escapeshellarg($process_count) . ' --uri=' . escapeshellarg($uri);
it works again.
I am unsure what this does, but it is necessary. The paths I see getting handled by issuing "-v" do not contain any suspicious characters that would seem to need escaping.