I’ve been asked to look at a page created with the Symfony PHP framework and find out why the frontpage suddently has stopped loading the header and footer – I only show the content between, which means that no style or HTML tags such as header, body and HTML is loaded.
I’m very new to Symfony and thus have some trouble troubleshooting the site and see where the error is. Other pages on the site are loaded normally and have no trouble.
I don’t even know which file to show you or how to describe the problem better cause I’m shooting in the dark here.
I’ve read about Symfony and its MVC paradigm, but I’m still uncertain on where I have to look and where my error is. I guess it’s not just a matter of including header and footer, because there are no such files but I’m more inclined to believe it is somewhere in the layout.php, layout.haml or simple.haml files but as said: I really have no idea.
I’ve looked at a file called indexSuccess.haml which has some tags which resample the ones which the frontpage has but can’t really say if this file is loaded successfully.
Any help or advice would be very much appreciated.
Sincere
– Mestika
You need to find out where the layout is being disabled, which is probably in one of these places:
In actions:
1. Find the indexSuccess.haml file you mentioned, and go up a directory. That is the module in question.
2. Open the actions/actions.class.php file
3. See if there is a line saying
$this->setLayout(false)or something like that. Comment out that line if it is and try the page then.In module config:
1. In the module you found above, see if there is a config/view.yml file and if it has this line, remove it:
In main config:
1. Open /apps/frontend/config/config.yml.
2. Check for the
layout: falseline above and remove it.Note you may need to change some folder names, e.g. ‘frontend’ could be called something else.