eZ Community » Forums » eZ Publish 5 Platform » what legacy_mode setting does?
expandshrink

what legacy_mode setting does?

what legacy_mode setting does?

Tuesday 09 July 2013 10:19:36 pm - 7 replies

Does anybody know what the setting "legacy_mode: true" in the ezpublish.yml does?

thanks,

Ernesto Buenrostro

Wednesday 10 July 2013 9:47:54 am

Hi,

It is used to configure a siteaccess in pure ezpublish 4. It is the case for the back office.

Nicolas

Wednesday 10 July 2013 10:06:06 am

In other words: when you enable it, the only urls working will be the ones corresponding to eZ4 - all Symfony routes will be disabled.

This has a positive effect on performance - if all you want to run is Legacy-Stack code

(my personal opinion is that that setting should be better named / documented)

Modified on Wednesday 10 July 2013 10:06:42 am by Gaetano Giunta

Wednesday 10 July 2013 10:40:15 am

Quote from Gaetano Giunta :

In other words: when you enable it, the only urls working will be the ones corresponding to eZ4 - all Symfony routes will be disabled.

This has a positive effect on performance - if all you want to run is Legacy-Stack code

 Wrong !!!

Currently the only effect is that it disables the URLAliasRouter (this is why it's used for the admin interface).

As a consequence :

  1. All Symfony routes will still work, as you're still passing through the Symfony stack
  2. All URLAliases will fallback to the legacy kernel which means that there will be a impact on performances.

The legacy_mode is thus strongly discouraged, except for admin interface ! For legacy fallback (i.e. view templates), the built-in ViewController and the ViewManager already handles it, with the great advantage of using HTTP cache (which is almost 3 times better than the old view cache using the built-in Symfony reverse proxy).

If, for some reason, you want to run in full legacy (no Symfony), just make your virtualhost point to ezpublish_legacy directory. However, note that you won't be able to access anything from the new stack since you don't go through it (including using ezpKernel::instance()->getServiceContainer()).

Modified on Wednesday 10 July 2013 4:47:15 pm by Jérôme Vieilledent

Wednesday 10 July 2013 4:25:09 pm

In other words, it disables all new stack "template override rules"?

Wednesday 10 July 2013 4:46:47 pm

As it disables the URLAliasRouter, yes.

Thursday 11 July 2013 1:49:09 am

DOH, my bad!

One more reason to document it better then blunk.gif Emoticon

Monday 07 October 2013 2:26:23 pm

This is now documented (at last): https://confluence.ez.no/display/...res#Legacycodeandfeatures-LegacyMode

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from