Paragraph translation form crashes on toUrl('edit-form') with hidden untranslatable fields
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3590915. -->
Reported by: [refs](https://www.drupal.org/user/3743599)
Related to !171
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>Editing a non-default paragraph translation through Frontend Editing crashes:</p>
<pre>Drupal\Core\Entity\Exception\UndefinedLinkTemplateException<br>No link template 'edit-form' found for the 'paragraph' entity type</pre><p>It happens in core's <code>ContentTranslationHandler::entityFormSharedElements()</code>. It tries to build a warning link with <code>$entity->getUntranslated()->toUrl('edit-form')</code>. Paragraphs don't have that link template.</p>
<p>ParagraphTranslationHandler overrides entityFormAlter() but not entityFormSharedElements(), so the broken call still runs.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<ol>
<li>Make a paragraph bundle translatable with "hide non translatable fields" on.</li>
<li>Add at least one untranslatable field.</li>
<li>Create a node with this paragraph in the default language.</li>
<li>Add a translation in another language.</li>
<li>Open the Frontend Editing for the translated paragraph.</li>
</ol>
<p>The toUrl('edit-form') only runs when:</p>
<ul>
<li>editing a non-default translation</li>
<li>bundle has default_translation_affected_only</li>
<li>at least one untranslatable field gets hidden</li>
</ul>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Override <code>entityFormSharedElements()</code> in <code>ParagraphTranslationHandler</code>. Same pattern as the existing <code>entityFormAlter()</code> override.</p>
<p>When the entity has no edit-form link template, skip the link and show the warning text only.</p>
<p><strong>Why no link?</strong><br>
There is no good link target for a paragraph in this context:</p>
<ul>
<li>The standalone paragraphs_edit.edit_form is an admin route. Inside the Frontend Editing iframe it would render the full backend in the iframe.</li>
<li>Linking to the root parent's edit form (the node) has the same problem: the full node edit form inside the iframe.</li>
<li>Opening the link with target="_blank" pulls the user out of the editing flow into a new tab.</li>
</ul>
<p>The warning text alone is enough. The user can switch to the original language themselves.</p>
issue