I have very simple reaction rule condition 'Node is Type' in Drupal 8 (8.5.3) Rules module (8.x-3.0-alpha3):
Data selector: @node.node_route_context:node
(Note: the mentioned issue occurs also for simple value
node in the data selector.)
Content types: page
It works well when a node is viewed, but the rule causes crash with the error message
The website encountered an unexpected error. Please try again later. when a node is previewed (button 'Preview' is clicked on the node form).
Note: To replicate the issue you should clear the cache on node form before hitting the 'Preview' button to ensure the node isn't served from the Drupal cache in which case Rules aren't fired.
The logged Error Message is:
Drupal\rules\Exception\EvaluationException: The context for node is NULL, but the context node in rules_node_is_of_type requires a value.
Any hints on better Rules condition to catch the node type, or a patch for Rules?