Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UVE: Layout Editor Publishes Page On Change #30868

Open
ian-b-cooper opened this issue Dec 5, 2024 · 4 comments · May be fixed by #31094
Open

UVE: Layout Editor Publishes Page On Change #30868

ian-b-cooper opened this issue Dec 5, 2024 · 4 comments · May be fixed by #31094

Comments

@ian-b-cooper
Copy link

Parent Issue

No response

Problem Statement

As a limited user without publish permissions who can edit page layouts, I should not be able to publish pages. However, when I go into edit mode, add published content to the page, then change the page layout, the page gets published with the new layout and content that was previously added.

Steps to Reproduce

  1. Create a limited user with all edit, but no publish, permissions
  2. Login as that user and go to any page within edit mode
  3. Add a new piece of published content to the page
  4. Go to the layout editor and change the layout of the container the content was added to
  5. Open the published version of the page and see that page was published with the new content added by the limited user.

Please see the screencast here

Acceptance Criteria

Users who have edit only permissions should not be able to publish additions to pages, including through altering page layouts.

dotCMS Version

Current/Demo

Proposed Objective

User Experience

Proposed Priority

Priority 2 - Important

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

As reported by a customer

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

@fmontes fmontes moved this to Next 1-3 Sprints in dotCMS - Product Planning Dec 6, 2024
@fmontes fmontes changed the title Edit Mode: Layout Editor Publishes Page On Change UVE: Layout Editor Publishes Page On Change Dec 6, 2024
@fmontes
Copy link
Member

fmontes commented Dec 13, 2024

We do a request like this

curl 'http://localhost:8080/api/v1/page/{pageId}/layout?variantName=DEFAULT' \
  -H 'Accept: */*' \
  -H 'Content-Type: application/json' \
  -H 'Origin: http://localhost:8080' \
  -H 'Referer: http://localhost:8080/dotAdmin/' \
  --data-raw '{
    "themeId": "{themeId}",
    "layout": {
      "width": "",
      "title": "anonymouslayout1600437132653",
      "header": true,
      "footer": true,
      "body": {
        "rows": [
          {
            "columns": [
              {
                "containers": [
                  {
                    "identifier": "//demo.dotcms.com/application/containers/banner/",
                    "uuid": "1"
                  }
                ],
                "leftOffset": 1,
                "width": 11,
                "styleClass": "banner-tall"
              }
            ],
            "styleClass": "p-0 banner-tall"
          }
          // Additional rows removed for brevity
        ]
      },
      "version": 1
    }
  }'

Why this is publishing the page if we are hitting layout? @nollymar I think we need to start our research in the backend.

@fabrizzio-dotCMS fabrizzio-dotCMS moved this from Next 1-3 Sprints to In Progress in dotCMS - Product Planning Jan 6, 2025
@fabrizzio-dotCMS fabrizzio-dotCMS moved this from In Progress to Current Sprint Backlog in dotCMS - Product Planning Jan 6, 2025
@jgambarios jgambarios moved this from Current Sprint Backlog to In Progress in dotCMS - Product Planning Jan 6, 2025
@jgambarios
Copy link
Contributor

After conducting some research, I found that calling layouts does not publish anything on the page. Instead, it simply clears the cache, reflecting the changes made by the user. In fact, you can observe the same behavior when a limited user adds content and the cache is flushed from an admin account.

Regarding the cache issue where you add content, and it is not visible on the live preview (which I am currently addressing), I believe this behavior is expected. Specifically, when a limited user adds a piece of published content to the page, it does not count as publishing. Both the page and the content are already published; the user is merely updating the page’s content. In my understanding, this is the intended behavior.

Copy link

github-actions bot commented Jan 9, 2025

@jgambarios
Copy link
Contributor

Note to QA: The content may take a few seconds to appear on the live version of the page, depending on the Cache TTL settings. For testing purposes, the Cache TTL can be set to 0.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

4 participants