When a vault is (re)loaded and the File Explorer view is not shown (e.g. some other view in the pane is active) an attempt to apply custom sort fails with error visible in console.
After showing the File Explorer view the custom sorting can be applied (manually via command or ribbon icon) without any problems
BTW this breaking change in Obsidian also affects some other plugins, like Folder Notes (errors visible in console). To be able to use the Folder Notes normally, you need to activate the File Explorer and force reload the vault or re-enable the plugin. Introducing breaking changes (more and more often) and not maintaining backward compatibility is a way to kill the plugin community long term... I understand the technical reasons behind Obsidian evolution, internal improvements, refactoring. At the same time doing this without keeping the backward compatibility is IMO contradictory to what is stated on obsidian.md: "With hundreds of plugins [...]".
Solution for this seems to be simple:
make the File Explorer detector more finegrained and return additional status(es) indicating the reason why FE is not available (not found, lazy view not initialized, etc.)
if detection result tells about a lazy uninitialized view, display an info popup if user triggers sorting "File Explorer view not available"
When a vault is (re)loaded and the File Explorer view is not shown (e.g. some other view in the pane is active) an attempt to apply custom sort fails with error visible in console.
This is because of the new breaking change in Obsidian 1.7.2 referred to as 'deferred views' (https://docs.obsidian.md/Plugins/Guides/Understanding+deferred+views)
After showing the File Explorer view the custom sorting can be applied (manually via command or ribbon icon) without any problems
BTW this breaking change in Obsidian also affects some other plugins, like Folder Notes (errors visible in console). To be able to use the Folder Notes normally, you need to activate the File Explorer and force reload the vault or re-enable the plugin. Introducing breaking changes (more and more often) and not maintaining backward compatibility is a way to kill the plugin community long term... I understand the technical reasons behind Obsidian evolution, internal improvements, refactoring. At the same time doing this without keeping the backward compatibility is IMO contradictory to what is stated on obsidian.md: "With hundreds of plugins [...]".
Solution for this seems to be simple: