eZ Community » Forums » Developer » 'ez_legacy' not found' and LegacyBridge
expandshrink

'ez_legacy' not found' and LegacyBridge

'ez_legacy' not found' and LegacyBridge

Thursday 19 February 2015 4:16:14 pm - 7 replies

I have updated to the recent head and it now uses LegacyBridge.

My legacy admin sites are working but now anything that uses 'ez_legacy' route no longer works.
Am I missing some config so that the fallbackrouter should handle requests when not found in the new stack? 

Here is the log:

[2015-02-19 10:04:13] event.DEBUG: Notified event "kernel.controller" to listener "eZ\Bundle\EzPublishCoreBundle\EventListener\PageControllerListener::getController". [] [][2015-02-19 10:04:13] app.DEBUG: Router eZ\Bundle\EzPublishLegacyBundle\Routing\DefaultRouter was unable to generate route. Reason: 'Route 'ez_legacy' not found': Unable to generate a URL for the named route "ez_legacy" as such route does not exist. [] [][2015-02-19 10:04:13] event.DEBUG: Notified event "ezpublish_legacy.build_kernel" to listener "eZ\Bundle\EzPublishLegacyBundle\LegacyMapper\Session:omg.gif EmoticonnBuildKernelHandler". [] [][2015-02-19 10:04:13] event.DEBUG: Notified event "ezpublish_legacy.build_kernel" to listener "eZ\Bundle\EzPublishLegacyBundle\LegacyMapper\Configuration:omg.gif EmoticonnBuildKernel". [] [][2015-02-19 10:04:13] event.DEBUG: Notified event "ezpublish_legacy.build_kernel" to listener "eZ\Bundle\EzPublishLegacyBundle\LegacyMapper\LegacyBundles:omg.gif EmoticonnBuildKernel". [] []

Thursday 19 February 2015 4:39:26 pm

Hello Douglas,

Have you read the following and updated your settings?

https://github.com/ezsystems/ezpu...ernel/blob/master/doc/upgrade/6.0.md

I hope this helps!

Cheers,
Heath

Thursday 19 February 2015 5:20:36 pm

I have and my legacy sites are working.  When a non-legacy site tries to use a legacy route is when i have the issue.  It seems that the non-legacy sites are no longer falling back to the legacy router.

Thursday 19 February 2015 5:54:14 pm

Hello Douglas,

Ok. So legacy (admin and user siteaccess) sites are working (that's good).

I'm confused. I'm not the most experienced with this area of new stack but ... I did watch closely via GitHub when they moved legacy out of the 'core' kernel (by default) following the commit notifications.

Maybe you can help me. How are you calling or triggering the error (can you write up steps to reproduce)?

Also why would a non-legacy siteaccess / site need to use legacy routes?

It seems like when you say, "It seems that the non-legacy sites are no longer falling back to the legacy router" .. that that would be the new default intended behavior since legacy has been moved out of the core defaults in preparation of v6.

I hope this helps!

Cheers,
Heath

Thursday 19 February 2015 7:12:48 pm

The new stack can still call modules from the old stack.  To link to these the route ez_legacy is exposed
for example on doc.ez.no https://doc.ez.no/display/EZP/Legacy+code+and+features

{{ render( url( 'ez_legacy', {'module_uri': '/content/view/sitemap/2'} ) ) }}

I also believe some of the page blocks rely on the old legacy fallback.

I have narrowed it down some more, and for some reason the ezpublish_legacy.router is being added to the chainrouter but for some reason the class is not the FallbackRouter but instead the Default Router.

This is very odd as services.yml from the LegaceyBridge clearly shows it should be FallbackRouter.

Thursday 19 February 2015 9:20:57 pm

Hello Douglas,

I don't think that new stack actually should (in v6, which is what github has in progress/incomplete) still 'call modules from the old stack'. I think that if you need that functionality you need to enable legacy mode (but that's just a guess from what little I've heard).

I did notice that in the new legacy-bundle yml something you mentioned in your last message that I think brings credibility to my previous legacy mode assumptions.

Here is where the route class is overridden, https://github.com/ezsystems/LegacyBridge/blob/78a3ff1f39f1abf03e10991686b3de6aadc82689/bundle/Resources/config/services.yml#L9

Here is where the legacy route class is defined: https://github.com/ezsystems/LegacyBridge/blob/78a3ff1f39f1abf03e10991686b3de6aadc82689/bundle/Resources/config/services.yml#L32

Here is where it seems to be used:

https://github.com/ezsystems/LegacyBridge/blob/78a3ff1f39f1abf03e10991686b3de6aadc82689/bundle/Resources/config/services.yml#L173

Also worth noticing is that even in the default legacy router it checks for legacy mode to be enabled, which may or may not be relevant.

https://github.com/ezsystems/LegacyBridge/blob/d002332ff3ad91a97b538e2d69fa8eee30c8a884/bundle/Routing/DefaultRouter.php#L37

I am trying to do more research to find exactly which php file contains the url() implementation or the url( 'ez_legacy' *) implementation to prove my theory but I ran out of time atm. Help welcome happy.gif Emoticon

EDIT: also you linked to the following page to prove your point but you did not notice that at the top of the page it clearly shows the content on the page is with relation to legacy mode being enabled. https://doc.ez.no/display/EZP/Legacy+code+and+features

I hope this helps!

Cheers,
Heath

Modified on Thursday 19 February 2015 9:31:13 pm by // Heath

Thursday 19 February 2015 10:03:51 pm

Found it!

I should have looked at the webserver log first instead of the app dev.log. The dev.log mislead me to believe it was a missing route.  My apache log showed the real cause.  The netgen/TagsBundle is not compatible with the moved search api and caused my issue.

Thank you for you help.  Sorry it ended up something else.

Thursday 19 February 2015 10:50:01 pm

Hello Douglas,

I'm so pleased that you have found the true cause.

Apologies for advocating so much as I did. I should have done better job.

I was just about to request you consider creating a pull request but I see now that you already have! Good Job! https://github.com/netgen/TagsBundle/pull/19

Best wishes! 

Cheers,
Heath

Modified on Friday 20 February 2015 1:50:12 am by // Heath

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from