Quick Node Clone fail

Created on 23 October 2024, 6 months ago

Problem/Motivation

When we clone a node using Quick Node Clone and Gutenberg 3.0 the node is not cloned.
When it's loading the new node, you could see the "code" but it soon disappears.
There is missing the "save and preview" buttons. We used the patch from Issue #3460150 and doesn't work when cloning.

Steps to reproduce

Use gutenberg 3.0 and Quick Node Clone
Try to clone a gutenberg node.
Missing save and preview buttons.

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡΅πŸ‡ΉPortugal cristinahart Funchal

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @cristinahart
  • πŸ‡ΊπŸ‡ΈUnited States wendell

    We are facing the same issue. The buttons are still there, but are CSS clipped to 1px x 1px x 1px x 1px apparently by the gin gutenberg helper module.

    We worked around it in our custom theme by overriding the CSS that clips the edit action buttons buttons. The css selector was:

    ``` .gin-sticky-form-actions--preprocessed ~ .layout-container form.gin--has-sticky-form-actions .gin-sticky-form-actions ```

    We are working on a better patch, but we're not sure if the patch should go in the quick node clone module or the gin+gutenberg helper module. The fix in the context of quick node clone is probably to add, or remove, something in the action form definition before its rendered so that it gets left alone by whatever process rewrites the form actions to apply the css properties we don't want in this case.

  • πŸ‡³πŸ‡΄Norway vegardjo

    Thanks for the pointer wendell, I added this to my admin styles to override:

    .gin-sticky-form-actions--preprocessed ~ .layout-container form.gin--has-sticky-form-actions .gin-sticky-form-actions {
      clip: initial;
      overflow: initial;
      height: auto;
      width: auto;
      position: relative !important;
    }
    

    I think it could maybe best be handled in Gin_gutenberg, as it is related to whatever has a "sticky action button", which is a beta setting in Gin. So could be other modules than quick_node_clone as well. I'll try to move it there.

    Per now I see no other effects than the button being displayed as expected.

  • Any brave souls to provide a MR?

  • πŸ‡³πŸ‡΄Norway vegardjo

    If you agree that this is the right way to solve it, I can likely find some time for it this week :)

  • First commit to issue fork.
  • Pipeline finished with Success
    9 days ago
    Total: 145s
    #479294
  • πŸ‡΅πŸ‡ΉPortugal neliofga

    Created MR using the approach from #3.

  • Thanks but there's a merge conflict as of now it seems

  • Pipeline finished with Success
    8 days ago
    Total: 147s
    #479939
  • πŸ‡³πŸ‡΄Norway vegardjo

    I was also at this yesterday :)

    I added more specificity to the selector, this is needed as it overrides a theme file (more_actions.css) that comes after this module file in the source. Also, the .gutenberg--enabled body class is not present when cloning a node, so we can't use that.

    Not sure why the merge conflict with the CSS file..

  • Pipeline finished with Success
    8 days ago
    #480036
  • πŸ‡³πŸ‡΄Norway vegardjo

    vegardjo β†’ changed the visibility of the branch 3482697-updated-clone to hidden.

  • πŸ‡΅πŸ‡ΉPortugal neliofga

    neliofga β†’ changed the visibility of the branch 3482697-updated-clone to active.

  • πŸ‡΅πŸ‡ΉPortugal neliofga

    neliofga β†’ changed the visibility of the branch 3482697-updated-clone to hidden.

  • πŸ‡΅πŸ‡ΉPortugal neliofga

    Tested, looks good :)

  • Pipeline finished with Skipped
    7 days ago
    #480943
  • Pipeline finished with Skipped
    7 days ago
    #480944
  • Pipeline finished with Skipped
    7 days ago
    #480945
  • Pipeline finished with Skipped
    7 days ago
    #480946
Production build 0.71.5 2024