Symfony CMF
Wednesday, Mar 30, 2016

We decided to use Symfony CMF for our corporate intranet, partially because our developers’ skills lie in PHP/Symfony but also because we wanted the flexibility to extend and create pages using the Symfony framework and services.

CMF isn’t without problems though - it has a few niggling bugs, here are a couple that we have encountered:

Pages created with menu as parent disappear from the page listing in Sonata Admin and also cause the menu to “break” with errors as described on Stackoverflow (without resolution in our case)

An exception has been thrown during the rendering of a template ("Can not determine
the prefix. Either this is a new, unpersisted document or the listener that calls
setPrefix is not set up correctly.")

Deleting the page fixes the problem, but only if you are lucky enough to find it (or use the console which is very useful)

app/console doctrine:phpcr:node:dump

In fact pages created anywhere other than with Homepage (/cms/simple) seem to vanish from the Sonata page listing.

The other problem is that creating content in multiple languages isn’t as simple as following the instructions (i.e. adding lunetics_locale to config.yml etc). This was solved quite simply using the correct configuration in config.yml.