We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44920
    • 48 Posts
    Hi,

    i'm building multilingual site (using Babel) and i'd like it to feature also blog (for now i'm using Articles).

    as Babel requests i have multiple contexts - one for each language:

    web (for english)
    DE (for deutsch)
    FR (for french)
    


    basic multilingual site works fine.

    i added blog - as a test i put it into "web" context. that worked fine.

    but then i needed to limit some users to have back-end access to blog only and have other website resources (documents) restricted. so i removed the blog from "web" context. duplicated "web" context and named new instance "blog". there i created new blog. context setup looks like this:

    web (for english) - cultureKey=en; base_url=/mysite/; site_url=http://mydomain/mysite/; site_start=...
    DE (for deutsch) - cultureKey=de; base_url=/mysite/de/; site_url=http://mydomain/mysite/de/; site_start=...
    FR (for french) - cultureKey=fr; base_url=/mysite/fr/; site_url=http://mydomain/mysite/fr/; site_start=...
    blog (for blog) - cultureKey=en; base_url=/mysite/blog/; site_url=http://mydomain/mysite/blog/; site_start=...
    
    blog Container Alias = test-blog
    


    my problem is that i cannot now access the blog in front-end.

    tried:
    http://mydomain/mysite/blog/
    http://mydomain/mysite/blog/test-blog
    http://mydomain/mysite/test-blog

    none of above does not work.

    also i have problem with SimpleSearch extra. i have it in default setup (search form in template which is common for all the contexts + separate search results page in "web" context + landing parameter in SimpleSearchForm tag) something like this:
    [[!SimpleSearchForm? &method=`POST` &landing=`14`]]
    the search work on english version of the site only ("web" contexts). if i do the search in other version of the site it returns search results from english version only.

    not sure if these 2 issues might be related or not.
    maybe the first issue relates to config in .htaccess:

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(en|de|fr)/assets(.*)$ assets$2 [L,QSA]
      
    # redirect all other requests to /de/* and /nl/*
    # to index.php and set the cultureKey parameter
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(en|de|fr)?/?(.*)$ index.php?cultureKey=$1&q=$2 [L,QSA]
    


    but not quite sure.
    could you please nudge me the right way to find a workaround for this

    thank you in advance
      MODX Revolution 2.2.8-pl (advanced)

      Extras:
      archivist 1.2.4 | Articles 1.7.1 | Babel 2.2.5 | getpage 1.2.3 | getresources 1.6.0 | quip 2.3.3 | SimpleSearch 1.6.1 | taglister 1.1.7 | TinyMCE 4.3.3 | Wayfinder 2.3.3

      PHP Version 5.6.20-0
      MySQL Version 5.5.31
      • 3749
      • 24,544 Posts
      Try this:

      Look at the ACL entry described in steps 11 and 12 here: http://bobsguides.com/default-acl-entries.html

      Create another ACL entry just like it for each of your contexts.

        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 44920
        • 48 Posts
        Quote from: BobRay at Sep 10, 2013, 02:20 PM
        Try this:

        Look at the ACL entry described in steps 11 and 12 here: http://bobsguides.com/default-acl-entries.html

        Create another ACL entry just like it for each of your contexts.


        My ACL entries are described here:
        https://forums.modx.com/thread/86563/limit-user-039-s-access-access-to-blog-only?page=2#dis-post-477379

        kr
          MODX Revolution 2.2.8-pl (advanced)

          Extras:
          archivist 1.2.4 | Articles 1.7.1 | Babel 2.2.5 | getpage 1.2.3 | getresources 1.6.0 | quip 2.3.3 | SimpleSearch 1.6.1 | taglister 1.1.7 | TinyMCE 4.3.3 | Wayfinder 2.3.3

          PHP Version 5.6.20-0
          MySQL Version 5.5.31
          • 44920
          • 48 Posts
          ok. probably found the source of my problems. in order to make multiple languages content to work together with Babel i added (following the tutorial) also this "gateway" plugin:
          <?php
          if ($modx->context->get('key') != "mgr")
          {
            /* grab the current langauge from the cultureKey request var */
            switch ($_REQUEST['cultureKey']) {
              case 'de':
                /* switch the context */
                $modx->switchContext('DE');
              break;
          
              case 'fr':
                /* switch the context */
                $modx->switchContext('FR');
              break;
          
              default:
                /* Set the default context here */
                $modx->switchContext('web');
              break;
            }
            
            /* unset GET var to avoid
             * appending cultureKey=xy to URLs by other components */
            unset($_GET['cultureKey']);
          }
          

          and for "blog" context i have cultureKey = "en"
          so instead of ending up in "blog" context it ends up in "web"
          and that's why i cannot see my blog

          now i need to find some fix for this

          also some other issues remain unsolved e.g.
          Error!
          Access denied.
          issue in manager for "limited" user as described in my other post

          kr
            MODX Revolution 2.2.8-pl (advanced)

            Extras:
            archivist 1.2.4 | Articles 1.7.1 | Babel 2.2.5 | getpage 1.2.3 | getresources 1.6.0 | quip 2.3.3 | SimpleSearch 1.6.1 | taglister 1.1.7 | TinyMCE 4.3.3 | Wayfinder 2.3.3

            PHP Version 5.6.20-0
            MySQL Version 5.5.31
            • 3749
            • 24,544 Posts
            I think if you put the blog back in the web context and make sure that *all* of the ACL entries you use to limit the Manager Users have a context of 'mgr', all the pages should be available again in the front end.

            That could possibly solve your other problem as well.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 44920
              • 48 Posts
              Quote from: BobRay at Sep 12, 2013, 05:38 PM
              I think if you put the blog back in the web context and make sure that *all* of the ACL entries you use to limit the Manager Users have a context of 'mgr', all the pages should be available again in the front end.

              That could possibly solve your other problem as well.

              Thank you, Bob,

              followed your suggestion to move the blog back to "web" content.
              that did the trick so i could see it again in front-end.

              read you Revo Permissions guide however some parts are still not clear to me.

              My goal is:
              - front end access to the site and blog for all visitors - which makes sense smiley

              - 3 levels of back-end access = manager
              ADMIN - can access everything - that is built in by default i think
              BLOG ONLY - users that can access blog only for editing / adding / managing comments etc.
              BLOG + SITE CONTENT - users with access as previous group + can access site content for editing (in all context "web", "DE" & "FR"

              i've created 2 Resource Groups
              "blog only" - and put there "test-blog" from "web" resources
              and
              "blog_and_site_content" - and put there all the resources from all the contexts ("web", "DE" & "FR")


              for "anonymous user" group i have Context Access like this:
              web   Member - 9999   Load, List and View
              DE    Member - 9999   Load Only
              FR    Member - 9999   Load Only
              


              nothing in "Resource Group Access", "Element Category Access" & "Media Source Access"
              in front-end i can now access english, DE & FR content but not blog

              what can i do to be able to see the blog in front end?

              for test user group i have "Context Access" like this:
              mgr   Member - 9999   Content Editor
              web   Member - 9999   Load, List and View
              


              "Resource Group Access" like this:
              blog only   Member - 9999   Load, List and View   web
              


              nothing in "Element Category Access" & "Media Source Access"

              in back-end, members of "test" user group have access to whole "web" context - so can edit site content and blog

              what can i do to make "test" user group being able to access only "test-blog" under "web" context rather than everything there?

              thank you in advance
              kr
                MODX Revolution 2.2.8-pl (advanced)

                Extras:
                archivist 1.2.4 | Articles 1.7.1 | Babel 2.2.5 | getpage 1.2.3 | getresources 1.6.0 | quip 2.3.3 | SimpleSearch 1.6.1 | taglister 1.1.7 | TinyMCE 4.3.3 | Wayfinder 2.3.3

                PHP Version 5.6.20-0
                MySQL Version 5.5.31
                • 3749
                • 24,544 Posts
                First, try adding the admin to all user groups (with a role of admin Super User).

                If I'm understanding you the problem is that it *is* possible to hide Resources from the admin unless the admin is a sudo user. Generally, adding the admin to all user groups will prevent lots of confusing problems.

                Whenever you connect a Resource Group to a User Group with a Resource Group Access ACL entry, you hide those Resources from anyone outside the group, unless their group is explicitly given access to them.
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 44920
                  • 48 Posts
                  Succeeded to make it working almost the way i wanted.

                  Read full story here

                  kr
                    MODX Revolution 2.2.8-pl (advanced)

                    Extras:
                    archivist 1.2.4 | Articles 1.7.1 | Babel 2.2.5 | getpage 1.2.3 | getresources 1.6.0 | quip 2.3.3 | SimpleSearch 1.6.1 | taglister 1.1.7 | TinyMCE 4.3.3 | Wayfinder 2.3.3

                    PHP Version 5.6.20-0
                    MySQL Version 5.5.31