pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.07k stars 265 forks source link

comment status open when submitting a form from the frontend #4353

Open davidatwhiletrue opened 7 years ago

davidatwhiletrue commented 7 years ago

Hello,

I’m having a small issue with the frontend forms. I use a form rendered with [pods-form] shortcode to create a new entry of a CPT created with Pods. The CPT does not support comments (Advanced Options - Supports - Comments - unchecked).

If I create a new entry from wp admin then column comment_status is closed in wp_posts record.

But when I create a new entry from the frontend form, then comment_status is open in wp_posts record.

I've made the test in my project with Pods 2.6.9 and also in a new WP installation with Pods 2.7 beta. Both have the same issue.

The same occurs with ping_status column.

I'm using the pre_save hook to modify this behavior and explicitly close comment_status and ping_status:

        $pieces['object_fields']['comment_status']['value'] = 'closed';
        $pieces['object_fields']['ping_status']['value'] = 'closed';

But this might be a bug.

Let me know if there is anything I can help with to investigate this issue. Thanks!

David

quasel commented 6 years ago

Is this still an issue? Sorry for the late reply, feel free to comment if you still have questions!

davidhernando commented 6 years ago

With WordPress 4.9.8 and Pods 2.7.9 this is not an issue anymore. Comments are closed as expected. Thank you for asking.

David