php - Node insert continues to call nodeapi even if query failed


I have a custom nodapi function for performing additional opporations when a type of content type is inserted. However, I've had the following error occur "Warning in test1\includes\ on line 3538.". I've tracked this down several times to being an encoding issue, and I'm not sure how to resolve that though.

However, what I don't get is even though the query fails, nodeapi still gets called and I get a blank nid. This also causes other inserts to fail because nid and vid are 0 or null.

I understand that the causing issue is the encoding, but I don't understand why Drupal still runs nodeapi if the node insert (I believe) is failing and no nid or vid is produced.

Any help would be appreciated.


People are also looking for solutions to the problem: php - Cant get app access token


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.