Uploaded image for project: 'eZ Platform Enterprise Edition'
  1. eZ Platform Enterprise Edition
  2. EZEE-637

Editing root location of siteaccess edits wrong object

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: High High
    • Resolution: Fixed
    • Affects Version/s: 16.02
    • Fix Version/s: 16.04
    • Component/s: Studio UI
    • Labels:

      Description

      Have added a new siteaccess to a fresh install of Studio 16-02 and get some strange behavior in the Studio UI when trying to edit the landing_page that is used as root node for this siteaccess.

      To reproduce.

      • Create a simple landing_page under the Location# 2 and set ut a siteaccess the has this location as the root_node
      • Load the Studio UI
      • Click Page
      • Click siteaccess demo
        • The landing_page is shown in my custom pagelayout and full/landing_page.html.twig without any strange behavoir
      • Click Edit
        • Now the page is loaded in the same design, but it is not the content of my landing_page even though the variable content in landing_page.html.twig is the one I tries to edit.
        • The content object which is loaded in edit part (with all the purple lines around) is the root_node of the ezstudio demo siteaccess. Location# 2 and not Location# 103 as I expect.

        Activity

        Hide
        Kamil Musiał (Inactive) added a comment - - edited

        I cannot reproduce that bug. Can you please provide your configuration, files and content structure you created?

        Show
        Kamil Musiał (Inactive) added a comment - - edited I cannot reproduce that bug. Can you please provide your configuration, files and content structure you created?
        Hide
        Vangen Plotz added a comment -

        app/config/ezplatform.yml

        ezpublish:
            # Siteaccess configuration, with one siteaccess per default
            siteaccess:
                list:
                  - site
                  - demo
                groups:
                    site_group:
                        - site
                        - demo
                    demo_group:
                        - demo
                default_siteaccess: site
                match:
                    URIElement: 1
            system:
                site_group:
                    var_dir: var/site
                site:
                    languages:
                        - eng-GB
                        - fre-FR
                        - ger-DE
                        - nor-NO
                demo:
                    content:
                        tree_root:
                            location_id: 103
                            excluded_uri_prefixes: [ /media, /users ]
                    languages:
                        - eng-GB
                        - nor-NO
        

        override.yml

        system:
            demo_group:
                content_view:
                    full:
                        landing_page:
                            template: VPTestBundle:full:landing_page.html.twig
                            match:
                                Identifier\ContentType: [landing_page]
        

        full/landing_page.html.twig

        {% extends "VPTestBundle::pagelayout.html.twig" %}
         
        {% block content %}
            {{ ez_render_field(content, 'page', {
                'attr': {
                    'class': 'landing-page--dynamic landing-page'
                }
            }) }}
        {% endblock %}
        

        pagelayout.html.twig is just a copy of the one in demobundle

        Location# 103 is a landing_page placed under root. /1/2/103

        Show
        Vangen Plotz added a comment - app/config/ezplatform.yml ezpublish: # Siteaccess configuration, with one siteaccess per default siteaccess: list: - site - demo groups: site_group: - site - demo demo_group: - demo default_siteaccess: site match: URIElement: 1 system: site_group: var_dir: var/site site: languages: - eng-GB - fre-FR - ger-DE - nor-NO demo: content: tree_root: location_id: 103 excluded_uri_prefixes: [ /media, /users ] languages: - eng-GB - nor-NO override.yml system: demo_group: content_view: full: landing_page: template: VPTestBundle:full:landing_page.html.twig match: Identifier\ContentType: [landing_page] full/landing_page.html.twig {% extends "VPTestBundle::pagelayout.html.twig" %}   {% block content %} {{ ez_render_field(content, 'page', { 'attr': { 'class': 'landing-page--dynamic landing-page' } }) }} {% endblock %} pagelayout.html.twig is just a copy of the one in demobundle Location# 103 is a landing_page placed under root. /1/2/103
        Hide
        Łukasz Serwatka added a comment -

        Thank you for providing extra information. Based on your latest comment we managed to reproduce this problem. At the moment we are working on the solution.

        Show
        Łukasz Serwatka added a comment - Thank you for providing extra information. Based on your latest comment we managed to reproduce this problem. At the moment we are working on the solution.
        Hide
        Kamil Musiał (Inactive) added a comment -

        We provided a solution, it will be merged into main repository. To test it now you can apply attached patch on vendor/ezsystems/studio-ui-bundle

        Show
        Kamil Musiał (Inactive) added a comment - We provided a solution, it will be merged into main repository. To test it now you can apply attached patch on vendor/ezsystems/studio-ui-bundle
        Hide
        Vangen Plotz added a comment -

        Now we can edit the correct object, but when we click publish we end up on the wrong place.

        We ends up here: http://site.local/ez#/studio/insite/%2Fdemo%2FLandingPageLocation
        Should have ended up here: http://site.local/ez#/studio/insite/%2Fdemo%2F

        The location LandingPageLocation is the top_location of the siteaccess.

        Show
        Vangen Plotz added a comment - Now we can edit the correct object, but when we click publish we end up on the wrong place. We ends up here: http://site.local/ez#/studio/insite/%2Fdemo%2FLandingPageLocation Should have ended up here: http://site.local/ez#/studio/insite/%2Fdemo%2F The location LandingPageLocation is the top_location of the siteaccess.

          People

          • Assignee:
            Unassigned
            Reporter:
            Vangen Plotz
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 1 day
              1d