Problem/Motivation

Would be nice if this module supported Entity Clone, in addition to (or instead of "Replicate" and "Field Tools" approach).

When using the Entity Clone module, the "Clone" option does appear in the dropbutton of each Site Setting.

When I click "clone" to duplicate a site_setting_entity_type, I'm first lead to a page to rename the label, but when I proceed I get the following error:

The website encountered an unexpected error. Please try again later.

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.site_setting_entity_type.canonical" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 206 of core/lib/Drupal/Core/Routing/RouteProvider.php).
Drupal\Core\Routing\UrlGenerator->getRoute('entity.site_setting_entity_type.canonical') (Line: 270)
Drupal\Core\Routing\UrlGenerator->generateFromRoute('entity.site_setting_entity_type.canonical', Array, Array, 1) (Line: 105)
Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute('entity.site_setting_entity_type.canonical', Array, Array, ) (Line: 765)
Drupal\Core\Url->toString() (Line: 133)
Drupal\Core\Form\FormSubmitter->redirectForm(Object) (Line: 80)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 595)
Drupal\Core\Form\FormBuilder->processForm('entity_clone_form', Array, Object) (Line: 323)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 163)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 74)
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: 270)
Drupal\shield\ShieldMiddleware->bypass(Object, 1, 1) (Line: 137)
Drupal\shield\ShieldMiddleware->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: 681)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Interestingly enough the entity is cloned with the new label I provided, but not the field or field config.

Steps to reproduce

  1. Install site settings and entity clone.
  2. Create a "Facebook" Site Settings Entity, in group "Social Links" with a field_link.
  3. Navigate to https://uofmncehd.ddev.site/entity_clone/site_setting_entity_type/facebo...
  4. Specify a new label "Twitter".

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jwilson3 created an issue. See original summary.

bobi-mel’s picture

Assigned: Unassigned » bobi-mel

bobi-mel’s picture

Assigned: bobi-mel » Unassigned
Status: Active » Needs review

In Drupal, a "canonical route" refers to a standardized or default route that is used for displaying a specific entity or content type. When it comes to configuration entities in Drupal, there isn't typically a canonical route because configuration entities are not meant to be displayed as content on their own.

I deleted this field and fixed this issue.

scott_euser made their first commit to this issue’s fork.

scott_euser’s picture

Status: Needs review » Fixed

Thank you!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

nigelcunningham’s picture

Would you consider doing a release with just this fix? Until it is released, people upgrading to 10.2 will need to also apply the merged patch instead of just updating the module to the latest stable.

Thanks!

scott_euser’s picture