Problem/Motivation

The user view modes all seem to get a visible component added to them for masquerade links, this makes the compact view mode (used for displaying user pictures on articles) get the link.

Proposed resolution

Only add the link to the default view_mode.

Remaining tasks

Write Patch

User interface changes

The article meta data will not have masquerade component added to the links by default.

API changes

N/A

Data model changes

N/A

Issue fork masquerade-2923845

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

    Support from Acquia helps fund testing for Drupal Acquia logo

    Comments

    joelpittet created an issue. See original summary.

    andypost’s picture

    btw no idea how to hide it from manage display screen

    Status: Needs review » Needs work

    The last submitted patch, 2: 2923845-2.patch, failed testing. View results
    - codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

    andypost’s picture

    Status: Needs work » Needs review
    FileSize
    1.21 KB
    1.78 KB

    Test & patch

    The last submitted patch, 4: 2923845-test-only.patch, failed testing. View results

    joelpittet’s picture

    Status: Needs review » Reviewed & tested by the community

    I think that would do the trick, thanks @andypost

    Berdir’s picture

    A comon approach is to set the extra field to not be displayed by default at all ('visible' => FALSE), then it can be enabled for the view modes where it should be (e.g. in hook_install() it could be put in the default view mode).

    joelpittet’s picture

    That approach would be better IMO thanks @Berdir. I'll let @andypost decide.

    andypost’s picture

    Status: Reviewed & tested by the community » Needs work

    hook_install approach looks better

    andypost’s picture

    Here's a patch with install hook, existing sites does not need update so no update hook

    Status: Needs review » Needs work

    The last submitted patch, 10: 2923845-10.patch, failed testing. View results

    andypost’s picture

    Somehow "masquerade" in build array - probably install hook is not executed in kernel tests

    andypost’s picture

    Parent issue: » #2982514: Masquerade 8.x-2.0 stable release plan