This is a bug we're inheriting from core. If you have multiple product types (or any other bundle), the view shows you a Type filter. That filter will show product types that you can't view (guaranteeing an empty table), cause there's no access check performed.

Since we have our own EntityBundle handler which inherits the core one, let's add a fix there.

Comments

bojanz created an issue. See original summary.

czigor’s picture

Status: Active » Needs review
StatusFileSize
new9.6 KB
bojanz’s picture

Status: Needs review » Needs work
+        $entity = $this->entityManager->getStorage($this->entityTypeId)->create([$this->entityType->getKey('bundle') => $type]);
+        if (!$this->options['expose']['filter_bundles'] || $entity->access('view')) {

We construct the entity even if we don't need it (when filter_bundles is off). This is not a cheap operation, let's skip it.

czigor’s picture

Status: Needs work » Needs review
StatusFileSize
new9.6 KB
new873 bytes
bojanz’s picture

StatusFileSize
new6.83 KB

Let's reboot the patch.

Kept (and re-arranged a bit) the test coverage. Tweaked the fix so that it's not optional, but only applies to exposed filters.

bojanz’s picture

Status: Needs review » Fixed

Committed.

  • bojanz committed 28eaaa8 on 8.x-2.x authored by czigor
    Issue #3003105 by czigor, bojanz: The views bundle (type) filter shows...

Status: Fixed » Closed (fixed)

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