It was removed because it was completely broken, we want it back.

We need to provide a default view that displays all profiles entities of a specific bundle, using entity view mode display. This will be used to render the profile type groupings on user view and profile types that support multiple profiles.

This view should be embedded in \Drupal\profile\Controller\ProfileController::userProfileForm().

We currently have

      // Render the active profiles.
      $build['active_profiles'] = [
        '#theme' => 'profile_items',
        '#profile_items' => $active_profiles,
        '#title' => $this->t('Active @type', ['@type' => $profile_type->label()]),
      ];

      // List all inactive profiles.
      $build['inactive_profiles'] = [
        '#theme' => 'profile_items',
        '#profile_items' => $inactive_profiles,
        '#title' => $this->t('Inactive @type', ['@type' => $profile_type->label()]),
      ];

This theme hook implementation should be replaced with a view. However we are blocked, technically, on #2630610: Provide "Edit" and "Delete" links as part of the Profile entity view as we need edit and delete links to render.

Comments

pcambra created an issue. See original summary.

mglaman’s picture

Issue summary: View changes
czigor’s picture

Assigned: Unassigned » czigor
mglaman’s picture

czigor’s picture

czigor’s picture

Given that the target of #2632068: Rendered entity views field handler is 8.1.x maybe we should do this without the Rendered entity views field handler just using several fields. We could switch to using the Rendered entity views field handler when 8.1.0 is released.

bojanz’s picture

We can't implement the view without rendering the entity, cause you can't guess which fields will be shown (billing info has an address, personal information doesn't, etc).
We'll need to reimplement the handler in our module (or add it to Entity and add a dependency).

mglaman’s picture

I vote for adding it to Entity and making it a dependency, since Entity API will hopefully be items added to core.

mglaman’s picture

Status: Active » Postponed
mglaman’s picture

Status: Postponed » Active

We now have the rendered field in Entity API. We will need to make that a dependency.

mglaman’s picture

Assigned: czigor » mglaman
mglaman’s picture

Status: Active » Needs review
StatusFileSize
new9.7 KB

We have a slight issue. \Drupal\Core\Url can't generate our "edit-form" route because it has multiple parameters.

 *    "edit-form" = "/user/{user}/profile/{profile_type}/{profile}",

It knows profile, but it does not know user or profile_type. I tried checking Core and nothing else follows this pattern. Posting patch with View and basic start for now. We'll probably need to alter the edit route.

Status: Needs review » Needs work

The last submitted patch, 13: recover_the_profile-2617272-13.patch, failed testing.

The last submitted patch, 13: recover_the_profile-2617272-13.patch, failed testing.

mglaman’s picture

Status: Needs work » Needs review
StatusFileSize
new12.92 KB

Next iteration. Still needs some work, but much closer.

Status: Needs review » Needs work

The last submitted patch, 16: recover_the_profile-2617272-16.patch, failed testing.

The last submitted patch, 16: recover_the_profile-2617272-16.patch, failed testing.

mglaman’s picture

Status: Needs work » Needs review
StatusFileSize
new18.47 KB

Removes theme hook and solely uses view.

mglaman’s picture

StatusFileSize
new18.67 KB

Forgot Views as an dependency

The last submitted patch, 19: recover_the_profile-2617272-19.patch, failed testing.

The last submitted patch, 19: recover_the_profile-2617272-19.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 20: recover_the_profile-2617272-20.patch, failed testing.

The last submitted patch, 20: recover_the_profile-2617272-20.patch, failed testing.

mglaman’s picture

Status: Needs work » Needs review
StatusFileSize
new21.62 KB

This fixes up a few items, including missing permission in a test

Status: Needs review » Needs work

The last submitted patch, 25: recover_the_profile-2617272-25.patch, failed testing.

The last submitted patch, 25: recover_the_profile-2617272-25.patch, failed testing.

mglaman’s picture

Status: Needs work » Needs review
StatusFileSize
new21.62 KB

Typo on var name.

  • mglaman committed 87dd3b8 on 8.x-1.x
    Issue #2617272 by mglaman: Recover the profile listing view
    
mglaman’s picture

Status: Needs review » Fixed

Fixed!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.