Cannot toggle display settings for core search results

Created on 6 October 2023, about 1 year ago

Problem/Motivation

When the Manage Display module is enabled, the Display settings vertical tab is no longer displayed on content type edit pages. I understand that this is because the Authored By and Authored On fields are exposed, but this creates a problem for core search results, which do not rely on a node's display settings.

Users are thus prevented from toggling authoring information on core search results.

Steps to reproduce

- Install Drupal.
- Install the Manage Display module.

Proposed resolution

- Expose Display settings (possibly re-labeled as "Search display settings" or something similar).
- Apply display settings only to core search results.

Remaining tasks

- Expose the option to toggle display settings for core search results.

User interface changes

- Expose the option to toggle display settings for core search results.

API changes

None

Data model changes

None

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States beautownsend

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

Merge Requests

Comments & Activities

  • Issue created by @beautownsend
  • πŸ‡ΊπŸ‡ΈUnited States beautownsend
  • Status changed to Needs work about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States beautownsend
  • First commit to issue fork.
  • πŸ‡ΊπŸ‡¦Ukraine AstonVictor

    Hi there,

    I was able to reproduce it. I had different search results on the /search/node page.

    I'm not sure why we should hide the setting on the node edit page because it's possible to have different settings for different node types after enabling the module.
    e.g. article has enabled setting and page has disabled setting. after enabling the module, both settings will have the same values.

    I prepared a simple MR to remove the form alter.

    thanks a lot

  • πŸ‡¬πŸ‡§United Kingdom adamps

    adamps β†’ changed the visibility of the branch 3392273-cannot-toggle-display to hidden.

  • πŸ‡¬πŸ‡§United Kingdom adamps

    We should not just remove this code - it is there for a reasonπŸ˜ƒ!

    the Display settings vertical tab is no longer displayed on content type edit pages

    This is working as designed. The hidden setting has no effect with this module. Instead the submitted display is controlled using manage display settings.

    The "steps to reproduce" is missing essential information. What do I need to do to see the problem? If there is a problem relating to search then please describe what search to do.

  • πŸ‡ΊπŸ‡¦Ukraine AstonVictor

    You should just visit /search/node page that shows a few results. Enabling/disabling the 'Display author and date information' influences the output.

    The search module uses its own templates (search-result.html.twig) for rendering results. So, the output actually depends on the submitted config of the node type.

  • πŸ‡¬πŸ‡§United Kingdom adamps

    Thanks, I see it now.

    The long term goal of this module is that display_submitted will be removed from Core in NodeTypeForm, node.schema.yml, and NodeTypeInterface::displaySubmitted(), setDisplaySubmitted(). The setting has no effect once the display of submitted is controlled by manage display settings like other fields.

    So control of the search output will need to be done in a different way. Maybe it could be added to /admin/config/search/pages/manage/node_search?

  • πŸ‡¬πŸ‡§United Kingdom adamps
  • πŸ‡¬πŸ‡§United Kingdom adamps
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    Changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to our policies.

Production build 0.71.5 2024