After running Craft update I'm getting error on the meta author, meta description and meta keywords fields. Any idea how to resolve issue?
Recoverable error
Object of class Craft\ElementCriteriaModel could not be converted to string
Template Code:
{% set site_title = 'site title here' %}
{#
ENTRY FALLBACK
Not all pages have entries associated with them, e.g. search results, login page, etc.
#}
{% if entry.id is not defined %}
{% set entry = craft.entries.id(2) %}
{% endif %}
{#
HOMEPAGE DATA
Used as a fallback for when meta values don't exist in this entry
#}
{% set homepage_entry = craft.entries.id(2) %}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{{ entry.id == '2' ? site_title : entry.title ~ ' > ' ~ site_title }}</title>
<meta name="author" content="{{ entry.metaAuthor ? entry.metaAuthor : homepage_entry.metaAuthor }}" />
<meta name="description" content="{{ entry.metaDescription ? entry.metaDescription : homepage_entry.metaDescription }}" />
<meta name="keywords" content="{{ entry.metaKeywords ? entry.metaKeywords|join(',') : homepage_entry.metaKeywords|join(',') }}" />
<link rel="shortcut icon" href="images/favicon.ico" />
<link rel="stylesheet" type="text/css" href="/css/all.css">
<link rel="stylesheet" type="text/css" href="/css/nav.css">
</head>
Any idea what issue is, how to resolve and why this broke?
metaAuthor
an entries field?.first()