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.

Template access permission glitch / live look

November 21, 2007 3:08pm

Subscribe [2]
  • #1 / Nov 21, 2007 3:08pm

    oldgoldblack

    113 posts

    I’m implementing live look on my site (greatest CP update ever!  :coolsmile:), and I’m trying to restrict access to that template, as recommended. But it doesn’t work.

    With permissions, always I’m blocked from the template. I want to limit it to relevant author group, as well as an administrator group (can view and edit all blogs) and of course my superadmin login and no one else. But when anything other than “select all” > “yes” is used, I’m blocked and redirected. With BOTH my superadmin and specified group. With further investigation, it appears we’re all being classified as “guests,” obviously defeating the point.

    I believe everyone has been assigned to their groups properly (people have been posting work, no problem). And why would my superadmin not work? What gives?

  • #2 / Nov 21, 2007 3:12pm

    Lisa Wess

    20502 posts

    Kevin, it sounds like you’re not logged in to the front-end of the site.  What do you have for admin and user session in Admin -> Security and Session preferences? Try setting them to cookies only.

  • #3 / Nov 21, 2007 4:02pm

    oldgoldblack

    113 posts

    Hmm, it was cookies and IDs, switched it to cookies only. Looks like the same problem still. Except now I have to clear my cache to log out, ha.

    Here’s a twist - I have two domains parked on the same IP. I originally used first.com, and now have switched to using second.com, though first.com still works redirects to second.com. However, the CP still operates on first.com/system, and second.com/system redirects there. Could that be the problem? In Admin > System prefs > General config I changed all the urls to second.com when I switched. Is there something else in EE I should change?

  • #4 / Nov 21, 2007 4:09pm

    Lisa Wess

    20502 posts

    Cookies are set only for the domain that you are logging in from, so you need to login from the same domain that you are trying to view the template from.  This isn’t a problem with live look, per se, but that you aren’t logged into the front end of the site.  If you set up a login form on a template then visit it and log in, the live look template should also work; but that step shouldn’t be necessary in general.

  • #5 / Nov 21, 2007 4:21pm

    oldgoldblack

    113 posts

    Allright, that’s the problem. Because live look directs me to second.com/stuff/previewtemplate/999—I manually change it to first.com/stuff/previewtemplate/999 and it works.

    I don’t have a login form on a template, and would rather not have one. So is there any way I can get EE to behave and go to second.com/system? That would solve it, and not require me to make a template and give new instructions to 15 or confused-by-computers users.

    Path .php has has

    $system_path = "./sytem/";

    and all manually configurable variables are “”

    Any ideas?

  • #6 / Nov 21, 2007 4:22pm

    Lisa Wess

    20502 posts

    What do you have for “domain to your site” in general preferences?

  • #7 / Nov 21, 2007 4:27pm

    oldgoldblack

    113 posts

    Not sure what you mean. URL to the root directory of your site is
    http://www.second.com/
    And I don’t want to change it to first.com, certainly, all my links are relative.

  • #8 / Nov 21, 2007 4:29pm

    Lisa Wess

    20502 posts

    All your links, including “View rendered template” will be taking you to that domain.  If you want those links to work, then you’ll need the correct value entered there.

  • #9 / Nov 21, 2007 4:33pm

    oldgoldblack

    113 posts

    “View rendered template” does go to second.com/template—and it works fine. Second.com/preview/#### does not work.
    :ohh:

  • #10 / Nov 21, 2007 4:35pm

    Lisa Wess

    20502 posts

    Yes, because the first template doesn’t require you to be logged in to view the contents; if it did, it would also show the same symptoms.  For instance, create a new template, and put this in it:

    {if logged_in}
    Welcome! You are in group {group_id}
    {/if}
    {if logged_out}
    You are not logged in
    {/if}

    Now view rendered template what happens?

  • #11 / Nov 21, 2007 4:38pm

    oldgoldblack

    113 posts

    Ahhh, You are not logged in. So what can I do? Change URL to the root directory to http://www.first.com/ ? Wouldn’t that change all the relative links on my site too?

  • #12 / Nov 21, 2007 4:43pm

    Lisa Wess

    20502 posts

    You have a few options.  You are using two different domains - you can specifically login from the second domain on the front-end, or visit your control panel using the correct domain.  These things have to match, though, if you want it to work seamlessly.  This isn’t an ExpressionEngine issue, but a cookie/browser issue.

  • #13 / Nov 21, 2007 4:51pm

    oldgoldblack

    113 posts

    However, the CP still operates on first.com/system, and second.com/system redirects there.

    Sorry if I wasn’t clear—this is what I’m talking about. So I can enter second.com/system (correct) every day and twice on Sunday, it’ll still redirect to first.com/system (nooooo). Is that an EE issue?

    If it was just a browser/cache issue I think I would have figured it out by now. I’m dumb but I’m not that dumb. 😊. I test every thing on two computers at once.

  • #14 / Nov 21, 2007 4:58pm

    Lisa Wess

    20502 posts

    No, ExpressinEngine does not do those redirects; that would either be in your .htaccess or something your host had set up.

  • #15 / Nov 21, 2007 5:05pm

    oldgoldblack

    113 posts

    Argh, I’ve already checked .htaccess and server settings I could get to. So on to the host’s support. No fun.

    Thanks for the help in narrowing it down, Lisa. Rapid support today? Amazing! Shouldn’t everyone be out of town? You guys rock.

    Happy Thanksgiving.

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

ExpressionEngine News!

#eecms, #events, #releases