Code works only for the view mode "full"

Created on 12 June 2023, over 1 year ago
Updated 13 October 2023, about 1 year ago

Problem/Motivation

This line of code if ($readTypeConfig && !$entity->in_preview && $view_mode === "full") make it clear that entity is being recorded as read only if it's full view mode is browsed. However, it is possible to create custom view modes that are used instead of full.

Steps to reproduce

Install the 1.3 version and select a Content type to track, e.g. Service.
Create a view mode called. e.g. custom_full and programmatically set is as a default for the Service.
Browse Service nodes and see a table empty.

Proposed resolution

The module should expose available view modes for selection.

Feature request
Status

Needs review

Version

1.3

Component

Code

Created by

🇫🇮Finland YevKo Espoo

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

Comments & Activities

  • Issue created by @YevKo
  • The code works as intended, so I don't think it's a bug report. I'll switch the issue to a feature request and will look into implementing it.

  • @admirlju opened merge request.
  • Status changed to Needs review over 1 year ago
  • Added a view mode checkbox selection. You can select multiple view modes, by default no view mode is selected so now if you ever want to temporarily remove some entity type you can use that.

    I've run the automated test locally and did a bit of testing by hand and it looks like everything works fine.

  • Rebased the issue fork. The tests are failing because of an issue being fixed in 📌 Drupal 10 Fix deprecations in tests Needs review .

  • Status changed to Needs work about 1 year ago
  • Status changed to Needs review about 1 year ago
  • Since it's a new functionality, decided to add an automated test for it. The new test is passing, the old one is still failing for the same reason as mentioned before.

Production build 0.71.5 2024