Entity reference in Access Log

Created on 24 March 2023, over 1 year ago
Updated 25 March 2023, over 1 year ago

Problem/Motivation

The Access Log page references Path only; there's no way to join the log entry with a related entity. This would be useful for reporting purposes or creating views with joins.

Steps to reproduce

1. Enable Simple Access Log module (/admin/modules).
2. Configure Simple Access Log (/admin/config/system/simple_access_log). For example, in my case, I'm referencing/including webform submission paths only (/admin/structure/webform/manage/[insert machine name]/submission/1).
3. Visit the Access Log page under the Reports menu (/admin/reports/access-log).
4. Note that in the above referenced view, there is a column for Path.
5. Also, in the view configuration (/admin/structure/views/view/access_log), there is currently no way to join entities other than users.

Proposed resolution

Ideally, there'd be additional columns for Entity Type and Entity ID.

Data model changes

Add data elements in Simple Access Log entity for Entity Type and Entity ID.

(There is currently an entity reference to users. I'm basically looking for something similar for entities in general. See https://www.drupal.org/project/simple_access_log/issues/2949657 ✨ Default View Doesn't relate UIDs back to user entities. Fixed .)

✨ Feature request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jasonluttrell Washington, DC area

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

Comments & Activities

  • Issue created by @jasonluttrell
  • πŸ‡ΊπŸ‡ΈUnited States jasonluttrell Washington, DC area
  • πŸ‡ΊπŸ‡ΈUnited States benjaminarthurt Syracuse, NY

    This may be possible for core entity paths such as Nodes and Taxonomy, but with overridable paths and custom entities from contributed modules I can see this as being a difficult thing to implement well. That being said I do see value to being able to use the logs captured in simple_access_log being related to nodes in particular for the purposes of gauging popularity/visit frequency of particular nodes.

    I'd gladly accept any patches if someone is interested in contributing code to this effort.

Production build 0.71.5 2024