Social sharing email breaks if there is no current route

Created on 4 September 2023, 10 months ago
Updated 22 November 2023, 7 months ago

Problem/Motivation

Social sharing email link assumes that $routeMatch->getRouteName() is not null. This isn't always the case, eg during search indexing triggered via drush.

Steps to reproduce

Add {{ global_variables.social_sharing.email }} somewhere in a template that will get rendered during search indexing.

Proposed resolution

Test for $routeMatch->getRouteName() != NULL before using it.

Remaining tasks

Patch, tests.

🐛 Bug report
Status

Fixed

Version

2.2

Component

Code

Created by

🇸🇪Sweden erik.erskine

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024