- Issue created by @mattsqd
When creating the static site drush tome:static
, it exports individual pages and gets their dependencies with a call to drush tome:static-export-path --return-json
. If your server is configured in a way that other software is outputting logs to stdout, it could interfere with the response being valid JSON.
I ran into this with New relic, but it could happen from any thing that creates stdout during a drush call, like the log_stdout module.
* Install and enable
https://www.drupal.org/project/log_stdout β
* Create an event subscriber with KernelEvents::REQUEST event.
* In that event, create log something \Drupal::logger('test')->info('stuff');
* Run drush tome:static-export-path / --return-json --process-count=5`
Note how the log message is part of the response? This will cause exportPaths
not to be able to parse the response as JSON and therefore no additional HTML assets will be created.
This is highly dependent on your environment, so I wouldn't say this is a bug. I just wanted to save others time if they ran into this.
Trim off any lines that are not JSON from the start of the response text.
Active
1.0
Tome Static