matatirosolutions / CorleyMaintenanceBundle

Maintenance web pages (Hard and Soft modes) - Symfony Bundle
MIT License
22 stars 16 forks source link

Source file CorleyMaintenanceBundle:maintenance.html is missing #5

Closed PeterFour closed 8 years ago

PeterFour commented 8 years ago

I installed this bundle and when running it to use with the default value it says

[InvalidArgumentException] 
Source file CorleyMaintenanceBundle:maintenance.html is missing

The file is present but not detected for some reason, any idea ?

wdalmut commented 8 years ago

Hi Peter,

Which symfony version are you using?

PeterFour commented 8 years ago

Hi,

it was the Sy 2.8.2.

Could it be because file_exist cannot understand Syfony view notation ?

On Thu, 11 Feb 2016 21:10 Walter Dal Mut notifications@github.com wrote:

Hi Peter,

Which symfony version are you using?

— Reply to this email directly or view it on GitHub https://github.com/wdalmut/CorleyMaintenanceBundle/issues/5#issuecomment-183061056 .

Pierre Wroblewski

nfodev commented 8 years ago

I have the same problem with Symfony 2.7.10

wdalmut commented 8 years ago

Hi,

the current 0.1.9 tag have an issue handle the default variables. I am fixing it.

To workaround the problem you can override default values: in your config.yml yml use:

corley_maintenance:                                                                                                                                                          
    page: %kernel.root_dir%/../web/maintenance.dist.html                                                                                                                     
    soft_lock: %kernel.root_dir%/../web/lock.html     

The maintenance.dist.html is the file used during the maintenance mode, the soft_lock is the real filename that lock down the application.

Remember to create the maintenance.dist.html file with your personal maitenance html or if just want to go quickly

echo "<h1>MAINTENANCE</h1>" > web/maintenance.dist.html

I will publish a patch asap