An AJAX HTTP error occurred. HTTP Result Code: 200

Created on 9 July 2015, about 10 years ago
Updated 20 June 2025, about 1 month ago

Hi to everyone,

I hope this is the right place to post my issue, sorry I'm quite new to Drupal..

Hope someone with enough patience will help me.

I'm trying to generate a pdf with the PDF using mPDF api function pdf_using_mpdf_api
in a custom PHP action in Rules.
The action is triggered when

  • a submitted entityform has been updated
  • data comparison: when the boolean field Approved is true

here the php code I've put in the action (as reported in the reference readme.txt):

pdf_using_mpdf_api("<html><body>Hello</body></html>", "mypdftest");

At first attempt I got an Ajax error on the VBO displaying an Error 200 and no pdf generation at all.
then I set the PDF using mPDF option to "F" (Save to Server) and I was able to produce the file but still the VBO was stopped with Error 200:

An error has occurred.
Please continue to the error page

×
Error message

An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: /batch?id=1019&op=do StatusText: OK ResponseText:

I tried to increase the memory (512MB) and timing (180s) of php in .htaccess and still I have the same problem..

I tested the PDF using mPDF module through the drupal interface ("Generate PDF" tab from the node that was set to have the permission to print the pdf) and it is working ..

Notes:

  • VBO is used to change the boolean field "Approved" for multiple entityform submission with the "Modify entity values" option
  • the Rule that is triggered by the update and comparison of the entityform includes the generation of a new node with specific content, sending an email to the user and the custom php to generate the pdf
  • when it stops with the Ajax error the enityform submission field is properly set to approve and the pdf file is generated but the node is not produced.. even if the node has been forced to being saved before .. even if I split the Rule in two different rules and set to a higher weight the Rule that have only to generate the pdf

Any idea / suggestion ?

Thanks in advance,

Martino.

💬 Support request
Status

Closed: outdated

Version

2.0

Component

Miscellaneous

Created by

🇮🇹Italy TenzAirbrush

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024