Template Error

Impossible to access an attribute ("projectHandle") on a null variable.

/var/www/almascheepsbetimmeringen.nl/craft/templates/_layout.html(56)

44     {%- if description != '' %}
45     <meta name="description" content="{{ description }}" />
46     {% endif %}
47     
48     <title>{{ title }} - {{ siteName | t }}</title>
49     
50     <link rel="home" href="{{ siteUrl }}" />
51     
52     {#- OpenGraph properties -#}
53     {%- if entry is defined -%}
54     <meta property="og:title" content="{{ title }}" />
55     <meta property="og:type" content="website" />
56     <meta property="og:url" content="{{ entry.slug != 'project' ? entry.url : project is defined ? url('project') ~ '/' ~ project.projectHandle : '' }}" />
57     <meta property="og:site_name" content="{{ siteName }}" />
58     {# set facebook Image ID -#}
59     {%- set opengraphAssetId = 12 -%}
60     {%- set opengraphParams = {
61         mode: 'crop',
62         width: 300,
63         height: 300,
64         quality: 80,
65         format: 'png',
66     } -%}
67     <meta property="og:image" content="{{ siteMacro.imageUrl(craft.assets.id(opengraphAssetId).first(), opengraphParams) }}" />
68     <meta property="og:description" content="{{ description }}" />
2024-03-29 14:02:46 nginx/1.18.0 / Craft CMS 2.9.2