You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now when a file is uploaded and the active node is empty, the code uses the value of this.config.openTo for the path (which is set to the path of the file that was selected when the media browser was opened.)
On 3.1.0-dev I'm not seeing this happening. Can you create a video capture of your process of reproducing the issue? Also, a screen grab of the media source setup would help as well.
Yes, it looks like this issue is fixed in the current version that's under development.
It seems that with the PR #16394, when the media source is changed, the active node gets set again here in the code:
Bug report
Summary
Under certain conditions, the media browser uploads files to the wrong path after the media source is changed.
Step to reproduce
assets/images/
.)assets/images/blue.png
.)assets/images/
), the file is uploaded to the directoryassets/images/assets/images/
.Cause of the error
In the media browser code, when the media source is changed, the active node is set to an empty string:
this.cm.activeNode = '';
revolution/manager/assets/modext/widgets/system/modx.tree.directory.js
Lines 270 to 274 in f197da7
Now when a file is uploaded and the active node is empty, the code uses the value of
this.config.openTo
for the path (which is set to the path of the file that was selected when the media browser was opened.)revolution/manager/assets/modext/widgets/system/modx.tree.directory.js
Lines 749 to 751 in f197da7
Possible solution
In the media browser code, after the media source is changed, set the active node to the root node of the media source.
revolution/manager/assets/modext/widgets/system/modx.tree.directory.js
Lines 273 to 274 in f197da7
Environment
MODX 3.0.4-pl.
The text was updated successfully, but these errors were encountered: