Exceptions
Exception
Twig\Error\ RuntimeError
Show exception properties
Twig\Error\RuntimeError {#1321 -lineno: 294 -rawMessage: "Neither the property "contactPhone" nor one of the methods "contactPhone()", "getcontactPhone()"/"iscontactPhone()"/"hascontactPhone()" or "__call()" exist and have public access in class "App\Entity\Site"." -source: Twig\Source {#846 -code: """ {% extends 'base.html.twig' %}\n \n {% block title %}\n \t{{ site.name }}\n \t- Détails du Site\n {% endblock %}\n {% block page_title %}Détails du Site\n {% endblock %}\n {% block page_sub_title %}\n \t{{ site.name }}\n {% endblock %}\n \n {% block body %}\n \t<div class="container-fluid">\n \t\t<div class="d-flex justify-content-between align-items-center mb-4">\n \t\t\t<div>\n \t\t\t\t<h1 class="h3 mb-0 text-gray-800">\n \t\t\t\t\t<i class="fas fa-building me-2"></i>\n \t\t\t\t\t{{ site.name }}\n \t\t\t\t</h1>\n \t\t\t</div>\n \t\t\t<div class="d-flex gap-2">\n \t\t\t\t<a href="{{ path('app_sites_registre') }}" class="btn btn-secondary">\n \t\t\t\t\t<i class="fas fa-arrow-left me-1"></i>\n \t\t\t\t\tRetour au registre\n \t\t\t\t</a>\n \t\t\t\t<a href="{{ path('app_sites_edit', {'id': site.id}) }}" class="btn btn-warning">\n \t\t\t\t\t<i class="fas fa-edit me-1"></i>\n \t\t\t\t\tModifier\n \t\t\t\t</a>\n \t\t\t</div>\n \t\t</div>\n \n \t\t<div class="row">\n \t\t\t<div class="col-lg-6">\n \t\t\t\t<div class="card shadow mb-4">\n \t\t\t\t\t<div class="card-header py-3">\n \t\t\t\t\t\t<h6 class="m-0 font-weight-bold text-primary">\n \t\t\t\t\t\t\t<i class="fas fa-info-circle me-2"></i>Informations générales\n \t\t\t\t\t\t</h6>\n \t\t\t\t\t</div>\n \t\t\t\t\t<div class="card-body">\n \t\t\t\t\t\t<div class="row">\n \t\t\t\t\t\t\t<div class="col-md-6">\n \t\t\t\t\t\t\t\t<p>\n \t\t\t\t\t\t\t\t\t<strong>Nom:</strong>\n \t\t\t\t\t\t\t\t\t{{ site.name }}</p>\n \t\t\t\t\t\t\t\t<p>\n \t\t\t\t\t\t\t\t\t<strong>Type:</strong>\n \t\t\t\t\t\t\t\t\t<span class="badge" style="background-color: {{ site.type == 'Infrastructure' ? '#ff3333' : site.type == 'Formation' ? '#33cc33' : site.type == 'Technologie' ? '#3366ff' : '#ffcc33' }};">\n \t\t\t\t\t\t\t\t\t\t{{ site.type|default('Non spécifié') }}\n \t\t\t\t\t\t\t\t\t</span>\n \t\t\t\t\t\t\t\t</p>\n \t\t\t\t\t\t\t\t<p>\n \t\t\t\t\t\t\t\t\t<strong>Type d'usage:</strong>\n \t\t\t\t\t\t\t\t\t{{ site.usageType|default('Non spécifié') }}</p>\n \t\t\t\t\t\t\t\t<p>\n \t\t\t\t\t\t\t\t\t<strong>Statut:</strong>\n \t\t\t\t\t\t\t\t\t{% if site.status == 1 %}\n \t\t\t\t\t\t\t\t\t\t<span class="badge bg-success">Actif</span>\n \t\t\t\t\t\t\t\t\t{% elseif site.status == 0 %}\n \t\t\t\t\t\t\t\t\t\t<span class="badge bg-danger">Inactif</span>\n \t\t\t\t\t\t\t\t\t{% else %}\n \t\t\t\t\t\t\t\t\t\t<span class="badge bg-warning">{{ site.status|default('Non spécifié') }}</span>\n \t\t\t\t\t\t\t\t\t{% endif %}\n \t\t\t\t\t\t\t\t</p>\n \t\t\t\t\t\t\t</div>\n \t\t\t\t\t\t\t<div class="col-md-6">\n \t\t\t\t\t\t\t\t<p>\n \t\t\t\t\t\t\t\t\t<strong>Adresse:</strong>\n \t\t\t\t\t\t\t\t\t<br>\n \t\t\t\t\t\t\t\t\t{{ site.adress|default('Non spécifiée') }}</p>\n \t\t\t\t\t\t\t\t<p>\n \t\t\t\t\t\t\t\t\t<strong>Coordonnées:</strong>\n \t\t\t\t\t\t\t\t\t{% if site.latitude and site.longitude %}\n \t\t\t\t\t\t\t\t\t\t<a href="https://www.google.com/maps?q={{ site.latitude }},{{ site.longitude }}" target="_blank" class="text-decoration-none">\n \t\t\t\t\t\t\t\t\t\t\t<i class="fas fa-map-marker-alt text-danger"></i>\n \t\t\t\t\t\t\t\t\t\t\t{{ site.latitude|number_format(4) }},\n \t\t\t\t\t\t\t\t\t\t\t{{ site.longitude|number_format(4) }}\n \t\t\t\t\t\t\t\t\t\t</a>\n \t\t\t\t\t\t\t\t\t{% else %}\n \t\t\t\t\t\t\t\t\t\tNon spécifiées\n \t\t\t\t\t\t\t\t\t{% endif %}\n \t\t\t\t\t\t\t\t</p>\n \t\t\t\t\t\t\t</div>\n \t\t\t\t\t\t</div>\n \n \t\t\t\t\t</div>\n \t\t\t\t</div>\n \t\t\t</div>\n \n \t\t\t<div class="col-lg-6">\n \t\t\t\t<div class="card shadow mb-4">\n \t\t\t\t\t<div class="card-header py-3">\n \t\t\t\t\t\t<h6 class="m-0 font-weight-bold text-primary">\n \t\t\t\t\t\t\t<i class="fas fa-map me-2"></i>Localisation\n \t\t\t\t\t\t</h6>\n \t\t\t\t\t</div>\n \t\t\t\t\t<div class="card-body p-0">\n \t\t\t\t\t\t{% if site.latitude and site.longitude %}\n \t\t\t\t\t\t\t<div id="site-map" style="height: 400px; width: 100%;"></div>\n \t\t\t\t\t\t{% else %}\n \t\t\t\t\t\t\t<div class="text-center py-5">\n \t\t\t\t\t\t\t\t<i class="fas fa-map-marked-alt fa-3x text-muted mb-3"></i>\n \t\t\t\t\t\t\t\t<p class="text-muted">Les coordonnées GPS ne sont pas disponibles pour ce site.</p>\n \t\t\t\t\t\t\t\t<a href="{{ path('app_sites_edit', {'id': site.id}) }}" class="btn btn-sm btn-primary">\n \t\t\t\t\t\t\t\t\t<i class="fas fa-edit me-1"></i>Ajouter des coordonnées\n \t\t\t\t\t\t\t\t</a>\n \t\t\t\t\t\t\t</div>\n \t\t\t\t\t\t{% endif %}\n \t\t\t\t\t</div>\n \t\t\t\t</div>\n \t\t\t</div>\n \t\t</div>\n \n \t\t<div class="row">\n \t\t\t<div class="col-lg-4">\n \t\t\t\t<div class="card shadow mb-4">\n \t\t\t\t\t<div class="card-header py-3">\n \t\t\t\t\t\t<h6 class="m-0 font-weight-bold text-primary">\n \t\t\t\t\t\t\t<i class="fas fa-info-circle me-2"></i>Détails supplémentaires\n \t\t\t\t\t\t</h6>\n \t\t\t\t\t</div>\n \t\t\t\t\t<div class="card-body">\n \t\t\t\t\t\t<div class="mb-3">\n \t\t\t\t\t\t\t\t<strong>Description:</strong><br>{{ site.description|default('Non spécifiée') }}\n \t\t\t\t\t\t</div>\n \t\t\t\t\t\t<div class="">\n \t\t\t\t\t\t\t\t<strong>Commentaires:</strong><br>{{ site.comment|default('Non spécifié') }}\n \t\t\t\t\t\t</div>\n \t\t\t\t\t</div>\n \t\t\t\t</div>\n \t\t\t</div>\n \t\t</div>\n \t\t<div class="row">\n \n \t\t\t<div class="col-lg-8 mb-4">\n \t\t\t\t<div class="card shadow mb-4">\n \t\t\t\t\t<div class="card-header py-3">\n \t\t\t\t\t\t<h6 class="m-0 font-weight-bold text-primary">\n \t\t\t\t\t\t\t<i class="fas fa-project-diagram me-2"></i>\n \t\t\t\t\t\t\tProjets du Site\n \t\t\t\t\t\t</h6>\n \t\t\t\t\t</div>\n \t\t\t\t\t<div class="card-body">\n \t\t\t\t\t\t<div class="table-responsive">\n \t\t\t\t\t\t\t<table class="table table-sm table-bordered">\n \t\t\t\t\t\t\t\t<thead class="thead-light">\n \t\t\t\t\t\t\t\t\t<tr>\n \t\t\t\t\t\t\t\t\t\t<th>Code</th>\n \t\t\t\t\t\t\t\t\t\t<th>Type</th>\n \t\t\t\t\t\t\t\t\t\t<th>Title</th>\n \t\t\t\t\t\t\t\t\t\t<th>Budget Prévu</th>\n \t\t\t\t\t\t\t\t\t\t<th>Budget Réalisé</th>\n \t\t\t\t\t\t\t\t\t\t<th>Taux Exécution</th>\n \t\t\t\t\t\t\t\t\t\t<th>Statut</th>\n \t\t\t\t\t\t\t\t\t</tr>\n \t\t\t\t\t\t\t\t</thead>\n \t\t\t\t\t\t\t\t<tbody>\n \t\t\t\t\t\t\t\t\t{% for project in site.projects %}\n \t\t\t\t\t\t\t\t\t\t<tr>\n \t\t\t\t\t\t\t\t\t\t\t<td>{{ project.code }}</td>\n \t\t\t\t\t\t\t\t\t\t\t<td>{{ project.type }}</td>\n \t\t\t\t\t\t\t\t\t\t\t<td>{{ project.title }}</td>\n \t\t\t\t\t\t\t\t\t\t\t<td class="text-right">{{ project.plannedBudget|number_format(2, ',', ' ') }}\n \t\t\t\t\t\t\t\t\t\t\t\t$</td>\n \t\t\t\t\t\t\t\t\t\t\t<td class="text-right">{{ project.realizedBudget|number_format(2, ',', ' ') }}\n \t\t\t\t\t\t\t\t\t\t\t\t$</td>\n \t\t\t\t\t\t\t\t\t\t\t<td class="text-right">\n \t\t\t\t\t\t\t\t\t\t\t\t{% if project.budgetExecutionRate %}\n \t\t\t\t\t\t\t\t\t\t\t\t\t<div class="progress" style="height: 20px;">\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class="progress-bar" role="progressbar" style="width: {{ project.budgetExecutionRate }}%" aria-valuenow="{{ project.budgetExecutionRate }}" aria-valuemin="0" aria-valuemax="100">\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{ project.budgetExecutionRate|number_format(1, ',', ' ') }}%\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n \t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n \t\t\t\t\t\t\t\t\t\t\t\t{% endif %}\n \t\t\t\t\t\t\t\t\t\t\t</td>\n \t\t\t\t\t\t\t\t\t\t\t<td>\n \t\t\t\t\t\t\t\t\t\t\t\t{% if project.status == 1 %}\n \t\t\t\t\t\t\t\t\t\t\t\t\t<span class="badge badge-warning">En Cours</span>\n \t\t\t\t\t\t\t\t\t\t\t\t{% elseif project.status == 2 %}\n \t\t\t\t\t\t\t\t\t\t\t\t\t<span class="badge badge-success">Terminé</span>\n \t\t\t\t\t\t\t\t\t\t\t\t{% else %}\n \t\t\t\t\t\t\t\t\t\t\t\t\t<span class="badge badge-secondary">Non Démarré</span>\n \t\t\t\t\t\t\t\t\t\t\t\t{% endif %}\n \t\t\t\t\t\t\t\t\t\t\t</td>\n \t\t\t\t\t\t\t\t\t\t</tr>\n \t\t\t\t\t\t\t\t\t{% endfor %}\n \t\t\t\t\t\t\t\t</tbody>\n \t\t\t\t\t\t\t</table>\n \t\t\t\t\t\t</div>\n \t\t\t\t\t</div>\n \t\t\t\t</div>\n \t\t\t</div>\n \n \t\t</div>\n \t</div>\n {% endblock %}\n \n {% block javascripts %}\n \t{{ parent() }}\n \t{% if site.latitude and site.longitude %}\n \t\t<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin="" />\n \t\t<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script>\n \t\t<script>\n \t\t\t// Couleurs pour les différents types de sites\n \t\t\tconst siteTypeColors = {\n \t\t\t\t'Siège Social': '#3b82f6',\n \t\t\t\t'Agence': '#10b981',\n \t\t\t\t'Guichet': '#f59e0b',\n \t\t\t\t'DAB': '#06b6d4',\n \t\t\t\t'default': '#6b7280'\n \t\t\t};\n \n \t\t\t// Fonction pour obtenir la couleur du type de site\n \t\t\tfunction getSiteTypeColor(type) {\n \t\t\t\treturn siteTypeColors[type] || siteTypeColors.default;\n \t\t\t}\n \n \t\t\tdocument.addEventListener('DOMContentLoaded', function() {\n \t\t\t\tconsole.log('Initialisation de la carte Leaflet pour le site:', {\n \t\t\t\t\tnom: '{{ site.name|e('js') }}',\n \t\t\t\t\tlatitude: {{ site.latitude }},\n \t\t\t\t\tlongitude: {{ site.longitude }},\n \t\t\t\t\ttype: '{{ site.type|e('js') }}'\n \t\t\t\t});\n \n \t\t\t\ttry {\n \t\t\t\t\t// Initialiser la carte Leaflet\n \t\t\t\t\tconst map = L.map('site-map').setView([{{ site.latitude }}, {{ site.longitude }}], 15);\n \n \t\t\t\t\tconsole.log('Carte Leaflet initialisée avec succès');\n \n \t\t\t\t\t// Ajouter la couche de tuiles OpenStreetMap\n \t\t\t\t\tL.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {\n \t\t\t\t\t\tattribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',\n \t\t\t\t\t\tmaxZoom: 19\n \t\t\t\t\t}).addTo(map);\n \n \t\t\t\t\tconsole.log('Couche de tuiles OpenStreetMap ajoutée');\n \n \t\t\t\t\t// Obtenir la couleur pour le type de site\n \t\t\t\t\tconst markerColor = getSiteTypeColor('{{ site.type|default("default") }}');\n \n \t\t\t\t\t// Créer une icône personnalisée pour le marqueur\n \t\t\t\t\tconst customIcon = L.divIcon({\n \t\t\t\t\t\tclassName: 'custom-marker',\n \t\t\t\t\t\thtml: `<div style="\n \t\t\t\t\t\t\tbackground-color: ${markerColor};\n \t\t\t\t\t\t\twidth: 30px;\n \t\t\t\t\t\t\theight: 30px;\n \t\t\t\t\t\t\tborder-radius: 50%;\n \t\t\t\t\t\t\tborder: 3px solid white;\n \t\t\t\t\t\t\tbox-shadow: 0 2px 6px rgba(0,0,0,0.3);\n \t\t\t\t\t\t\tdisplay: flex;\n \t\t\t\t\t\t\talign-items: center;\n \t\t\t\t\t\t\tjustify-content: center;\n \t\t\t\t\t\t">\n \t\t\t\t\t\t\t<i class="fas fa-map-marker-alt" style="color: white; font-size: 14px;"></i>\n \t\t\t\t\t\t</div>`,\n \t\t\t\t\t\ticonSize: [30, 30],\n \t\t\t\t\t\ticonAnchor: [15, 15],\n \t\t\t\t\t\tpopupAnchor: [0, -15]\n \t\t\t\t\t});\n \n \t\t\t\t\t// Créer le marqueur\n \t\t\t\t\tconst marker = L.marker([{{ site.latitude }}, {{ site.longitude }}], { icon: customIcon })\n \t\t\t\t\t\t.addTo(map);\n \n \t\t\t\t\tconsole.log('Marqueur ajouté à la carte');\n \n \t\t\t\t\t// Créer le popup avec les informations du site\n \t\t\t\t\tconst popupContent = `\n \t\t\t\t\t\t<div style="padding: 10px; min-width: 200px;">\n \t\t\t\t\t\t\t<h6 style="margin: 0 0 8px 0; color: #1f2937; font-weight: bold;">\n \t\t\t\t\t\t\t\t{{ site.name|e('js') }}\n \t\t\t\t\t\t\t</h6>\n \t\t\t\t\t\t\t<p style="margin: 4px 0; font-size: 14px;">\n \t\t\t\t\t\t\t\t<strong>Type:</strong>\n \t\t\t\t\t\t\t\t<span style="background-color: ${markerColor}; color: white; padding: 2px 6px; border-radius: 3px; font-size: 12px;">\n \t\t\t\t\t\t\t\t\t{{ site.type|default('Non spécifié')|e('js') }}\n \t\t\t\t\t\t\t\t</span>\n \t\t\t\t\t\t\t</p>\n \t\t\t\t\t\t\t{% if site.adress %}\n \t\t\t\t\t\t\t<p style="margin: 4px 0; font-size: 14px;">\n \t\t\t\t\t\t\t\t<strong>Adresse:</strong><br>\n \t\t\t\t\t\t\t\t{{ site.adress|e('js') }}\n \t\t\t\t\t\t\t</p>\n \t\t\t\t\t\t\t{% endif %}\n \t\t\t\t\t\t\t<p style="margin: 4px 0; font-size: 12px; color: #6b7280;">\n \t\t\t\t\t\t\t\t<i class="fas fa-map-marker-alt"></i>\n \t\t\t\t\t\t\t\t{{ site.latitude|number_format(4) }}, {{ site.longitude|number_format(4) }}\n \t\t\t\t\t\t\t</p>\n \t\t\t\t\t\t\t{% if site.contactPhone %}\n \t\t\t\t\t\t\t<p style="margin: 4px 0; font-size: 14px;">\n \t\t\t\t\t\t\t\t<strong>Téléphone:</strong> {{ site.contactPhone|e('js') }}\n \t\t\t\t\t\t\t</p>\n \t\t\t\t\t\t\t{% endif %}\n \t\t\t\t\t\t\t<div style="margin-top: 8px; text-align: center;">\n \t\t\t\t\t\t\t\t<a href="https://www.openstreetmap.org/?mlat={{ site.latitude }}&mlon={{ site.longitude }}&zoom=15"\n \t\t\t\t\t\t\t\t target="_blank" class="btn btn-sm btn-outline-primary" style="font-size: 11px;">\n \t\t\t\t\t\t\t\t\t<i class="fas fa-external-link-alt"></i> Voir sur OpenStreetMap\n \t\t\t\t\t\t\t\t</a>\n \t\t\t\t\t\t\t</div>\n \t\t\t\t\t\t</div>\n \t\t\t\t\t`;\n \n \t\t\t\t\t// Ajouter le popup au marqueur et l'ouvrir par défaut\n \t\t\t\t\tmarker.bindPopup(popupContent).openPopup();\n \n \t\t\t\t\tconsole.log('Popup ajouté et ouvert');\n \n \t\t\t\t\t// Ajouter un cercle autour du marqueur pour mieux le visualiser\n \t\t\t\t\tconst circle = L.circle([{{ site.latitude }}, {{ site.longitude }}], {\n \t\t\t\t\t\tcolor: markerColor,\n \t\t\t\t\t\tfillColor: markerColor,\n \t\t\t\t\t\tfillOpacity: 0.2,\n \t\t\t\t\t\tradius: 100\n \t\t\t\t\t}).addTo(map);\n \n \t\t\t\t\tconsole.log('Cercle de visualisation ajouté');\n \n \t\t\t\t\t// Animation de pulsation pour le cercle\n \t\t\t\t\tlet radius = 100;\n \t\t\t\t\tlet growing = true;\n \t\t\t\t\tlet opacity = 0.2;\n \n \t\t\t\t\tfunction animateCircle() {\n \t\t\t\t\t\tif (growing) {\n \t\t\t\t\t\t\tradius += 2;\n \t\t\t\t\t\t\topacity -= 0.01;\n \t\t\t\t\t\t\tif (radius >= 150 || opacity <= 0.05) {\n \t\t\t\t\t\t\t\tgrowing = false;\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t} else {\n \t\t\t\t\t\t\tradius -= 2;\n \t\t\t\t\t\t\topacity += 0.01;\n \t\t\t\t\t\t\tif (radius <= 100 || opacity >= 0.2) {\n \t\t\t\t\t\t\t\tgrowing = true;\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \n \t\t\t\t\t\tcircle.setRadius(radius);\n \t\t\t\t\t\tcircle.setStyle({ fillOpacity: opacity });\n \n \t\t\t\t\t\trequestAnimationFrame(animateCircle);\n \t\t\t\t\t}\n \n \t\t\t\t\t// Démarrer l'animation\n \t\t\t\t\tsetTimeout(() => animateCircle(), 1000);\n \n \t\t\t\t\t// Ajouter les contrôles de navigation\n \t\t\t\t\tL.control.scale({\n \t\t\t\t\t\tmaxWidth: 80,\n \t\t\t\t\t\tmetric: true,\n \t\t\t\t\t\timperial: false\n \t\t\t\t\t}).addTo(map);\n \n \t\t\t\t\tconsole.log('Contrôles de navigation ajoutés');\n \n \t\t\t\t\t// Gérer le redimensionnement de la carte\n \t\t\t\t\twindow.addEventListener('resize', function() {\n \t\t\t\t\t\tmap.invalidateSize();\n \t\t\t\t\t});\n \n \t\t\t\t} catch (error) {\n \t\t\t\t\tconsole.error('Erreur lors de l\'initialisation de la carte:', error);\n \t\t\t\t\tdocument.getElementById('site-map').innerHTML = `\n \t\t\t\t\t\t<div class="alert alert-danger m-3">\n \t\t\t\t\t\t\t<i class="fas fa-exclamation-triangle me-2"></i>\n \t\t\t\t\t\t\tErreur lors du chargement de la carte: ${error.message}\n \t\t\t\t\t\t</div>\n \t\t\t\t\t`;\n \t\t\t\t}\n \t\t\t});\n \t\t</script>\n \t{% endif %}\n {% endblock %}\n """ -name: "sitemap/show.html.twig" -path: "/var/www/project-tracker/templates/sitemap/show.html.twig" } -phpFile: "/var/www/project-tracker/vendor/twig/twig/src/Extension/CoreExtension.php" -phpLine: 1887 }
in
templates/sitemap/show.html.twig
(line 294)
{% endif %}<p style="margin: 4px 0; font-size: 12px; color: #6b7280;"><i class="fas fa-map-marker-alt"></i>{{ site.latitude|number_format(4) }}, {{ site.longitude|number_format(4) }}</p>{% if site.contactPhone %}<p style="margin: 4px 0; font-size: 14px;"><strong>Téléphone:</strong> {{ site.contactPhone|e('js') }}</p>{% endif %}<div style="margin-top: 8px; text-align: center;">
in
var/cache/dev/twig/a4/a444aa3f73202b090bf276a4d4f70f6c.php
::
getAttribute
(line 628)
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($this->env, $this->source, (isset($context["site"]) || array_key_exists("site", $context) ? $context["site"] : (function () { throw new RuntimeError('Variable "site" does not exist.', 292, $this->source); })()), "longitude", [], "any", false, false, false, 292), 4), "html", null, true);yield "\t\t\t\t\t\t\t</p>\t\t\t\t\t\t\t";// line 294if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["site"]) || array_key_exists("site", $context) ? $context["site"] : (function () { throw new RuntimeError('Variable "site" does not exist.', 294, $this->source); })()), "contactPhone", [], "any", false, false, false, 294)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {// line 295yield "\t\t\t\t\t\t\t<p style=\"margin: 4px 0; font-size: 14px;\">\t\t\t\t\t\t\t\t<strong>Téléphone:</strong> ";// line 296yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["site"]) || array_key_exists("site", $context) ? $context["site"] : (function () { throw new RuntimeError('Variable "site" does not exist.', 296, $this->source); })()), "contactPhone", [], "any", false, false, false, 296), "js"), "html", null, true);
in
vendor/twig/twig/src/Template.php
->
block_javascripts
(line 446)
throw new \LogicException('A block must be a method on a \Twig\Template instance.');}if (null !== $template) {try {yield from $template->$block($context, $blocks);} catch (Error $e) {if (!$e->getSourceContext()) {$e->setSourceContext($template->getSourceContext());}
in
var/cache/dev/twig/06/064558559e10dcf46cbdf4f13ad269b3.php
->
yieldBlock
(line 197)
\t</html></div>";// line 167yield from $this->unwrap()->yieldBlock('javascripts', $context, $blocks);// line 226yield "</body></html>";
in
vendor/twig/twig/src/Template.php
->
doDisplay
(line 402)
{$context += $this->env->getGlobals();$blocks = array_merge($this->blocks, $blocks);try {yield from $this->doDisplay($context, $blocks);} catch (Error $e) {if (!$e->getSourceContext()) {$e->setSourceContext($this->getSourceContext());}
in
var/cache/dev/twig/a4/a444aa3f73202b090bf276a4d4f70f6c.php
->
yield
(line 57)
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "sitemap/show.html.twig"));$this->parent = $this->load("base.html.twig", 1);yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
in
vendor/twig/twig/src/Template.php
->
doDisplay
(line 402)
{$context += $this->env->getGlobals();$blocks = array_merge($this->blocks, $blocks);try {yield from $this->doDisplay($context, $blocks);} catch (Error $e) {if (!$e->getSourceContext()) {$e->setSourceContext($this->getSourceContext());}
in
vendor/twig/twig/src/Template.php
->
yield
(line 358)
return $this->blocks;}public function display(array $context, array $blocks = []): void{foreach ($this->yield($context, $blocks) as $data) {echo $data;}}public function render(array $context): string
in
vendor/twig/twig/src/Template.php
->
display
(line 373)
ob_start();} else {ob_start(function () { return ''; });}try {$this->display($context);} catch (\Throwable $e) {while (ob_get_level() > $level) {ob_end_clean();}
in
vendor/twig/twig/src/TemplateWrapper.php
->
render
(line 51)
yield from $this->template->yieldBlock($name, $context);}public function render(array $context = []): string{return $this->template->render($context);}/*** @return void*/
in
vendor/twig/twig/src/Environment.php
->
render
(line 333)
* @throws SyntaxError When an error occurred during compilation* @throws RuntimeError When an error occurred during rendering*/public function render($name, array $context = []): string{return $this->load($name)->render($context);}/*** Displays a template.*
in
vendor/symfony/framework-bundle/Controller/AbstractController.php
->
render
(line 459)
if (null !== $block) {return $this->container->get('twig')->load($view)->renderBlock($block, $parameters);}return $this->container->get('twig')->render($view, $parameters);}private function doRender(string $view, ?string $block, array $parameters, ?Response $response, string $method): Response{$content = $this->doRenderView($view, $block, $parameters, $method);
in
vendor/symfony/framework-bundle/Controller/AbstractController.php
->
doRenderView
(line 464)
return $this->container->get('twig')->render($view, $parameters);}private function doRender(string $view, ?string $block, array $parameters, ?Response $response, string $method): Response{$content = $this->doRenderView($view, $block, $parameters, $method);$response ??= new Response();if (200 === $response->getStatusCode()) {foreach ($parameters as $v) {if ($v instanceof FormInterface && $v->isSubmitted() && !$v->isValid()) {
in
vendor/symfony/framework-bundle/Controller/AbstractController.php
->
doRender
(line 278)
* If an invalid form is found in the list of parameters, a 422 status code is returned.* Forms found in parameters are auto-cast to form views.*/protected function render(string $view, array $parameters = [], ?Response $response = null): Response{return $this->doRender($view, null, $parameters, $response, __FUNCTION__);}/*** Renders a block in a view.*
$site = $siteRepository->find($id);if (!$site) {throw $this->createNotFoundException("Le site avec l'ID {$id} n'a pas été trouvé dans la base de données.");}return $this->render('sitemap/show.html.twig', ['site' => $site,]);}#[Route('/sites/{id}/edit', name: 'app_sites_edit', requirements: ['id' => '\d+'])]
in
vendor/symfony/http-kernel/HttpKernel.php
->
show
(line 183)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);$controller = $event->getController();$arguments = $event->getArguments();// call controller$response = $controller(...$arguments);// viewif (!$response instanceof Response) {$event = new ViewEvent($this, $request, $type, $response, $event);$this->dispatcher->dispatch($event, KernelEvents::VIEW);
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 76)
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());$this->requestStack->push($request);$response = null;try {return $response = $this->handleRaw($request, $type);} catch (\Throwable $e) {if ($e instanceof \Error && !$this->handleAllThrowables) {throw $e;}
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 182)
$this->boot();++$this->requestStackSize;$this->resetServices = true;try {return $this->getHttpKernel()->handle($request, $type, $catch);} finally {--$this->requestStackSize;}}
in
vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php
->
handle
(line 35)
) {}public function run(): int{$response = $this->kernel->handle($this->request);if (Kernel::VERSION_ID >= 60400) {$response->send(false);if (\function_exists('fastcgi_finish_request') && !$this->debug) {
in
vendor/autoload_runtime.php
->
run
(line 29)
$app = $app(...$args);exit($runtime->getRunner($app)->run());
<?phpuse App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return function (array $context) {return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};
Logs
| Level | Channel | Message |
|---|---|---|
| INFO 17:41:26 | request |
Matched route "_profiler". {
"route": "_profiler",
"route_parameters": {
"_route": "_profiler",
"_controller": "web_profiler.controller.profiler::panelAction",
"token": "4bfa26"
},
"request_uri": "https://bcc-project-tracker.com/_profiler/4bfa26?panel=exception&type=request",
"method": "GET"
}
|
| DEBUG 17:41:26 | event |
Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure". {
"event": "kernel.request",
"listener": "Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener::configure"
}
|
| DEBUG 17:41:26 | event |
Notified event "kernel.request" to listener "Symfony\UX\Turbo\Request\RequestListener::__invoke". {
"event": "kernel.request",
"listener": "Symfony\\UX\\Turbo\\Request\\RequestListener::__invoke"
}
|
| DEBUG 17:41:26 | event |
Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ValidateRequestListener::onKernelRequest". {
"event": "kernel.request",
"listener": "Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener::onKernelRequest"
}
|
| DEBUG 17:41:26 | event |
Notified event "kernel.request" to listener "Symfony\Bridge\Doctrine\Middleware\IdleConnection\Listener::onKernelRequest". {
"event": "kernel.request",
"listener": "Symfony\\Bridge\\Doctrine\\Middleware\\IdleConnection\\Listener::onKernelRequest"
}
|
| DEBUG 17:41:26 | event |
Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\SessionListener::onKernelRequest". {
"event": "kernel.request",
"listener": "Symfony\\Component\\HttpKernel\\EventListener\\SessionListener::onKernelRequest"
}
|
| DEBUG 17:41:26 | event |
Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::setDefaultLocale". {
"event": "kernel.request",
"listener": "Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener::setDefaultLocale"
}
|
| DEBUG 17:41:26 | event |
Notified event "kernel.request" to listener "Symfony\Component\AssetMapper\AssetMapperDevServerSubscriber::onKernelRequest". {
"event": "kernel.request",
"listener": "Symfony\\Component\\AssetMapper\\AssetMapperDevServerSubscriber::onKernelRequest"
}
|
| DEBUG 17:41:26 | event |
Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\RouterListener::onKernelRequest". {
"event": "kernel.request",
"listener": "Symfony\\Component\\HttpKernel\\EventListener\\RouterListener::onKernelRequest"
}
|
| DEBUG 17:41:26 | event |
Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelRequest". {
"event": "kernel.request",
"listener": "Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener::onKernelRequest"
}
|
| DEBUG 17:41:26 | event |
Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleAwareListener::onKernelRequest". {
"event": "kernel.request",
"listener": "Symfony\\Component\\HttpKernel\\EventListener\\LocaleAwareListener::onKernelRequest"
}
|
| DEBUG 17:41:26 | event |
Notified event "kernel.request" to listener "Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener::configureLogoutUrlGenerator". {
"event": "kernel.request",
"listener": "Symfony\\Bundle\\SecurityBundle\\Debug\\TraceableFirewallListener::configureLogoutUrlGenerator"
}
|
| DEBUG 17:41:26 | event |
Notified event "kernel.request" to listener "Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener::onKernelRequest". {
"event": "kernel.request",
"listener": "Symfony\\Bundle\\SecurityBundle\\Debug\\TraceableFirewallListener::onKernelRequest"
}
|
| DEBUG 17:41:26 | event |
Notified event "kernel.controller" to listener "Symfony\Bundle\FrameworkBundle\DataCollector\RouterDataCollector::onKernelController". {
"event": "kernel.controller",
"listener": "Symfony\\Bundle\\FrameworkBundle\\DataCollector\\RouterDataCollector::onKernelController"
}
|
| DEBUG 17:41:26 | event |
Notified event "kernel.controller" to listener "Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::onKernelController". {
"event": "kernel.controller",
"listener": "Symfony\\Component\\HttpKernel\\DataCollector\\RequestDataCollector::onKernelController"
}
|
| DEBUG 17:41:26 | event |
Notified event "kernel.controller_arguments" to listener "Symfony\Component\Security\Http\EventListener\IsCsrfTokenValidAttributeListener::onKernelControllerArguments". {
"event": "kernel.controller_arguments",
"listener": "Symfony\\Component\\Security\\Http\\EventListener\\IsCsrfTokenValidAttributeListener::onKernelControllerArguments"
}
|
| DEBUG 17:41:26 | event |
Notified event "kernel.controller_arguments" to listener "Symfony\Component\Security\Http\EventListener\IsGrantedAttributeListener::onKernelControllerArguments". {
"event": "kernel.controller_arguments",
"listener": "Symfony\\Component\\Security\\Http\\EventListener\\IsGrantedAttributeListener::onKernelControllerArguments"
}
|
| DEBUG 17:41:26 | event |
Notified event "kernel.controller_arguments" to listener "Symfony\Component\HttpKernel\EventListener\CacheAttributeListener::onKernelControllerArguments". {
"event": "kernel.controller_arguments",
"listener": "Symfony\\Component\\HttpKernel\\EventListener\\CacheAttributeListener::onKernelControllerArguments"
}
|
| DEBUG 17:41:26 | event |
Notified event "kernel.controller_arguments" to listener "ContainerVIimjyq\RequestPayloadValueResolverGhost01ca9cc::onKernelControllerArguments". {
"event": "kernel.controller_arguments",
"listener": "ContainerVIimjyq\\RequestPayloadValueResolverGhost01ca9cc::onKernelControllerArguments"
}
|
| DEBUG 17:41:26 | event |
Notified event "kernel.controller_arguments" to listener "Symfony\Component\HttpKernel\EventListener\ErrorListener::onControllerArguments". {
"event": "kernel.controller_arguments",
"listener": "Symfony\\Component\\HttpKernel\\EventListener\\ErrorListener::onControllerArguments"
}
|
Stack Trace
|
RuntimeError
|
|---|
Twig\Error\RuntimeError:
Neither the property "contactPhone" nor one of the methods "contactPhone()", "getcontactPhone()"/"iscontactPhone()"/"hascontactPhone()" or "__call()" exist and have public access in class "App\Entity\Site" in "sitemap/show.html.twig" at line 294.
at templates/sitemap/show.html.twig:294
at Twig\Extension\CoreExtension::getAttribute()
(var/cache/dev/twig/a4/a444aa3f73202b090bf276a4d4f70f6c.php:628)
at __TwigTemplate_3062200c847959fbe706f4857daa5f22->block_javascripts()
(vendor/twig/twig/src/Template.php:446)
at Twig\Template->yieldBlock()
(var/cache/dev/twig/06/064558559e10dcf46cbdf4f13ad269b3.php:197)
at __TwigTemplate_dc1500fadce557b89f622b0d90402efc->doDisplay()
(vendor/twig/twig/src/Template.php:402)
at Twig\Template->yield()
(var/cache/dev/twig/a4/a444aa3f73202b090bf276a4d4f70f6c.php:57)
at __TwigTemplate_3062200c847959fbe706f4857daa5f22->doDisplay()
(vendor/twig/twig/src/Template.php:402)
at Twig\Template->yield()
(vendor/twig/twig/src/Template.php:358)
at Twig\Template->display()
(vendor/twig/twig/src/Template.php:373)
at Twig\Template->render()
(vendor/twig/twig/src/TemplateWrapper.php:51)
at Twig\TemplateWrapper->render()
(vendor/twig/twig/src/Environment.php:333)
at Twig\Environment->render()
(vendor/symfony/framework-bundle/Controller/AbstractController.php:459)
at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->doRenderView()
(vendor/symfony/framework-bundle/Controller/AbstractController.php:464)
at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->doRender()
(vendor/symfony/framework-bundle/Controller/AbstractController.php:278)
at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->render()
(src/Controller/SiteController.php:154)
at App\Controller\SiteController->show()
(vendor/symfony/http-kernel/HttpKernel.php:183)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
(vendor/symfony/http-kernel/HttpKernel.php:76)
at Symfony\Component\HttpKernel\HttpKernel->handle()
(vendor/symfony/http-kernel/Kernel.php:182)
at Symfony\Component\HttpKernel\Kernel->handle()
(vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(vendor/autoload_runtime.php:29)
at require_once('/var/www/project-tracker/vendor/autoload_runtime.php')
(public/index.php:5)
|