Title: Bug: &#8220;Select shortcode&#8221; button fails &#8211; TypeError (reading &#8216;value&#8217;)
Last modified: August 29, 2026

---

# Bug: “Select shortcode” button fails – TypeError (reading ‘value’)

 *  [Barry](https://wordpress.org/support/users/riceooks/)
 * (@riceooks)
 * [6 days, 6 hours ago](https://wordpress.org/support/topic/bug-select-shortcode-button-fails-typeerror-reading-value/)
 * Description:
   Hello,I am experiencing an issue with the Shortcoder Gutenberg block.
   When I add the block to a post and click the “Select shortcode” button, nothing
   happens.Upon inspecting the browser console, a JavaScript error is triggered 
   immediately upon clicking. I traced it in the debugger and found the exact line
   causing the issue in index.js.Error Log:Uncaught TypeError: Cannot read properties
   of null (reading ‘value’)The problematic code in index.js:
 *     ```wp-block-code
       onClick: () => {
           if (window.sc_show_insert) {
               // The error occurs on the following line:
               var e = document.getElementById("shortcoder-input-" + s).value;
               window.sc_show_insert(e, s)
           }
       }
       ```
   
 * 
   Cause:document.getElementById(“shortcoder-input-” + s) is returning null (likely
   because the element cannot be found in the DOM, possibly due to the block editor’s
   iframe canvas in newer WP versions), and accessing .value on it throws the TypeError.
   Steps to Reproduce:Open the Gutenberg block editor (adding a new post/page).Insert
   the “Shortcoder” block.Click the blue “Select shortcode” button.The UI does not
   respond, and the console throws the TypeError.Environment & Troubleshooting Performed:
   To rule out conflicts, I used the official Health Check & Troubleshooting plugin.
   The issue perfectly isolates to Shortcoder.Active Theme: Twenty Twenty-FourActive
   Plugins: ONLY Shortcoder (all other plugins disabled via troubleshooting mode)
   Cache: Completely cleared CDN and local browser caches.Could you please look 
   into updating this DOM selection method to be compatible with the current block
   editor environment? Let me know if you need any additional information. Thank
   you!

Viewing 1 replies (of 1 total)

 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [5 days, 16 hours ago](https://wordpress.org/support/topic/bug-select-shortcode-button-fails-typeerror-reading-value/#post-19006446)
 * Hi [@riceooks](https://wordpress.org/support/users/riceooks/),
 * Thanks for reporting thsi issue. I’ll fix this in the next release targetted 
   for WP 7.1

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fbug-select-shortcode-button-fails-typeerror-reading-value%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this review.

 * ![](https://ps.w.org/shortcoder/assets/icon.svg?rev=2222236)
 * [Shortcoder — Create Shortcodes for Anything](https://wordpress.org/plugins/shortcoder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcoder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcoder/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcoder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcoder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcoder/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [vaakash](https://wordpress.org/support/users/vaakash/)
 * Last activity: [5 days, 16 hours ago](https://wordpress.org/support/topic/bug-select-shortcode-button-fails-typeerror-reading-value/#post-19006446)