Problem/Motivation
drush tome:export -y creates a content export missing users, that can not be installed with drush tome:install
Steps to reproduce
1. Open this project in gitpod
https://gitpod.io/#https://github.com/Realityloop/starterkit-drupal-foun...
2. Once the install process has completed, break terminal with CTRL/CMD+C
3. Change to the drupal directory
cd ../drupal
4. Enter DDEV ssh
ddev ssh
5. Optionally confirm Tome import works
drush tome:import -y
6. Update tome to 1.9
composer require 'drupal/tome:^1.9'
7. Clear cache for good measure
drush cr
8. Execute Tome Export after update
drush tome:export -y
Structure of generated meta/index.json
{
"consumer.a72faba4-778b-4b9a-a867-cefeff170d1c": [
"user.71ff0341-88b1-40c6-bf6a-1131b20cd36a"
]
}
9. Inspect drupal/content directory in the gitpod IDE's file explorer and see that there are no user entities
Only 1 file gets created in content dir, in my instance this was consumer.a72faba4-778b-4b9a-a867-cefeff170d1c.json
10. Execute Tome import and see that it will fail
drush tome:install -y
gitpod@DruxtFoundry-web:/var/www/html$ drush tome:install -y
// You are about to DROP all tables in your local database and re-install Tome. Do you want to continue?: yes.
In SiteProcess.php line 214:
The command "/var/www/html/vendor/bin/drush tome:import --yes --uri=https://8080-realityloop-starterkitd-306rtquzkcv.ws-us79.gitpod.io --root=/var/www/html/web" failed.
Exit Code: 1(General error)
Working directory:
Output:
================
[ERROR] Errors encountered when importing content:
[ERROR] Error when running "'/var/www/html/vendor/bin/drush' 'tome:import-content'
'consumer.a72faba4-778b-4b9a-a867-cefeff170d1c'":
In EntityReferenceFieldItemNormalizer.php line 90:
No "user" entity found with UUID "71ff0341-88b1-40c6-bf6a-1131b20cd36a" for field "0".
Error Output:
================
gitpod@DruxtFoundry-web:/var/www/html$ Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 3327305-4.patch | 1.08 KB | samuel.mortenson |
Comments
Comment #2
realityloop commentedComment #3
dpagini commentedI'm also having some issues with the 1.9 upgrade. If I have my site, and upgrade to 1.9, and then I do a `drush tome:export` - it's actually deleting my users/taxonomy_terms/path_alias entities, even though they are still in my site.
I'm not sure if this is the same issue above, but it seems maybe close...
Comment #4
samuel.mortensonSorry for the delay - holidays and all that.
This is rather embarrassing, but luckily simple? I had to add returns to all my Symfony commands and accidentally added them before the end bracket of two for loops, causing installs (imports) and exports to be broken after the first deleted/exported entity.
Could you try this patch for me? I can commit and do a new release as early as tomorrow. Thanks!
Comment #5
larowlanNice easy fix in the end 💪
Comment #7
samuel.mortensonCommitted, will release in a second.
Comment #8
dpagini commentedI see this was already tested, merged and released. You are very quick. =)
Just confirming that the patch, and now the new release, is working for me again just as the 1.8 release was. Thank you!