themes/devopsdays-theme/layouts/shortcodes/event_map.html reads coordinates before it checks whether there is anything to render:
{{- $e := partial "functions/get-event-data" . -}}
{{- $coords := split $e.coordinates "," -}}
{{- $lat := index $coords 0 -}}
{{- $lng := index $coords 1 -}}
{{- with $e.location_address -}}
<iframe ...
Two problems:
$lat and $lng are never used. The iframe is built from location_address. The three lines that compute them are dead.
- They break the build when
coordinates is blank. split on a nil value errors, and it happens outside the with guard, so it runs even for events that have no address at all.
This is a live trap rather than a theoretical one: utilities/docs/cancel-event.md instructs organizers to blank coordinates when cancelling an event. If that event's location.md still contains {{< event_map >}}, the whole site build fails.
coordinates is marked DEPRECATED in reference.md and nothing else consumes it.
Suggested fix: delete the three $coords/$lat/$lng lines.
Found while documenting the repo for AI coding assistants.
themes/devopsdays-theme/layouts/shortcodes/event_map.htmlreadscoordinatesbefore it checks whether there is anything to render:Two problems:
$latand$lngare never used. The iframe is built fromlocation_address. The three lines that compute them are dead.coordinatesis blank.spliton a nil value errors, and it happens outside thewithguard, so it runs even for events that have no address at all.This is a live trap rather than a theoretical one:
utilities/docs/cancel-event.mdinstructs organizers to blankcoordinateswhen cancelling an event. If that event'slocation.mdstill contains{{< event_map >}}, the whole site build fails.coordinatesis marked DEPRECATED inreference.mdand nothing else consumes it.Suggested fix: delete the three
$coords/$lat/$lnglines.Found while documenting the repo for AI coding assistants.