Version 22.5.6 release, however, this can also be reproduced in other versions such as 23.2.2, Mac OS 11.6.4.
Steps to reproduce:
* Applicable content on a layer (pixel data, text etc)
* No selection
1) Record a new action
2) Select move tool (it would be nice if an action recorded this step, but that is a separate feature request)
3) Click the toolbar icon ... align & distribute
4) Set the align to value: canvas (this step is not shown in the action step as recorded)
5) Align as required, X and or Y axis
6) Stop recording
7) Using the move tool, adjust the position or undo/step back in history to before the alignment/s
8) Set the align & distribute value: selection
9) Play the action
Result: An error "The command align is not currently available" is reported.
This indicates that there is a problem with the recorded step 4. I know that this step is recorded into the action, even if it is not shown in the interface.
1) I recorded the actions and converted them to a javascript using xtools. It is clearly shown in the code via a boolean value if align to canvas is true or false.
2) This boolean value is also recorded by the scripting listener plugin and works from a script.
desc1.putBoolean(sTID("alignToCanvas"), true);
desc1.putBoolean(sTID("alignToCanvas"), false);
The original topic can be found here for reference:
https://community.adobe.com/t5/photoshop-ecosystem-discussions/how-can-i-record-layer-alignment-base...