First reported in #13375 (with an incorrect fix), it appears that duplicating a resource in the manager does not refresh the aliasMap automatically. This is causing unnecessary errors from getting logged.
Step to reproduce
First, set the log_level to 3.
Duplicate a resource.
Check the error log to see the errors mentioned below.
Refreshing the resource tree causes the errors to get repeated
Clear the MODX cache through Manage > Clear Cache
Refresh the resource tree to see the errors no longer appear
Observed behavior
These errors are getting logged for each request:
[2018-01-29 22:26:29] (WARN @ /Users/mhamstra/Sites/revolution.local/core/model/modx/modcontext.class.php : 244) `35` was requested but no alias was located.
[2018-01-29 22:26:29] (INFO in modContext::makeUrl @ /Users/mhamstra/Sites/revolution.local/core/model/modx/modcontext.class.php : 321) Resource with id 35 was not found in context web
Expected behavior
Duplicating a resource should cause an update to the contexts' aliasMap, so that the errors do not get logged.
Summary
First reported in #13375 (with an incorrect fix), it appears that duplicating a resource in the manager does not refresh the aliasMap automatically. This is causing unnecessary errors from getting logged.
Step to reproduce
Observed behavior
These errors are getting logged for each request:
Expected behavior
Duplicating a resource should cause an update to the contexts' aliasMap, so that the errors do not get logged.
Environment
Confirmed on MODX 2.6.1/2.x latest.