Hi All,
I recently paid a developer to code a system for my new website that does some stuff when a post is changed from 'Draft' to 'Published'.
I now have a problem, that he's left us with an incomplete script, that is no good to us unless we can fix the problem below.
The system he created adds a button in the admin panel that i press to 'approve and publish' the post.
I DO NOT press the default WP Publish button.
His script then does it's bit of processing and then updates the database directly to change the post status to 'Publish'.
However, what i'm finding is, when the post is created (via Gravity forms) and saved as a draft the post slug (that forms part of the permalink) is in tact as it should be.
Then when i 'approve and publish' the post, after is script has worked (and successfully published the post) the post slug is actually blank.
If i look at the database for that post i can see that the 'post_name' field is actually blank too.
Does anybody know why this would be happening... there's obviously something in the default publish function that inserts the 'post_name' data in to that field in the database... i'm guessing by manually updating the post status in the DB we're missing this step.
Hope this makes sense and somebody is able to help!?