Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Lexicon entries for "WebP" and "visibility" triggering excess debug logging. #16622

Open
shokupanjamin opened this issue Sep 24, 2024 · 0 comments
Labels
bug The issue in the code or project, which should be addressed.

Comments

@shokupanjamin
Copy link

Bug report

Summary

Missing Lexicon entries for WebP and visibility is causing excess debug logging when running modX with log_level set at LOG_LEVEL_DEBUG.

Appropriate location for $_lang['WebP'] lexicon entry seems to be in \core\lexicon\en\source.inc.php (other lexicon entries for image file types PNG/JPG/GIF are also stored here at lines [99]-[101].)

I'm not sure where the appropriate location for $_lang['visibility'] lexicon entry should be.

I get this is a minor issue (workaround is to set log_level to higher than LOG_LEVEL_DEBUG in production), however, the excess logging quickly fills up the log file with noise in a test environment.

Step to reproduce

No steps required. Log is produced on site page loads when log level is set to LOG_LEVEL_DEBUG. I'm assuming that the logs are triggered when a *.webp image is requested as part of a page load.

Observed behavior

Page load triggers excess debug logging of the following messages:

Debug logs observed in modX v3.0.5-pl

[Timestamp] (DEBUG @ \PATH\TO\MODX\core\src\Revolution\modLexicon.php : 526) Language string not found: "WebP"
[Timestamp] (DEBUG @ \PATH\TO\MODX\core\src\Revolution\modLexicon.php : 526) Language string not found: "visibility"

Debug logs observed in modX v2.8.7-pl:

[Timestamp] (DEBUG @ PATH\TO\MODX\core\model\modx\modlexicon.class.php : 416) Language string not found: "WebP"

Expected behavior

Debug messages should not be logged.

Environment

  • MODX version 3.0.5-pl (in test environment: WinX Pro 64bit / XAMPP 3.3.0 / Apache 2.4.56, PHP: 8.2.4, MySQL: 10.4.28-MariaDB).
  • MODX version 2.8.7-pl (in production environment: Linux, PHP: 8.0.30, MySQL: 10.6.19-MariaDB).
@shokupanjamin shokupanjamin added the bug The issue in the code or project, which should be addressed. label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue in the code or project, which should be addressed.
Projects
None yet
Development

No branches or pull requests

1 participant