3

On the web, everything works fine (and I even checked the node values with krumo), when I tried fetching the json equivalent of the node using REST api, it's as if the hook_node_load() didn't run.

If in case you are curious what does my hook_node_load() function do, it manipulates a custom field value(that was initially saved) and change it into equivalent value from my custom database table
tl;dr - I changed the value of a field

I would like some help/tips/guide in anyway how can I execute my hook function so I can manipulate the data outputs given from REST api.

ps: I just started with drupal a month ago, if by chance I am approaching this the wrong way and should be using other hook function instead, please tell me.

Thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.