Social sharing email breaks if there is no current route
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3385194. --> Reported by: [erik.erskine](https://www.drupal.org/user/375884) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Social sharing email link assumes that <code>$routeMatch-&gt;getRouteName()</code> is not null. This isn't always the case, eg during search indexing triggered via drush.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>Add <code>{{ global_variables.social_sharing.email }}</code> somewhere in a template that will get rendered during search indexing.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Test for <code>$routeMatch-&gt;getRouteName() != NULL</code> before using it.</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <p>Patch, tests.</p>
issue