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

DS-1574 fix: Add patches and updates to enable sub-item cloning #234

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

froboy
Copy link
Contributor

@froboy froboy commented Jul 22, 2024

https://yusa.atlassian.net/browse/DS-1574

  • Create a new LB page with Cards (demo content won’t work because sometimes it’s not editable)
  • Clone the LB page
  • Edit one of the Cards on the cloned page
  • Save the card and the page layout

Expected results:

  • Editing cloned items changes the items on the cloned page but not the parent page.
  • This can be repeated with any other content type with subitems:
    • lb_accordion
    • lb_cards
    • lb_carousel
    • lb_donate
    • lb_grid_cta
    • lb_icon_grid
    • lb_partners
    • lb_staff_members
    • lb_statistics
    • lb_tabs
    • lb_testimonials

@froboy froboy requested a review from podarok July 22, 2024 20:44
composer.json Outdated
@@ -73,6 +73,12 @@
"Issue #2922677: Uncaught TypeError: Cannot read property 'replace' of undefined": "https://www.drupal.org/files/issues/2023-02-15/2922677-33.patch",
"https://dgo.re/3049332 LB Call to a member function getEntityTypeId() on null": "https://www.drupal.org/files/issues/2024-03-11/drupal-core--2024-01-09--3049332-87.patch",
"https://dgo.to/3344041 Allow textarea widgets to be used for text (formatted) fields (and check maxlength)": "https://www.drupal.org/files/issues/2023-02-23/3344041-text-formatted-field-use-textarea-widget.patch"
},
"drupal/inline_entity_form": {
"https://dgo.to/3002175 Custom blocks created in inline forms should not be reusable": "https://www.drupal.org/files/issues/2024-04-18/3002175-2.x-47.patch"
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've removed this patch and the related tickets based on the new issue comment. I think https://www.drupal.org/project/entity_clone/issues/3258535 is a better path for dealing with that issue, which I think only related to blocks when translation was enabled.

composer.json Outdated
"https://dgo.to/3002175 Custom blocks created in inline forms should not be reusable": "https://www.drupal.org/files/issues/2024-04-18/3002175-2.x-47.patch"
},
"drupal/entity_clone": {
"https://dgo.to/3050027 Inline Blocks on Layout Builder Fail to Clone Correctly": "https://www.drupal.org/files/issues/2023-08-14/3050027-62.patch"
Copy link
Contributor

Choose a reason for hiding this comment

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

also feels a risky one.
https://www.drupal.org/project/entity_clone/releases/2.1.0-beta1 was tagged, but patch wasn't included inside... @froboy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://dgo.to/3050027 was removed due to a regression, and it's also related to https://www.drupal.org/project/entity_clone/issues/3258535. I agree we should try to push some of the other issues forward before merging this for everyone. I have tested on a client project and it's worked successfully.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated this to apply to 2.1.0-beta1

Copy link
Contributor

@podarok podarok left a comment

Choose a reason for hiding this comment

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

patches are not reliable, feels like

@froboy froboy marked this pull request as draft July 25, 2024 16:03
@froboy
Copy link
Contributor Author

froboy commented Jul 25, 2024

I'm converting this to a draft until we can make progress on the related contrib issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants