Title: &#8220;Updating Failed&#8221; error inside WordPress Editor.
Last modified: February 3, 2023

---

# “Updating Failed” error inside WordPress Editor.

 *  [mostags](https://wordpress.org/support/users/mostags/)
 * (@mostags)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/updating-failed-error-inside-wordpress-editor/)
 * I’m getting “Updating Failed” inside Element when I’m using shortcode.
 * This is code of my shortcode
 *     ```wp-block-code
       function shortcode_field_value( $atts ) {
         if ( ! is_admin() ) {
         $atts = shortcode_atts(
             array(
                 'field_name' => '',
                 'link' => false
             ), $atts, 'field_value'
         );
   
         $post_id = get_the_ID();
         if( ! $post_id ) {
             return '';
         }
   
         $cache_key = 'field_value_' . $post_id . '_' . $atts['field_name'];
         $value = wp_cache_get( $cache_key );
         if( false === $value ) {
             $value = get_field( $atts['field_name'], $post_id );
             if( is_array( $value ) ) {
                 $terms = array();
                 foreach( $value as $term ) {
                     $terms[] = $term->name;
                 }
                 $value = implode( ', ', $terms );
             } elseif( is_a( $value, 'WP_Term' ) ) {
                 $value = $value->name;
             }
             wp_cache_set( $cache_key, $value, '', 3600 );
         }
   
         if( $atts['link'] ) {
           $value = sprintf( '<a href="%s">%s</a>', get_term_link( $value ), $value );
         }
   
   
         return $value;
       }
       }
       add_shortcode( 'field_value', 'shortcode_field_value' );
       ```
   
 * Please help me find solution for this error.

Viewing 1 replies (of 1 total)

 *  [David](https://wordpress.org/support/users/diggeddy/)
 * (@diggeddy)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/updating-failed-error-inside-wordpress-editor/#post-16437433)
 * Hi there,
 * where are you seeing the error ? Is this in the Post Editor ?

Viewing 1 replies (of 1 total)

The topic ‘“Updating Failed” error inside WordPress Editor.’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/generatepress/3.6.1/screenshot.
   png)
 * GeneratePress
 * [Support Threads](https://wordpress.org/support/theme/generatepress/)
 * [Active Topics](https://wordpress.org/support/theme/generatepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/generatepress/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/generatepress/reviews/)

## Tags

 * [ACF](https://wordpress.org/support/topic-tag/acf/)
 * [elements](https://wordpress.org/support/topic-tag/elements/)

 * 1 reply
 * 2 participants
 * Last reply from: [David](https://wordpress.org/support/users/diggeddy/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/updating-failed-error-inside-wordpress-editor/#post-16437433)
 * Status: not resolved