Adding workflow buttons field to display mode causes full node edit form to appear

Created on 10 January 2023, almost 2 years ago
Updated 25 February 2024, 10 months ago

Problem/Motivation

Adding workflow buttons field to display mode causes full node edit form to appear

Steps to reproduce

Add 'workflow buttons' field to a display mode.

Proposed resolution

Fix the field so that it only shows the workflow buttons as intended

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: duplicate

Version

1.0

Component

User interface

Created by

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States beunerd Providence, Rhode Island

    @lelkneralfaro

    I'm having trouble reproducing. I think what you're saying is that when you've added the pseudo field to a particular display mode (e.g., "teaser", "full", etc.) via the UI/configuration then when you are viewing the entity (not editing it) you're seeing more than just the workflow buttons? I'm not seeing that on my end. Can you say a little more, maybe with a screenshot too?

  • Status changed to Needs work over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA

    @beunerd: In your commit 88eca1f0058 hook_entity_view() has only a check for $display->getComponent('workflow_buttons')) and that was since hard-coded to have an extra check for $view_mode === 'full' as a temporary workaround to prevent this issue (i think).

  • πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA

    I see you've reverted πŸ› workflow_buttons should only be loaded/load edit form when relevant Fixed but multiple people have seen related issues so i feel like there is some issue here.

    Maybe only for user 1?

  • Status changed to Postponed: needs info over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States beunerd Providence, Rhode Island

    @mlncn

    Re: "as a temporary workaround to prevent this issue"

    I'm still not able to reproduce this issue, so I wouldn't even be able to determine whether the proposed fix in https://www.drupal.org/project/workflow_buttons/issues/3328538 πŸ› workflow_buttons should only be loaded/load edit form when relevant Fixed (which I reverted) would be relevant.

    Re: "multiple people have seen related issues so i feel like there is some issue here."

    Can you point me to the related issues? Again, as per what I wrote in https://www.drupal.org/project/workflow_buttons/issues/3328538 πŸ› workflow_buttons should only be loaded/load edit form when relevant Fixed as I understand it the module works just fine in terms of showing/hiding the pseudo field workflow buttons on node/entity view modes. That is, you should disable it in the display modes you want it not to appear. And/or use Drupal's standard "workflows" module permissions to control use/visibility.

    I'm going to mark this back as needs more info until we know that there is a problem and how to reproduce it. Otherwise it's going to sit here in "needs work" which we don't know that it does.

  • πŸ‡¨πŸ‡ΏCzech Republic David Urban

    I confirm the problem exists. In my case version 1.0.0-beta5 causes taxonomy term view to show full node edit forms. Downgrading helps. If you need any more info I can provide, have the site running.

  • πŸ‡―πŸ‡΅Japan ultrabob Japan

    @david-urban I believe the MR in https://www.drupal.org/project/workflow_buttons/issues/3386885 ✨ Show buttons on Custom Entity view pages (replacement for Moderation control pseudofield) Needs review also addresses this issue, by no longer filtering which routes we should remove the extra form fields for. Could you try applying this change, and see if that fixes the issue?

  • πŸ‡―πŸ‡΅Japan ultrabob Japan

    Actually, it is on the dev branch, so you could require the dev branch and see if the issue has been resolved.

  • πŸ‡¨πŸ‡ΏCzech Republic David Urban

    @ultrabob sorry for the delay. I have tested the dev version (18 Sep 2023 at 18:55 CEST) and the problem seems to be fixed. I believe we can close this as a duplicate. Thank you for solving the issue.

  • Status changed to Closed: duplicate about 1 year ago
  • πŸ‡―πŸ‡΅Japan ultrabob Japan

    Marking as a duplicate since the fix is already on that other ticket. Thanks @david-urban!

  • πŸ‡ΊπŸ‡ΈUnited States Katy Jockelson

    After getting the latest dev version (8.x-1.x-dev) I'm still fieldsets on the node view (which are configured to show on form display) showing up above the Workflow Buttosn within the form markup on the page.

  • πŸ‡―πŸ‡΅Japan ultrabob Japan

    Thanks Katy,

    Without investigating yet, I think that makes sense. The code that removes the fields that shouldn’t be there doesn’t impact the structure of the form where fieldsets are handled.

    I’ll try to follow a new issue for that tomorrow and see if I can get it fixed.

Production build 0.71.5 2024