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 Restriction, why dont keep my choices in templates?

September 30, 2011 2:53am

Subscribe [3]
  • #1 / Sep 30, 2011 2:53am

    bmovie

    619 posts

    This question may be related to a resolved thread.

    hi sorry for post again about this! but really, dont work well, I do a video for explain this:

    http://www.youtube.com/watch?v=tVP4WIQ1U8A

    select a template:
    Template Preferences Manager > Template Groups > Select Templates
    Template Access Restriction > Member Group Can > View This Page
    and select in Do Not Change/No/Yes
    I select YES by example…
    UPDATE

    and now return and select the same template and dont see my last choice “YES”, dont keep my choice and I fell completely LOST about my choices because are empty!

    any help, thanks

  • #2 / Sep 30, 2011 3:02am

    John Henry Donovan

    12339 posts

    bmovie,

    What version and build of EE are you using?
    Take a look at he following bug report which I believe may be your issue
    https://support.ellislab.com/bugs/detail/16157

    Does Wes’s solution help?

  • #3 / Sep 30, 2011 3:11am

    bmovie

    619 posts

    bmovie,

    What version and build of EE are you using?
    Take a look at he following bug report which I believe may be your issue
    https://support.ellislab.com/bugs/detail/16157

    Does Wes’s solution help?

    thanks

    sorry about double post, is because I post first here in 1.x but it was post in 2.x

    I use the:  v2.2.2 - Build: date 20110801

    and yes I think is the same, I ask for that since the 1.x version, see http://ellislab.com/forums/viewthread/165824/

  • #4 / Sep 30, 2011 3:13am

    John Henry Donovan

    12339 posts

    bmovie,

    Can you go ahead and make Wes’s change please and see if that works for you?

  • #5 / Sep 30, 2011 3:22am

    bmovie

    619 posts

    I try but say:

    (“checked”,”“) and replace it with (“checked”,false)

    and I dont find any (“checked”,”“) in the .js

    checked’s finds:

    (“checked”,!1)

    (“checked”,“checked”)

    (“checked”)

  • #6 / Sep 30, 2011 9:42am

    Wes Baker

    343 posts

    bmovie,

    First, are you having the same problems as that related thread? Where the access settings weren’t already set on the Template Manager?

    The reason I ask is I think what you’re reporting is intentional behavior within the Template Preferences Manager. If you were to select several templates from several groups and each has a different setting, we can’t choose between “Yes” and “No” since they could be mixed. That being said, I do think there’s a bit of a bug there. I would assume that when you load that page “Do Not Change” should be selected for all member groups and you’d have to change to one or the other. I will go ahead and make that change.

    Wes

  • #7 / Sep 30, 2011 2:51pm

    bmovie

    619 posts

    bmovie,

    First, are you having the same problems as that related thread? Where the access settings weren’t already set on the Template Manager?

    The reason I ask is I think what you’re reporting is intentional behavior within the Template Preferences Manager. If you were to select several templates from several groups and each has a different setting, we can’t choose between “Yes” and “No” since they could be mixed. That being said, I do think there’s a bit of a bug there. I would assume that when you load that page “Do Not Change” should be selected for all member groups and you’d have to change to one or the other. I will go ahead and make that change.

    Wes

    mmm yes I not an expert but I see problems in template preferences manager; I explain one more time:

    Think in this EXAMPLE: (just an example)
    click on any channel > “Channel Preferences” Allow comments in this channel? NO click on Update;
    return to same “Channel Preferences” of same channel, and find the radio buttoms empty !! not NO or YES, the user are lost… that that would be really bad!

    and that happened in Template Preferences Manager, you can check the video.

    you got it?

    thank you

  • #8 / Sep 30, 2011 3:07pm

    Wes Baker

    343 posts

    Alright, the missing selected radio buttons on the Template Preferences Manager will be fixed in the next version. The radio buttons won’t be empty by default, they’ll have “Do Not Change” selected by default. Does that fix the problem for you?

    Just to double check, your example about Channel Preferences and “Allowing comments in this channel” is not happening?

    Wes

  • #9 / Sep 30, 2011 3:14pm

    bmovie

    619 posts

    Alright, the missing selected radio buttons on the Template Preferences Manager will be fixed in the next version. The radio buttons won’t be empty by default, they’ll have “Do Not Change” selected by default. Does that fix the problem for you?

    YES!!! I need it! Im really lost, I need now make ALL changes in the templates one time! because when return all are empty so is a dessmess, I hope that new version are released soon.

    Just to double check, your example about Channel Preferences and “Allowing comments in this channel” is not happening?

    that is just and example, Channel Preferences and “Allowing comments in this channel” works well, hold the radio buttons, stick well the buttons, I can return and see my choices when I want.

  • #10 / Sep 30, 2011 3:21pm

    Wes Baker

    343 posts

    YES!!! I need it! Im really lost, I need now make ALL changes in the templates one time! because when return all are empty so is a dessmess, I hope that new version are released soon.

    It should be out soon, but if you need it sooner, here’s the fix. Open up system/expressionengine/controllers/cp/design.php and look at line 1266 and you should see this:

    $radio_options .= '<label>'.form_radio('access_'.$row->group_id, $key, '', 'class="access_'.$key.'"').NBS.$lang.'</label>'.NBS.NBS.NBS.NBS.NBS.NBS.NBS;

    Replace that with this:

    $checked = ($key === 'null') ? TRUE : FALSE;
    $radio_options .= '<label>'.form_radio('access_'.$row->group_id, $key, $checked, 'class="access_'.$key.'"').NBS.$lang.'</label>'.NBS.NBS.NBS.NBS.NBS.NBS.NBS;

    Next, look on line 1274 (or 1275 now) for this block of code:

    $select_all_radios = '<label>'.form_radio('select_all', 'access_null', '', 'class="select_all"').NBS.lang('do_not_change').'</label>'.NBS.NBS.NBS.NBS.NBS.NBS.NBS;
    $select_all_radios .= '<label>'.form_radio('select_all', 'access_y', '', 'class="select_all"').NBS.lang('yes').'</label>'.NBS.NBS.NBS.NBS.NBS.NBS.NBS;
    $select_all_radios .= '<label>'.form_radio('select_all', 'access_n', '', 'class="select_all"').NBS.lang('no').'</label>';

    Replace that with this:

    $select_all_radios = '<label>'.form_radio('select_all', 'access_null', TRUE, 'class="select_all"').NBS.lang('do_not_change').'</label>'.NBS.NBS.NBS.NBS.NBS.NBS.NBS;
    $select_all_radios .= '<label>'.form_radio('select_all', 'access_y', FALSE, 'class="select_all"').NBS.lang('yes').'</label>'.NBS.NBS.NBS.NBS.NBS.NBS.NBS;
    $select_all_radios .= '<label>'.form_radio('select_all', 'access_n', FALSE, 'class="select_all"').NBS.lang('no').'</label>';

    Let me know if you have any problems with this.

    Wes

     

  • #11 / Sep 30, 2011 3:22pm

    bmovie

    619 posts

    YES!!! I need it! Im really lost, I need now make ALL changes in the templates one time! because when return all are empty so is a dessmess, I hope that new version are released soon.

    It should be out soon, but if you need it sooner, here’s the fix. Open up system/expressionengine/controllers/cp/design.php and look at line 1266 and you should see this:

    $radio_options .= '<label>'.form_radio('access_'.$row->group_id, $key, '', 'class="access_'.$key.'"').NBS.$lang.'</label>'.NBS.NBS.NBS.NBS.NBS.NBS.NBS;

    Replace that with this:

    $checked = ($key === 'null') ? TRUE : FALSE;
    $radio_options .= '<label>'.form_radio('access_'.$row->group_id, $key, $checked, 'class="access_'.$key.'"').NBS.$lang.'</label>'.NBS.NBS.NBS.NBS.NBS.NBS.NBS;

    Next, look on line 1274 (or 1275 now) for this block of code:

    $select_all_radios = '<label>'.form_radio('select_all', 'access_null', '', 'class="select_all"').NBS.lang('do_not_change').'</label>'.NBS.NBS.NBS.NBS.NBS.NBS.NBS;
    $select_all_radios .= '<label>'.form_radio('select_all', 'access_y', '', 'class="select_all"').NBS.lang('yes').'</label>'.NBS.NBS.NBS.NBS.NBS.NBS.NBS;
    $select_all_radios .= '<label>'.form_radio('select_all', 'access_n', '', 'class="select_all"').NBS.lang('no').'</label>';

    Replace that with this:

    $select_all_radios = '<label>'.form_radio('select_all', 'access_null', TRUE, 'class="select_all"').NBS.lang('do_not_change').'</label>'.NBS.NBS.NBS.NBS.NBS.NBS.NBS;
    $select_all_radios .= '<label>'.form_radio('select_all', 'access_y', FALSE, 'class="select_all"').NBS.lang('yes').'</label>'.NBS.NBS.NBS.NBS.NBS.NBS.NBS;
    $select_all_radios .= '<label>'.form_radio('select_all', 'access_n', FALSE, 'class="select_all"').NBS.lang('no').'</label>';

    Let me know if you have any problems with this.

    Wes

    great, I need it now, yes… I go to make the changes and I let you know soon.

  • #12 / Sep 30, 2011 3:44pm

    bmovie

    619 posts

    Wes,

    mmm works but not like would be… see now ok appear the radio buttons in “do not change” I make this changes in one template for test:
    (see the screenshot please)

    I click update….

    I return to same template, and it show all in Do Not Change, so, dont keep my choices, dont stick the radio buttons… :(

  • #13 / Sep 30, 2011 4:02pm

    Wes Baker

    343 posts

    bmovie,

    As I said before, I can’t assume what a specific template’s settings are going to be because you can always select more than one template. “Do Not Change” serves as a way to give you the same result for one and more individual templates.

    Wes

  • #14 / Oct 03, 2011 1:42am

    bmovie

    619 posts

    bmovie,

    As I said before, I can’t assume what a specific template’s settings are going to be because you can always select more than one template. “Do Not Change” serves as a way to give you the same result for one and more individual templates.

    Wes

    thanks

    with more than one make sense the “do not change” but try, make changes in one, and put some like yes, no, yes, no, no etc… and return and see that dont stick my choices (radio buttons) visually lost my choices; maybe I explain bad but or something but see the video, speaks for itself.

     

     

  • #15 / Oct 03, 2011 9:44am

    Wes Baker

    343 posts

    with more than one make sense the “do not change” but try, make changes in one, and put some like yes, no, yes, no, no etc… and return and see that dont stick my choices (radio buttons) visually lost my choices; maybe I explain bad but or something but see the video, speaks for itself.

    The thing is, your changes are not lost: they are saved and stored. If you want to check on that (and edit a specific template’s settings) your best bet is to edit the specific template and view the access settings there (take a look at my screenshot).

    The Template Preferences Manager is specifically for editing multiple templates at once, which is why “Do Not Change” makes sense because you could be editing several templates that all started with different settings. And sometimes you’ll want to change all of those templates to the same setting, and sometimes, you’ll want to leave them alone. Also, this is a note in the documentation that might help:

    With the Template Access Restrictions, if you select Do Not Change for a group and it is already not allowed to view a template it will remain so. If it can view a template, that will remain as well. In this way, templates with different combinations of groups access can all be modified to allow or disallow a particular group.

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

ExpressionEngine News!

#eecms, #events, #releases