phpsymfonyyamlezpublishezplatform

eZ Platform site access for translations not working as expected


I am having no joy in successfully getting a translated site-access to work. I have a clean install of the latest stable ezplatform, i have only the default content types "folder" and "article". I have one content object after the root location and have the said object in english and german (where the new language code is ger-DE. This is my attempt at an ultra basic ezplatform.yml:

siteaccess:
    list:
        - site
        - de
        - en
    groups:
        site_group:
            - site
            - de
            - en
    default_siteaccess: de
    match:
        URIElement: 1

# System settings, grouped by siteaccess and/or siteaccess group
system:
    site_group:
        api_keys: { google_maps: "uhuhuhuhuhuhuhuhuhuuuuuuuuu" }
        cache_pool_name: '%cache_pool%'
        var_dir: var/site
    de:
        languages: [ger-DE, eng-GB]
    en:
        languages: [eng-GB]
    default:
        content:
            tree_root:
                location_id: 54
                excluded_uri_prefixes: [ /media, /images ]
        image_variations:
            list:
                reference: null
                filters:
                    - { name: geometry/scalewidth, params: [260] }
            articleimage:
                reference: null
                filters:
                    - { name: geometry/scalewidth, params: [770] }
        session:
            name: pzbsession
            cookie_lifetime: 86400
            cookie_secure: false
            cookie_httponly: true
        user:
            layout: pagelayout.html.twig
        content_view:
            full:
                root_folder:
                    template: "full/home_page.html.twig"
                    match:
                        Identifier\ContentType: "home_page"

I fire up the server locally with the server start command, I can access the sample object with the following url: http://localhost:8000/sdc I can access the new site access via http://localhost:8000/de_site and it looks like it hits the site access as no 404 is thrown But.. whatever I do it always redirects to http://localhost:8000/de_site/login instead of hitting the actual content tree and content override for type ‘article’

Is there a glaring mistake in my yml config attempt or is there something I have to also do to make this work?


Solution

  • Every time you add a siteaccess in eZ, you should update the anonymous role and add the corresponding user/login access policy to the new siteaccess. Also check that the anonymous role have appropriate policies for enabling access to read required contenttypes and section.