Closed ekes closed 1 year ago
I'm now seeing the following on drush cim, going to investigate further.
There were errors validating the config synchronization.
Entity type mismatch on rename. localgov_geo_type not equal to for existing configuration localgov_geo.localgov_geo_type.parking_zone and staged configuration geo_entity.geo_entity_type.parking_zone.
So the parking zones geo_entitiy and localgov_geo are now getting the same UUID...?
Code looks good. But I am having a different kind of error during the drush deploy
phase:
...
> [notice] Update started: user_update_10000
> [error] Route "entity.filter_format.edit_form" does not exist.
> [error] Update failed: user_update_10000
[error] Update aborted by: user_update_10000
[error] Finished performing updates.
The entity.filter_format.edit_form
route is declared in the filter module, so not sure why that's not found. Very strange.
I'm also now getting an error when viewing geo entity pages (rare but happens)
Error: Call to a member function getColumns() on bool in Drupal\Core\Entity\Query\Sql\Tables->addField() (line 246 of core/lib/Drupal/Core/Entity/Query/Sql/Tables.php). Drupal\Core\Entity\Query\Sql\Condition->compile(Object) (Line: 176) Drupal\Core\Entity\Query\Sql\Query->compile() (Line: 81) Drupal\Core\Entity\Query\Sql\Query->execute() (Line: 74) Drupal\preview_link\PreviewLinkHost->hasPreviewLinks(Object) (Line: 82) Drupal\preview_link\Access\PreviewLinkCanonicalRerouteAccessCheck->access(Object) call_user_func_array(Array, Array) (Line: 160) Drupal\Core\Access\AccessManager->performCheck('access_check.preview_link.canonical_rerouter', Object) (Line: 136) Drupal\Core\Access\AccessManager->check(Object, Object, Object, 1) (Line: 113) Drupal\Core\Access\AccessManager->checkRequest(Object, Object, 1) (Line: 107) Drupal\Core\Routing\AccessAwareRouter->checkAccess(Object) (Line: 92) Drupal\Core\Routing\AccessAwareRouter->matchRequest(Object) (Line: 105) Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(Object, 'kernel.request', Object) call_user_func(Array, Object, 'kernel.request', Object) (Line: 111) Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.request') (Line: 158) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Hmm... Maybe theres more going on in the DB updates, though its strange as a config sync should be creating the bundles and fields just the same.
I have now managed to get the import working with a combined branch of this branch, display migrations in #90, and the patch in Error when trying to edit an existing geo entity in an entity browser.
To get around the same UUIID on config import, I amended localgov_geo_update_update_8002 update with
if (empty($geo_type)) {
unset($geo_type_values['uuid']);
unset($geo_type_values['_core']);
$geo_type = GeoEntityType::create($geo_type_values);
}
This works when I do drush updb -y and drush cex. Then on a DB with the current Drupal 9 site I can go drush updb, see the skipped geos. Then do drush cr and drush cim and the import then works with drush deploy:hook.
To get around the same UUIID on config import, I amended localgov_geo_update_update_8002 update
I don't quite understand this one. You shouldn't be running 8002 more than once?
@Adnan-cds
[error] Update aborted by: user_update_10000
Can we assume this isn't related to this issue. Like shouldn't stop us merging this one?
Can we assume this isn't related to this issue.
Yes, you can assume so :)
I don't quite understand this one. You shouldn't be running 8002 more than once?
It's only run once, but you end up with both a localgov_geo_type.parking_zones and geo_entity_type.parking_zones with the same UUID.
@andybroomfield might have another commit to push back here to help
Merged into #90 we'll test that.
Add drush deploy function to automatically or manually update content entities after configuration has been sync'd.