Skip to main content
added 13 characters in body
Source Link

I am using the transition_post_status to process a post being published. I was getting inconsistent behaviour between two installations of WordPress, and I have tracked this down to the AJAX calls being made from the post compose page itself.

These are the requests being made when I transition a post from a draft to published on my two installations:

enter image description here enter image description here

As you can see, the AJAX call to post.php is not being made in the second example. It turns out that the global $post object is in a different state inside transition_post_status hook when being called via post.php, which is why my code only works on the first installation.

What I need to understand is why I have 2 installations of WordPress that are seemingly doing different things when publishing a post.

Both installations are running 5.7.2, and are stock aside from the 1 plugin that I am working on, which is the same on both installations.

Can anyone shed any light on why two different installations are triggering different AJAX calls when publishing a post?

I am using the transition_post_status to process a post being published. I was getting inconsistent behaviour between two installations, and I have tracked this down to the AJAX calls being made from the post compose page itself.

These are the requests being made when I transition a post from a draft to published on my two installations:

enter image description here enter image description here

As you can see, the AJAX call to post.php is not being made in the second example. It turns out that the global $post object is in a different state inside transition_post_status hook when being called via post.php, which is why my code only works on the first installation.

Both installations are running 5.7.2, and are stock aside from the 1 plugin that I am working on, which is the same on both installations.

Can anyone shed any light on why two different installations are triggering different AJAX calls when publishing a post?

I am using the transition_post_status to process a post being published. I was getting inconsistent behaviour between two installations of WordPress, and I have tracked this down to the AJAX calls being made from the post compose page itself.

These are the requests being made when I transition a post from a draft to published on my two installations:

enter image description here enter image description here

As you can see, the AJAX call to post.php is not being made in the second example. It turns out that the global $post object is in a different state inside transition_post_status hook when being called via post.php, which is why my code only works on the first installation.

What I need to understand is why I have 2 installations of WordPress that are seemingly doing different things when publishing a post.

Both installations are running 5.7.2, and are stock aside from the 1 plugin that I am working on, which is the same on both installations.

Can anyone shed any light on why two different installations are triggering different AJAX calls when publishing a post?

edited title
Source Link

transition_post_status hook not running, edit post.php AJAX callrequest not runningbeing called when publishing post

I am using the transition_post_status to process a post being published. However, on one of my testI was getting inconsistent behaviour between two installations, this is not being called the same as another installation.and I have tracked this down to the AJAX calls being made from the post compose page itself.

These are the requests being made when I transition a post from a draft to published on my two installations:

enter image description here enter image description here

As you can see, the AJAX call to post.php is not being made in the second example. It turns out that the global $post object is in a different state inside transition_post_status hook when being called via post.php, which is why my code only works on the first installation.

Both installations are running 5.7.2, and are stock aside from the 1 plugin that I am working on, which is the same on both installations.

Can anyone shed any light on why two different installations are triggering different AJAX calls when publishing a post?

transition_post_status hook not running, edit.php AJAX call not running

I am using the transition_post_status to process a post being published. However, on one of my test installations, this is not being called the same as another installation. I have tracked this down to the AJAX calls being made from the post compose page itself.

These are the requests being made when I transition a post from a draft to published on my two installations:

enter image description here enter image description here

As you can see, the AJAX call to post.php is not being made in the second example. It turns out that the global $post object is in a different state inside transition_post_status hook when being called via post.php, which is why my code only works on the first installation.

Both installations are running 5.7.2, and are stock aside from the 1 plugin that I am working on, which is the same on both installations.

Can anyone shed any light on why two different installations are triggering different AJAX calls when publishing a post?

post.php AJAX request not being called when publishing post

I am using the transition_post_status to process a post being published. I was getting inconsistent behaviour between two installations, and I have tracked this down to the AJAX calls being made from the post compose page itself.

These are the requests being made when I transition a post from a draft to published on my two installations:

enter image description here enter image description here

As you can see, the AJAX call to post.php is not being made in the second example. It turns out that the global $post object is in a different state inside transition_post_status hook when being called via post.php, which is why my code only works on the first installation.

Both installations are running 5.7.2, and are stock aside from the 1 plugin that I am working on, which is the same on both installations.

Can anyone shed any light on why two different installations are triggering different AJAX calls when publishing a post?

Source Link

transition_post_status hook not running, edit.php AJAX call not running

I am using the transition_post_status to process a post being published. However, on one of my test installations, this is not being called the same as another installation. I have tracked this down to the AJAX calls being made from the post compose page itself.

These are the requests being made when I transition a post from a draft to published on my two installations:

enter image description here enter image description here

As you can see, the AJAX call to post.php is not being made in the second example. It turns out that the global $post object is in a different state inside transition_post_status hook when being called via post.php, which is why my code only works on the first installation.

Both installations are running 5.7.2, and are stock aside from the 1 plugin that I am working on, which is the same on both installations.

Can anyone shed any light on why two different installations are triggering different AJAX calls when publishing a post?