Converted accessmethod from uri to host

Author Message

Osichr Hayez

Monday 09 October 2006 6:31:35 am

I have converted accessmethod from uri to host. I did it because i now have two domains pointed at the same site. Both of them display their own part of the content structure.

I've modified settings/override/site.ini:

[SiteAccessSettings]
CheckValidity=false
AvailableSiteAccessList[]=siteA
AvailableSiteAccessList[]=siteB
AvailableSiteAccessList[]=site_admin
MatchOrder=host
HostMatchMapItems[]=www.siteA.com;designA
HostMatchMapItems[]=siteB.no;designB
HostMatchMapItems[]=admin.siteA.com;designA_admin

And I've set up settings/siteaccess/siteB/site.ini:
(to get the right content at the starting page.)

[SiteSettings]
SiteName=Site B
SiteURL=siteB.com
LoginPage=embedded
IndexPage=/content/view/full/262/
DefaultPage=/content/view/full/262/

All of this works fine for me, but I have two problems:

1) Now I cant log in at my admin login page. I get no errors in the debug output. If I turn the MatchOrder back to uri, this problem disappears.

2) My links in the menu or the "read more.." no longer work, using nice urls and ezroot. I now have to use the content/view/full/262 method.

[running ezpublish 3.6.10]

Claudia Kosny

Thursday 12 October 2006 4:50:50 am

Hi Osichr

What happens when you try to login to your admin page? Don't you see the page or do you get access denied or what?

Where do the links for 'read more' point to? Could you post an example of both the created links and the way the links shoud be?

Greetings from Luxembourg

Claudia

Osichr Hayez

Monday 16 October 2006 7:06:51 am

Hi Claudia and thank you for looking av this.

<b>Log in admin</b>
I am trying to log on to admin at: admin.siteA.com
I am here presented with the default ez publish login administrator interface.

If I go to admin.siteA.com/index.php/user/login I get the same page. When I enter my valid username and password and click log in, the page simply reloads. There are no new error messages.

I have enabled ez debug and I get alot of warnings:

Notice: eZMySQLDB::query(0.000 ms) query number per page:0  	Oct 16 2006 15:19:54
SET NAMES 'latin1'

Timing: 	Oct 16 2006 15:19:54
Module start 'user'

Warning: ezi18n 	Oct 16 2006 15:19:54
No translation for file(translation.ts) in context(lib/template): 'The maximum nesting level of 40 has been reached. The execution is stopped to avoid infinite recursion.' with comment()

Warning: ezi18n 	Oct 16 2006 15:19:54
No translation for file(translation.ts) in context(kernel/user): 'User' with comment()

Warning: ezi18n 	Oct 16 2006 15:19:54
No translation for file(translation.ts) in context(kernel/user): 'Login' with comment()

Timing: 	Oct 16 2006 15:19:54
Module end 'user'

Warning: ezi18n 	Oct 16 2006 15:19:54
No translation for file(translation.ts) in context(kernel/navigationpart): 'Content structure' with comment(Navigation part)

Warning: ezi18n 	Oct 16 2006 15:19:54
No translation for file(translation.ts) in context(kernel/navigationpart): 'Media library' with comment(Navigation part)

Warning: ezi18n 	Oct 16 2006 15:19:54
No translation for file(translation.ts) in context(kernel/navigationpart): 'User accounts' with comment(Navigation part)

Warning: ezi18n 	Oct 16 2006 15:19:54
No translation for file(translation.ts) in context(kernel/navigationpart): 'Webshop' with comment(Navigation part)

Warning: ezi18n 	Oct 16 2006 15:19:54
No translation for file(translation.ts) in context(kernel/navigationpart): 'Design' with comment(Navigation part)

Warning: ezi18n 	Oct 16 2006 15:19:54
No translation for file(translation.ts) in context(kernel/navigationpart): 'Setup' with comment(Navigation part)

Warning: ezi18n 	Oct 16 2006 15:19:54
No translation for file(translation.ts) in context(kernel/navigationpart): 'My account' with comment(Navigation part)

Timing: 	Oct 16 2006 15:19:54
End

<b>The links issue</b>
My frontpage object is a folder. The folder shows some underlying articles using the line_article template.
At my original site, the links that are generated works fine. They are like this:

http://www.siteA.no/index.php/about_site_a

My "new" site, siteB has a folder set as root level. The links at the frontpage then looks like this:

http://www.siteB.com/index.php/siteBfolder/about_site_b

Here you see /sideBfolder/ pops in as this is the root folder of site B.

BUT when I click at this link in site B i get error message: module not found

in ez debug I get two error messages (and some ezi18n warnings):

Error: index  	Oct 16 2006 15:37:10
Undefined module: about_site_b

Error: error/view.php 	Oct 16 2006 15:37:10
Error ocurred using URI: /index.php/about_side_b/

If I manually type the url: index.php/content/view/full/163/
The page is then showing.

Osichr Hayez

Tuesday 17 October 2006 12:12:09 am

Or perhaps I should refrase my question:
<b>What is the correct procedure for doing this?</b>

<b>The original state of the website (siteA)</b>
ez publish 3.6.8 running in a virtual host environment (LAMP).
Accessmethod: url
Rootnode of this site is the default 2.

<b>What I want it to do:</b>
I want to assign a different domain (siteB - siteaccess) to a specific part of the content structure. This siteaccess will have rootnode 262. Then the editor can log in and maintain both siteA and siteB in the same admin interface.

Claudia Kosny

Wednesday 18 October 2006 10:50:44 am

Hi Osichr

Regarding your site.ini:
You posted:

HostMatchMapItems[]=www.siteA.com;designA
HostMatchMapItems[]=siteB.no;designB
HostMatchMapItems[]=admin.siteA.com;designA_admin

First of all I am missing

HostMatchType=map

although I presume that you just haven't posted this line.
But I am wondering about hwat you map the urls to - the names designA, designB and designA_admin rather indicate a design folder to me, not a siteaccess.So make sure this is correct.

Regarding the login:

If I go to admin.siteA.com/index.php/user/login I get the same page. When I enter my valid username and password and click log in, the page simply reloads. There are no new error messages.

Are you then logged in or not? Maybe it is just the redirection after login that has gone wonky. Have you enabled debug redirection? Maybe you can see there what is going on with the login. If you have some knowledge about PHP and you feel it is truly necessary, have a look at the file kernel/user/login.php. You can find out the main points - whether a login is attempted at all, whether a valid user is returned and whether this user has access to admin - quite easily there (don't forget to make a backup before you change anything there).

The warnings you get regarding missing translations are not relevant - EZ just takes the original english text if there are no translations, so this defninitely does not cause any problems.

Regarding the link issue:

First make sure that you have cleared the entire cache. To be on the safe side you might want to do this manually (although then be careful not to delete anything else in the var directory!). Then reload the page and try again.

Does the same happen if you create the link to the node using the ezurl()?

Greetings from Luxembourg

Claudia

Osichr Hayez

Monday 23 October 2006 1:28:12 pm

Thank you for yor feedback Claudia. I haven't been able to resolve this, after trying several ways. Allready having spent too musch time at this, I am going to to a new install, and manually move the articles. Hopefully I wont copy paste myself to death...

Thanks again for your help, I did really appreciate it!

Osichr Hayez

Friday 03 November 2006 1:02:30 am

Through good help from an expert I now know what caused this error. My .htaccess settings messed it all up. By cleaning up the rewriterules the access now works fine : )

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.