Problem/Motivation

I have Salesforce mapping related to paragraph. If I want to delete MappedObject form via delete form, then I get an error Drupal\Core\Entity\Exception\UndefinedLinkTemplateException: No link template 'canonical' found for the 'paragraph' entity type in Drupal\Core\Entity\EntityBase->toUrl()
It caused by attempt to set redirect url to related entity on MappedObjectDeleteForm->submitForm().

Steps to reproduce

- Create Paragraph type
- Create Mapping related to this type
- Sync any entity to SF
- Open list of mapped object
- Try to delete object

Proposed resolution

Cover RedirectUrl preparation with try-catch. Use MappedObject list url as fallback
Actually it is not clear why do we need redirect to related entity.

Patch attached

Comments

vladimir.krupin created an issue. See original summary.

vladimir.krupin’s picture

StatusFileSize
new1.55 KB

Added conditions for case if drupal entity removed but MappedObject still exists

  • AaronBauman committed d88add4 on 5.0.x
    Issue #3311403 by vladimir.krupin: Cannot delete MappedObject entity...
aaronbauman’s picture

Status: Needs review » Fixed

Merged with slight adjustment. Thanks for the patch!

Status: Fixed » Closed (fixed)

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