Solve this error: The service “sonata.page.site.selector.host” has a dependency on a non-exis tent service “sonata.seo.page”.

Do you get this error The service "sonata.page.site.selector.host" has a dependency on a non-exis tent service "sonata.seo.page". with Sonata? In this tutorial I will explain to you how you can solve this error.

Open the command line in your Symfony project and enter php composer.phar require sonata-project/seo-bundle

Open you AppKernel file and add

new Sonata\SeoBundle\SonataSeoBundle(),

Then, open app/config/config.yml file and add

sonata_seo:
default: sonata.seo.page.default
encoding: UTF-8
page:
title: Sonata Project
metas:
name:
keywords: foo bar
description: The description
robots: index, follow

property:
# Facebook application settings
#'fb:app_id': XXXXXX
#'fb:admins': admin1, admin2

# Open Graph information
# see http://developers.facebook.com/docs/opengraphprotocol/#types or http://ogp.me/
'og:site_name': Sonata Project Sandbox
'og:description': A demo of the some rich bundles for your Symfony2 projects

http-equiv:
'Content-Type': text/html; charset=utf-8
#'X-Ua-Compatible': IE=EmulateIE7

charset:
UTF-8: ''

head:
'xmlns': http://www.w3.org/1999/xhtml
'xmlns:og': http://opengraphprotocol.org/schema/
#'xmlns:fb': "http://www.facebook.com/2008/fbml"

You can find more information at http://sonata-project.org/bundles/seo/master/doc/reference/installation.html

In this way you will solve this error!









Leave a Comment