eZ Community » Forums » eZ Publish 5 Platform » Installation: Integration into an...
expandshrink

Installation: Integration into an existing project (Cannot access admin)

Installation: Integration into an existing project (Cannot access admin)

Monday 25 March 2013 3:47:48 pm - 10 replies

I've integrated ez publish 5 into an existing project. This currently displays the panel for ezpublish.spi.persistence (eZ Publish Usage Information). If I go to a non-existing page such as /xx it renders the ez publish layout and states "Module not found". However I am trying to be able to access the admin site. I've set the admin to ezdemo_site_admin.

The following occurs

  • /ezdemo_site_admin - Redirects to /
  • /ezdemo_site_admin/ - Renders the index page (/).
  • /ezdemo_site_admin/* - Renders any of the default routes
  • E.g. /ezdemo_site_admin/about-us

I'm not sure where to start looking for the issue with this, can anyone give me any pointers?

I assumed this was due to my security.yml, however this matches up another installation that works.Additionally the web profiler in symfony shows the panel for "ezpublish.spi.persistence - eZ Publish Usage Information" (http://i.imgur.com/vrsQ6zh.png).

Modified on Monday 25 March 2013 3:52:35 pm by Andrew Johnstone

Monday 25 March 2013 3:58:15 pm

Hi Andrew

Can you please show what's in your ezpublish.yml (in a gist maybe) ?

Monday 25 March 2013 4:10:25 pm

Quote from Jérôme Vieilledent :

Hi Andrew

Can you please show what's in your ezpublish.yml (in a gist maybe) ?

https://gist.github.com/ajohnstone/e27abc1e618405053f8f

Monday 25 March 2013 4:19:34 pm

I assume you tried to remove all caches ?

rm -rf ezpublish/cache/*

Because what you have in your screenshot is what you should have when clicking on the dev toolbar...

Monday 25 March 2013 4:58:25 pm

Hi Jérôme,

I've tried clearing cache, the only issue I have is being able to access the admin right now, which redirects to /.

rm -rf app/{cache,logs}/*
rm -rf ezpublish/{cache,logs}/*
rm -rf ezpublish_legacy/var/{cache,log}/*
rm -rf ezpublish_legacy/var/ezdemo_site/{cache,log}/*

Anything I could look at in particular as to way it fails

Modified on Monday 25 March 2013 4:59:01 pm by Andrew Johnstone

Tuesday 26 March 2013 3:49:44 pm

I'm still baffled by this, however it appears to be failing to pick up the site access. By changing ezpublish.yml to the following... 

 ezpublish:
    siteaccess:
        default_siteaccess: eng
        match:
            URIElement: '1'
            Map\Host:
                andrew.domain.org: ezdemo_site
                admin.andrew.domain.org: ezdemo_site_admin
 

I can get the admin login to render under

http://admin.andrew.domain.org/ezsetup

Although, attempting to login throws

 Unable to find the controller for path "/user/login". Maybe you forgot to add the matching route in your routing configuration?

So its not picking up the routing correctly...

When running ezpublish:configure...

 root@andrew:/opt/src/web/symfony#  php app/console ezpublish:configure --env=prod ezdemo_site ezdemo_site_admin
[Symfony\Component\DependencyInjection\Exception\InactiveScopeException]     You cannot create a service ("request") of an inactive scope ("request").  
ezpublish:configure [--backup] package adminsiteaccess

Modified on Tuesday 26 March 2013 4:18:40 pm by Andrew Johnstone

Tuesday 26 March 2013 4:52:44 pm

What is your routing configuration in your existing application ?

Tuesday 26 March 2013 4:54:36 pm

And what if you try to put your ezdemo_site_admin on the top of the siteaccess list, instead of the bottom ?

Wednesday 27 March 2013 11:51:52 am

It seems to be routing related...

Commenting out all of my own routes loads in the ez publish demo site.

If I then try to access the admin site it then loads the admin site/login, right now it seems to be including a legacy view of the admin site (http://i.imgur.com/L8pvlYr.png). 

I'm wondering if my routes overlap with anything defined within ez publish, which I'm about to test shortly. (in particular /{login,logout} etc).

https://gist.github.com/ajohnstone/e94aa5e80ea5d9cd2fb3

I'm continuing to play around with this atm.

Wednesday 27 March 2013 1:42:08 pm

OK with your last gist, I understand better happy.gif Emoticon. You probably have trouble with your home route. You need to know that all declared routes always have the priority on UrlAlias routes (dynamic routes generated by eZ Publish). So having / will lead you to issues for sure since it's also supposed to be handled by the UrlAliasRouter.

So what I suggest is to manage your home page inside eZ Publish and/or adding a prefix to your existing web routes.

About the admin : Are you sure to have ezdemo_site_admin in legacy mode and to have clear all the caches (including the ones from legacy) ?

Wednesday 27 March 2013 2:02:54 pm

Getting closer to identifying the problems with this.

I rolled back my git repo to a clean stand point and started again, which I have observed the following.

1. After removing all of our own routing the problem stems from including this anywhere.

# app/config/routing.yml
home:
    pattern:  /
    defaults: { _controller: WebBundle:Index:index }

This stand alone will work correctly in conjunction with any other routes..

 eZDemoBundle:
    resource: "@eZDemoBundle/Resources/config/routing.yml"
_ezpublishRoutes:
    resource: "@EzPublishCoreBundle/Resources/config/routing/internal.yml"
_ezpublishLegacyRoutes:
    resource: "@EzPublishLegacyBundle/Resources/config/routing.yml"
_ezpublishRestRoutes:
    resource: "@EzPublishRestBundle/Resources/config/routing.yml"
    prefix:   /api/ezp/v2

2. We have our own implementation of session handling and authentication, which uses a node service that wraps a underlying services.

This fails to handle authentication when authenticating against the admin. I believe this maybe to do with session ids matching up, however will need to look into this further.

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from