PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Deleting content or excerpt text not working

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hi,
When I try to edit the excerpt or content it’s working as long as there is text in it. When I delete the text completely and click on “apply” the change is not saved. There is still the text in there.

Thanks

Hello Melissa

Thank you for the signal! Bug is really there, update will be released this week.

Now do next please:

  • go to file \classes\models\posts.php
  • go to row #313
  • replace code block

    to next code:

    default:
    
                    //https://wordpress.org/support/topic/deleting-excerpt-or-content-does-not-work/
                    //Special handling for empty values in post_content and post_excerpt
                    if (in_array($field_key, ['post_content', 'post_excerpt']) && empty($value)) {
                        global $wpdb;
                        $wpdb->update(
                                $wpdb->posts,
                                [$field_key => ''],
                                ['ID' => $post_id],
                                ['%s'],
                                ['%d']
                        );
                        // Clear the cache
                        clean_post_cache($post_id);
                    } else {
                        wp_update_post(array(
                            'ID' => $post_id,
                            $field_key => $value
                        ));
                    }
    
                    $answer = get_post_field($field_key, $post_id);
    
                    $this->__call_hooks_after_post_update($post_id);
    
                    break;