Summary
Whenever I use a link tag to create a link to a resource in another context, I get warnings in the MODX log like these:
[2023-07-21 17:13:54] (WARN @ /www/core/src/Revolution/modContext.php : 287) `87` was requested but no alias was located.
[2023-07-21 17:13:54] (INFO in MODX\Revolution\modContext::makeUrl @ resource 4) Resource with id 87 was not found in context web
[2023-07-21 17:13:54] (WARN @ /www/core/src/Revolution/modContext.php : 287) `87` was requested but no alias was located.
[2023-07-21 17:13:54] (INFO in MODX\Revolution\modContext::makeUrl @ resource 4) Resource with id 87 was not found in context web
[2023-07-21 17:13:54] (WARN @ /www/core/src/Revolution/modContext.php : 287) `87` was requested but no alias was located.
[2023-07-21 17:13:54] (INFO in MODX\Revolution\modContext::makeUrl @ resource 4) Resource with id 87 was not found in context web
[2023-07-21 17:13:54] (WARN @ /www/core/src/Revolution/modContext.php : 287) `87` was requested but no alias was located.
[2023-07-21 17:13:54] (INFO in MODX\Revolution\modContext::makeUrl @ resource 4) Resource with id 87 was not found in context web
[2023-07-21 17:13:54] (WARN @ /www/core/src/Revolution/modContext.php : 287) `87` was requested but no alias was located.
[2023-07-21 17:13:54] (INFO in MODX\Revolution\modContext::makeUrl @ resource 4) Resource with id 87 was not found in context web
[2023-07-21 17:13:54] (WARN @ /www/core/src/Revolution/modContext.php : 287) `87` was requested but no alias was located.
[2023-07-21 17:13:54] (INFO in MODX\Revolution\modContext::makeUrl @ resource 4) Resource with id 87 was not found in context web
[2023-07-21 17:13:54] (WARN @ /www/core/src/Revolution/modContext.php : 287) `87` was requested but no alias was located.
[2023-07-21 17:13:54] (INFO in MODX\Revolution\modContext::makeUrl @ resource 4) Resource with id 87 was not found in context web
There’s only one link tag in use per resource so I’m not sure why seven sets of messages are produced for each one. The resources do exist, are published, and have aliases. They are not in the web
context though. I tried specifying the context like [[~[[+id]]? &context=`context_key`]]
but it didn’t make a difference. I also tried deleting everything in the core/cache directory as well as saving the resources again but still no change. This isn’t causing any kind of problem, afaik; the links are being created correctly. I just like to keep things clean. I realize I could adjust the log_level
setting to avoid having these messages logged, but I’d prefer to take care of the actual problem, if possible.
Environment
MODX 3.0.3, MODX Cloud, PHP 8.1