Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-24856

Adding por-PT siteaccess on eZ Platform will return exception

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: High High
    • Resolution: Invalid
    • Affects Version/s: 2015.07
    • Fix Version/s: QA tracked issues
    • Component/s: DemoBundle
    • Labels:

      Description

      After installing eZ Platform I've added a new siteaccess, in this caso demo_pt and the ezpublish.yml configuration are:

      ezpublish:
          # Define all your repositories here
          # If you use multi-site with multiple databases, you should define multiple repositories
          repositories:
              # "main" repository, with default values for storage
              # Same as:
              # demo_repository:
              #     storage:
              #         engine: legacy
              #         connection: default
              #     search:
              #         engine: %search_engine%
              #         connection: default
              demo_repository:
                  storage: ~
                  search:
                      engine: %search_engine%
                      connection: default
       
          siteaccess:
              # Available siteaccesses
              list:
                  - demo_site
                  - demo_pt
              # Siteaccess groups. Use them to group common settings.
              groups:
                  demo_site_group: [demo_site, demo_pt]
              default_siteaccess: demo_site
              match:
                  URIElement: 1
       
          imagemagick:
              enabled: false
       
          # System settings, grouped by siteaccess and/or siteaccess group
          system:
              demo_site_group:
                  repository: demo_repository
                  var_dir: var/ezdemo_site
                  languages:
                      - eng-GB
                      - por-PT
                  session:
                      name: eZSESSID
              demo_site:
                  languages:
                      - eng-GB
              demo_pt:
                  languages:
                      - por-PT
              default:
                  content:
                      view_cache: true
                      ttl_cache: true
                      # TTL cache (http) in seconds
                      # Note that Http cache for a given content is always invalidated when publishing that content
                      default_ttl: 300
      

      If I try to access the frontpage it will return the following exception

      An exception has been thrown during the rendering of a template ("Could not find 'Language' with identifier 'por-PT'") in eZDemoBundle::pagelayout.html.twig at line 39. 
      

      If I go into pagelayout.html.twig and comment the top menu

                  {#{ render(
                      controller(
                          "eZDemoBundle:Menu:topMenu",
                          {'currentLocationId': currentLocation is defined ? currentLocation.id : null}
                      )
                  ) }#}
      

      the error disappears

        Issue Links

          Activity

          Hide
          Bertrand Dunogier added a comment -

          Did you add the language to the repository ?

          Show
          Bertrand Dunogier added a comment - Did you add the language to the repository ?
          Hide
          Pedro Resende (Inactive) added a comment -

          In order to add the language to the repository I had to install using legacy bridge

          Show
          Pedro Resende (Inactive) added a comment - In order to add the language to the repository I had to install using legacy bridge
          Hide
          Bertrand Dunogier added a comment -

          This doesn't really answer the question.

          In the description, you say that you add a siteaccess for a new language, and don't mention at any point if you have added the language to the repository or not.

          Show
          Bertrand Dunogier added a comment - This doesn't really answer the question. In the description, you say that you add a siteaccess for a new language, and don't mention at any point if you have added the language to the repository or not.
          Hide
          Pedro Resende (Inactive) added a comment -

          Bertrand Dunogier: How can I add a new language, in eZ Platform, to the repository ? The only way I see is using legacy bridge

          Show
          Pedro Resende (Inactive) added a comment - Bertrand Dunogier : How can I add a new language, in eZ Platform, to the repository ? The only way I see is using legacy bridge
          Hide
          Bertrand Dunogier added a comment -

          To add a language, you can either install legacy bridge, yes, or write a command line script.

          Anyway, language management is being implemented. Maybe you can wait for the stories to be implemented.

          But in any case, I would just close this (and the other) as invalid: if you haven't added the language, whatever the reason, it makes no sense to report that the new language isn't used.

          Show
          Bertrand Dunogier added a comment - To add a language, you can either install legacy bridge, yes, or write a command line script. Anyway, language management is being implemented. Maybe you can wait for the stories to be implemented. But in any case, I would just close this (and the other) as invalid: if you haven't added the language, whatever the reason , it makes no sense to report that the new language isn't used.
          Hide
          Paulo Nunes (Inactive) added a comment -

          I'll close this issue then.

          Show
          Paulo Nunes (Inactive) added a comment - I'll close this issue then.

            People

            • Assignee:
              Unassigned
              Reporter:
              Pedro Resende (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: