Message like "Created three snippet files based on configuration." might be displayed to any user, even "Anonymous", in case cron is running from Drupal. (admin/config/system/cron)

Possible fix: remove google_tag_cron() function.

Comments

Pasqualle created an issue. See original summary.

solotandem’s picture

Category: Bug report » Task

The message does not include any sensitive information nor is the code failing, so is this a bug?

From an automated configuration/deployment standpoint, what hook do you (and others reading this issue) prefer to trigger re-creating the snippet files? Seems like cron and flush caches are the two relevant ones.

solotandem’s picture

Status: Active » Closed (works as designed)
Pasqualle’s picture

Displaying an unrelated message to visitors is a bug..
What would you think if you just see a message like that after posting a comment here..

Pasqualle’s picture

Even cron_example makes sure that messages are not displayed to everyone..

bserem’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Status: Closed (works as designed) » Needs work

This is definitely not correct! We shouldn't be displaying messages to visitors that are irrelevant to them.
Plus it took me a while cause I thought it was my code doing it.

It is true for D8 too.

Maybe the watchdog function is a better option.

  • solotandem committed 974ec7e on 8.x-1.x
    Issue #2881396 Revise message text, restrict message display to admin...
solotandem’s picture

Assigned: Unassigned » solotandem
Status: Needs work » Fixed

Above commit: revise message text, restrict message display to admin users, and log error messages.

Thanks to those who reported this and commented. Please test commit and report back.

Status: Fixed » Closed (fixed)

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

HyperGlide’s picture

Hello, Noted this issue was first reported on the D7 branch but the patch was only applied to D8. What is required to back port this to D7 and roll out a release?

Thank you.

HyperGlide’s picture

Issue tags: +Needs backport to D7
solotandem’s picture

Issue tags: -Needs backport to D7

This was done under #2922047: Snippet file creation messages are confusing and is included in release 1.4.