ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Multiple Site Manager "CP Login" and "Edit This"

December 21, 2010 11:51am

Subscribe [6]
  • #1 / Dec 21, 2010 11:51am

    dcghost

    36 posts

    Hello,

    Has two issues with MSM

    1)
    For example I have sites A, B, C, and members group “Site C” for users who can access site C, but not A or B. With IE, submitting the login form for url http://www.site.com/c/admin.php returns the message “You are not authorized to access this page”. This problem does not happen with Chrome.

    If the user’s group has access to site A, then everything works fine when accessing http://www.site.com/c/admin.php.

    2)
    Another problem: ‘edit_this’ link (for example with edit this plugin) does not tell CP which site_id should be used. So if there is a second CP browser window opened to site A, then using edit_this link for site C again produces the error “You are not authorized to access this page”.

  • #2 / Dec 22, 2010 4:19am

    John Henry Donovan

    12339 posts

    dcghost,

    What version and build of both EE and MSM are you using?
    Are you using any other add-ons?
    Have you included required variables when creating your masked page like site name etc?
    Have you tried clearing IE’s cache and cookies

    The ‘edit this’ add-on is a third party add-on so we cannot support it I’m afraid. Try following up with the author on devot-ee.com forums though.

  • #3 / Dec 22, 2010 5:14am

    dcghost

    36 posts

    dcghost,

    What version and build of both EE and MSM are you using?

    EE v2.1.0
    MSM 2.0

    Are you using any other add-ons?

    Yes I do.

    Have you included required variables when creating your masked page like site name etc?

    I think so. How it can change behavior of CP? Or I misunderstood you

    Have you tried clearing IE’s cache and cookies

    Yes

    The ‘edit this’ add-on is a third party add-on so we cannot support it I’m afraid. Try following up with the author on devot-ee.com forums though.

    It is not the edit_this problem. Lets make snippet ‘edit_this’:

    {if author_id == logged_in_member_id OR logged_in_member_group == "1"}• <a href="http://{cp_url}?S=0&D=cp&C=content_publish&M=entry_form&channel_id={channel_id}&entry_id={entry_id}">Edit This</a>{/if}

    Now imagine the browser has opened two tabs one with CP where is current site A. Second with site C which has edit_this link. And current user does not have rights to open CP for site A. That will make exception. Because link does not tell to CP the site.

    There is another trouble MSM, if member has no privileges for site A why it does show the site A in the site switcher?

  • #4 / Dec 22, 2010 5:09pm

    Ingmar

    29245 posts

    Can you please try to upgrade to 2.1.3 and the latest build of the MSM as well? Just so we’re on the same page in terms of code.

  • #5 / Dec 23, 2010 9:48am

    dcghost

    36 posts

    Can you please try to upgrade to 2.1.3 and the latest build of the MSM as well? Just so we’re on the same page in terms of code.

    Done. The issue still here

  • #6 / Dec 23, 2010 9:58am

    dcghost

    36 posts

    I want rephrase the problem. I have 3 sites A,B,C with MSM on single EE. The urls are:

    <a href="http://www.site.net/">http://www.site.net/</a>
    <a href="http://www.site.net/b/">http://www.site.net/b/</a>
    <a href="http://www.site.net/c/">http://www.site.net/c/</a>

    If member group has rights to open CP for site C but does not have it for site A and B
    In case if member of that group will login to the url:

    <a href="http://www.site.net/c/admin.php">http://www.site.net/c/admin.php</a>

    There will be message: “You are not authorized to access this page”. Sounds like “/c/” does not tell to MSM wich site CP should be used.

    Same with edit_this. The link

    <a href="http://www.site.net/c/admin.php?S=76e4d12bccd54be34d3f6c4b5378a9d0445c7c87&D=cp&C=content_publish&M=entry_form&channel_id=20&entry_id=1">http://www.site.net/c/admin.php?S=76e4d12bccd54be34d3f6c4b5378a9d0445c7c87&D=cp&C=content_publish&M=entry_form&channel_id=20&entry_id=1</a>

    Will works only if other browser tab hass CP session where is current site “C”. If one of other sites active. Then same error message will popup.

    Issue does not exists if member has rights for CP of A and C, but do not have rights for B.

  • #7 / Dec 27, 2010 11:30am

    Sue Crocker

    26054 posts

    One thing you can do is use Cookies only for your control panel settings, which will fix that problem. But you may need to modify your edit this links to accommodate other settings.

    The problem of showing other sites for members who don’t have access to all the sites has been mentioned previously in a feature request, but I don’t recall offhand which one..

  • #8 / Dec 27, 2010 12:06pm

    dcghost

    36 posts

    One thing you can do is use Cookies only for your control panel settings, which will fix that problem.

    Do not help

    But you may need to modify your edit this links to accommodate other settings.

    Like what?

  • #9 / Dec 27, 2010 5:32pm

    Ingmar

    29245 posts

    Can you confirm that you aren’t using session ids anywhere on your site, cookies only? Are you specifying a cookie domain in your preferences? Which one, if so?

  • #10 / Dec 27, 2010 7:24pm

    Kurt Deutscher

    827 posts

    We run into this all the time with MSM sites in EE 2.x.x., and even when all our permissions are set correctly and we’re using cookies-only.

    When we get that error, we have to remove the hash code from the URL and reload the page, then all works as expected.

    Basically remove everything to the right of /admin.php then reload/refresh the page.

    What happens is that a browser (lets say Safari) tries to “help” by putting in an expired hash or other information that EE is not expecting, or and doesn’t fully ignore, so even if it did correctly log you in, it will show that error afterwords.

    You could be having other issues too, but I would rule out the stray hash code, or other code in the URI first.

  • #11 / Dec 28, 2010 6:45am

    dcghost

    36 posts

    Basically remove everything to the right of /admin.php then reload/refresh the page..

    That did not help too. :(

    I think the problem is that MSM does not set the current site ID depending on path. In case if my URL is “www.site.com/c/admin.php” the MSM checks my rights for site “a” which is “www.site.com/admin.php”

  • #12 / Dec 28, 2010 7:03am

    dcghost

    36 posts

    Can you confirm that you aren’t using session ids anywhere on your site, cookies only? Are you specifying a cookie domain in your preferences? Which one, if so?

    Yes. All 3 sites has coockie only session

    There are no session_id. For example url:

    http://sites.webtraining.org/c/admin.php?S=0&D=cp&C=login&M=login_form

    About Coockie domain settings. I am not sure about their proper setting values. I will just tell you what I have now:

    For sites A,B,C:

    Cookie Domain: .webtraining.org
    Cookie Path:
    Cookie Prefix: sites

    So what I should do to make it more correct?

  • #13 / Dec 28, 2010 10:53am

    dcghost

    36 posts

    If the problem can’t be fixed. Is there a way to:

    Destroy sites A & B, remove MSM from EE and use with just site C?

  • #14 / Dec 28, 2010 3:47pm

    Ingmar

    29245 posts

    Are you actually logging into muliple sites at once? Are you attmepting to?

  • #15 / Dec 28, 2010 5:00pm

    dcghost

    36 posts

    Are you actually logging into muliple sites at once?

    I have many domains pointing to one site. When someone logs in they are only logged in from the domain they came in. How can I have them logged into all domains at once?

    No. I do not want this. In my case I have 3 sites on one domain. As i wrote it before.

    Site A on http://mydomain/
    Site B on http://mydomain/b/
    Site C on http://mydomain/c/

    All three sites on single EE with MSM

    Are you attmepting to?

    login to CP when I have right to do it for site C only. To be able to do it i would like to have.

    Login for site A on http://mydomain/admin.php
    Login for site B on http://mydomain/b/admin.php
    Login for site c on http://mydomain/c/admin.php

    Or it can be single login but wich will works. Right now in case if i will not have rights for CP of site A there will be error message.

    Also in case if was used link like

    http://mydomain/c/admin.php?S=0&D=cp&C=content_publish&M=entry_form&channel_id=10&entry_id=95

    MSM should force current site to C. Event if session’s state is site A

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases