Skip to content

Conversation

fredden
Copy link
Member

@fredden fredden commented Jul 8, 2022

Description

There is a bug in PageBuilder where child content nodes are going missing. These exist and work just fine when the content is first created, and saved, and shows correctly on the front-end. However, when the form is re-rendered in the admin, the children have been deleted, so saving the page/content a second time deletes these content nodes.

This is because the list of child nodes is replaced rather than added to when walking the node tree.

Manual testing scenarios

  1. Create a new content type with a master template which has several siblings HTML nodes. For example,
<section class="pagebuilder-windmill" attr="data.main.attributes" ko-style="data.main.style" css="data.main.css"> <div class="wrapper"> <render args="masterTemplate" ></render> </div> <div class="pagination" if="data.main.attributes()['data-show-dots']"></div> <if args="data.main.attributes()['data-show-arrows']"> <div class="button-prev"></div> <div class="button-next"></div> </if> <div class="scrollbar" if="data.main.attributes()['data-show-scrollbar']"></div> </section>
  1. Create a new Page in the admin and use this new content type.
  2. Populate the content type with some child nodes (which will show up in the preview & on the front-end where we have the <render /> tag)
  3. Save (and close) the page in the admin.
  4. Check all is well on the front-end.
  5. Click "edit" the same page in the admin, make no changes, click "save".
  6. Observe the content has been erased by viewing the front-end and/or the admin.

Checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)
@hc-sven
Copy link

hc-sven commented Jan 19, 2023

When will this be merged? This is a real issue. I can confirm that this change fixes the problem!

(We added a module to overwrite the stage-builder.js file for now)

@paras89
Copy link
Contributor

paras89 commented Jan 19, 2023

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Hotel
Copy link
Collaborator

@magento run all tests

@engcom-Hotel engcom-Hotel self-requested a review February 12, 2024 13:59
@engcom-Hotel engcom-Hotel added the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label Feb 12, 2024
Copy link
Collaborator

@engcom-Hotel engcom-Hotel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @fredden,

Thanks for the collaboration!

The Changes seem good to me but can you please cover the changes with some automated tests?

Thanks

@engcom-Hotel
Copy link
Collaborator

@magento run Functional Tests EE, WebAPI Tests

@engcom-Hotel
Copy link
Collaborator

@magento run all tests

@engcom-Hotel
Copy link
Collaborator

@magento run WebAPI Tests, Unit Tests, Performance Acceptance Tests, Integration Tests, Functional Tests EE, Functional Tests CE, Functional Tests B2B

@engcom-Hotel
Copy link
Collaborator

Hello @fredden,

We have tried to reproduce the issue in the latest development branch ie 2.4-develop but it seems the issue is not reproducible for us.

For reference, we are attaching the custom module through which we have tried to reproduce the issue:
Magz.zip

Let us know if we missed anything.

Thanks

@engcom-Hotel
Copy link
Collaborator

Hello @fredden,

Have you got a chance to check the above comment?

Thanks

@fredden
Copy link
Member Author

fredden commented May 16, 2024

@engcom-Hotel I have seen your request. I have not yet found time to review this in detail. I will respond here when I've done so.
I know that we had this problem on the latest version of this module on a website recently, and applying these proposed changes resolved the issue.

@engcom-Hotel
Copy link
Collaborator

Hello @fredden,

Have you got a chance to check this PR? Actually, according to this #813 (comment), we are not able to reproduce the issue.

Thanks

@engcom-Hotel
Copy link
Collaborator

Hello @fredden,

We have noticed that this PR has not been updated for a period of long time. Hence we are closing this PR for now.

Let us know when you are ready to work on it again, and we will be happy to re-open it. Thank you for your contribution!

@fredden
Copy link
Member Author

fredden commented Jul 31, 2024

It hasn't been updated as there's nothing here that needs to be changed.

@engcom-Hotel
Copy link
Collaborator

Hello @fredden,

We have attempted to reproduce the issue, but we were unable to do so. Consequently, we left a comment here: #813 (comment) with the module attached for reference.

In your comment here: #813 (comment), you mentioned that you would check this issue. However, we have not received any further updates from you for a significant amount of time. As a result, we have closed the PR.

Please let us know if you are still able to reproduce the issue, and we will be happy to reopen it.

Thanks!

@fredden
Copy link
Member Author

fredden commented Sep 8, 2024

It's curious that Adobe takes two years to respond (and this is a "good" response; I've personally seen much longer waiting periods), but closes pull requests where the contributor doesn't respond within two weeks.

I'm no longer looking into this. Others are welcome to pick up these changes and help Adobe recognise the bug that this fixes.

@fredden fredden deleted the no-orphan-children branch September 8, 2024 21:25
@afourmeaux
Copy link

afourmeaux commented Dec 13, 2024

After finding this issue i'm glad that you've found a solution.

I am still reproducing this issue on 2.4.6 and your code resolve it.
I'll do a patch for my project, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Partner: Fisheye partners-contribution Project: Community Picked PRs upvoted by the community Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
6 participants