I am working on Drupal 8 project

I have made a content type by name glossary having machine name glossary Also, I have made one field in it, i.e. description having machine name field_description. As it is a content type, in order to add a Glossary term via REST, I am using the following

URL: http://example.com/entity/node?_format=json


Passing Headers as Authorization with its value & Content-Type as application/json

and Body as

  "field_description":[{"value":"Howasdasdd are you?"}]

Status 500 Internal Server Error

Response A fatal error occurred: Internal Server Error

I checked into Drupal logs I got the following message.

Drupal\rules\Exception\EvaluationException: The context for node is NULL, but the context node in rules_node_is_of_type requires a value. in Drupal\rules\Plugin\RulesExpression\RulesCondition->prepareContext() (line 98 of /var/www/vhosts/readyresponders.org/staging/dashboard/modules/contrib/rules/src/Context/ContextHandlerTrait.php).

closed as unclear what you're asking by kiamlaluno Apr 15 '18 at 9:05

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Have the same issue... I'm pretty sure it's a problem with the rules module. It seems pretty flakey in D8. Not sure that it's in the code for rules/src/Context/ContextHandlerTrait.php or in rules/src/Plugin/Condition/NodeIsOfType.php. I've been looking at it for a while without any progress. – Andrew Wasson Nov 20 '17 at 19:36

Browse other questions tagged or ask your own question.