Problem/Motivation

/reports/tacjslog is called every time a page is loaded after having allowed a service.
IMHO it should only called once when the service is allowed.

Steps to reproduce

  1. Add at least one service to tarteaucitron.
  2. Allow this service.
  3. Reload the page.

Proposed resolution

tarteaucitron-log.js should check for status === "engage" instead of status === "true".
tarteaucitron.pro() is called with =true every-time the service is loaded, but is only called with =engage when the user clicks to allow the service.

Issue fork tacjs-3328866

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

prudloff created an issue. See original summary.

prudloff’s picture

Status: Active » Needs review

Note that instead of overriding tarteaucitron.pro(), it might be cleaner to listen for events triggered by tarteaucitron.sendEvent(key + '_loaded');.

  • mably committed 670c6b30 on 8.x-6.x authored by prudloff
    Issue #3328866 by prudloff: /reports/tacjslog is called on every page...
mably’s picture

Assigned: Unassigned » mably
Status: Needs review » Fixed

Thanks for the MR 👍

mably’s picture

Fix included in 8.x-6.4-alpha4 release.

Status: Fixed » Closed (fixed)

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

mably’s picture

Assigned: mably » Unassigned