HI,

after creating profile types they are listed on every content node: pls. see picture.

This affects at all users.

Where can I disable these?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

maxilein created an issue. See original summary.

joergM’s picture

Issue tags: +Needs Review
FileSize
1.95 KB

In the profile.module the function profile_user_view adds the user profile view to all entity_views.
The attached patch adds a check route condition for 'entity.user.canonical' so that the profile view is only viewed on this route.

MarcoDeJong’s picture

@joergM Nice! Reviewed your patch. Seems to be working fine.

kscheirer’s picture

Status: Active » Reviewed & tested by the community
Issue tags: -Needs Review

Looks good to me, and based on #3.

Dont use issue tags for "Needs Review" - just set the status of the issue itself.

KevinNickerson’s picture

What's the status of this getting into a release?

nedjo’s picture

@KevinNickerson

For a suggested change to reach a release, it must first be reviewed, accepted, and applied by a maintainer of the given project and then a new release must be issued.

mglaman’s picture

Status: Reviewed & tested by the community » Needs work
+++ profile-patch/profile.module	2016-10-05 16:44:09.046136775 +0200
@@ -92,24 +92,27 @@
+  $route_name = \Drupal::service('current_route_match')->getRouteName();
+  if (isset($route_name) && $route_name == 'entity.user.canonical') {

Ideally we should not be checking the route. The display mode should be configured.

EDIT:

So it is embedded using the compact display mode:

$variables['author_picture'] = user_view($node->getOwner(), 'compact');

We should ensure Profiles are not configured components in this default display mode.

mglaman’s picture

Status: Needs work » Closed (outdated)

Marking as outdated. The defaults have been changed. This should not happen anymore. See #2863021: Do not make extra fields visible by default.