umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
MIT License
4.45k stars 2.68k forks source link

"publish with descendants" action not publishing descendants #13739

Open shearer3000 opened 1 year ago

shearer3000 commented 1 year ago

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

experienced on multiple versions of 10 e,g. 10.3.2

Bug summary

When performing the “publish with descendants” action from the context menu on the ‘save and publish' button, the history tab on any child/descendant content nodes doesn’t show a corresponding ‘content published’ event in the history (info tab). i.e. it doesn’t actually publish the descendant contents.

image

Specifics

No response

Steps to reproduce

  1. Go to a content node with children and/or descendants
  2. Perform “publish with descendants” action via the ‘save and publish’ button menu
  3. Go to any of the children/descendant contents, and look at history tab audit

Expected result / actual result

expected result: history tab shows a ‘content published’ event with a datestamp reflectiong when the action from reproduction steps was performed actual result: no event listed on history tab (children/descendant contents not published as instructed)

github-actions[bot] commented 1 year ago

Hi there @shearer3000!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face:

Zeegaan commented 1 year ago

Hey @shearer3000, I cannot reproduce this, they published fine for me 😅 Altough the tree needs a manual update to display they all have been published, and it shows on the history 🤔 I have taken a gif of me doing so, am I doing something wrong here? 🤔 PublishWithDescendants

lesley-w commented 1 year ago

I have the same issue on v10.6.1 It's a site that we have just upgraded from v7.3.5

Zeegaan commented 1 year ago

@lesley-w Could you come up with a few steps from a clean install (Just with no custom code) that can reproduce this? We sadly cannot help as long as we cannot reproduce this 😞

lesley-w commented 1 year ago

@Zeegaan I think the problem is in ContentServuce.SaveAndPublishBranch_ShouldPublish

If a page is already published and hasn't been edited, then it won't publish it again:

    // if published, republish
    if (published)
    {
        if (cultures == null)
        {
            cultures = new HashSet<string>(); // empty means 'already published'
        }
        if (edited)
        {
            cultures.Add(c); // <culture> means 'republish this culture'
        }
        return cultures;
    }

In our situation, we are wanting to republish all the descendants, even though they haven't been edited, so that the migrated data is visible on the upgraded website.

Should PublishWithDescendants force the publication regardless of the edited status, but respecting the choice of whether to include unpublished items?

Rockerby commented 12 months ago

I'm seeing the same thing here. Screenshare below (ignore the mouse cursor - it's gone very weird!) SS is using 12.2.0 but also tested on 10.6.1 which did the same.

Summary of actions. All actions create a published audit record on the parent node.

chrome_GJUk3w1acy

Zeegaan commented 12 months ago

Thanks for your input here, I think I am seeing the issue now! I will bring this up with the team to discuss this behavior 😊

lesley-w commented 12 months ago

@Zeegaan Even just having an option to force the republication of all published descendants regardless of edit status would work.

bkclerke commented 12 months ago

I second what @lesley-w said too. We are running into an issue as well where we need the same "Save & Publish" functionality for all the child/descendants in order to properly sync content with usync and this would be massively helpful. If it was an option similar to the toggle for "include all unpublished items", that could work too. It doesn't have to be the default action (which I get for performance reasons).

Zeegaan commented 11 months ago

Hello everyone! Sorry for coming back late, there was some potato holiday at play 🥔

I've talked with the team, but to our understanding, we would not like to refactor this with for example an option.

It seems you could try this manually in code instead. Or if its using uSync, they could make some code that would do this, could you try this out? 👍

HenrietteWalker commented 1 week ago

Hi! Our users are experiencing significant issues because PublishWithDescendants does not publish descendant items that are unedited. Could you reconsider providing this functionality for us, perhaps as an optional feature as suggested by @lesley-w? What is the reason that unedited items are not re-published? :) Thanks in advance!

bythewiseman commented 6 days ago

We have faced this today due to someone removing a property and adding it back it. It meant the value became null in Examine and the search no longer worked until we manually published all nodes again.

[ ] Force Publish even if not changed

would be an excellent addition.