Title: Duplicate id error
Last modified: August 31, 2021

---

# Duplicate id error

 *  Resolved [Dan](https://wordpress.org/support/users/cmdntd/)
 * (@cmdntd)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/duplicate-id-error/)
 * When I try to create new block with another name, it creates duplicate block 
   with the same id and name. After then I can not do nothing.
 * Before that it stands by on creation modal.
 * [https://www.awesomescreenshot.com/image/12759550?key=d15c01cce7a9e7c76dd889b3169250f1](https://www.awesomescreenshot.com/image/12759550?key=d15c01cce7a9e7c76dd889b3169250f1)
 * I do not know why, and try to delete duplicated data. But it still remains error
   when try to create 2 new ones.
 * Could you check this?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fduplicate-id-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [Dan](https://wordpress.org/support/users/cmdntd/)
 * (@cmdntd)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/duplicate-id-error/#post-14833049)
 * This is from my console:
 *     ```
       Uncaught ReferenceError: jBox is not defined
           at HTMLDocument.<anonymous> (<anonymous>:3:16)
           at e (jquery.min.js?ver=3.6.0:2)
           at t (jquery.min.js?ver=3.6.0:2)
       ​ JQMIGRATE: Migrate is installed, version 3.3.2
       load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate&ver=5.8:5 JQMIGRATE: Migrate is installed, version 3.3.2
       jquery.block.js:833 Uncaught TypeError: Cannot read property 'focus' of null
           at CJTBlockPluginBase.focus (jquery.block.js:833)
           at Object.addBlock (blocks-page.js:433)
           at Object.<anonymous> (add-new-block.js:80)
           at Object.i (load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate&ver=5.8:2)
           at c (jquery.min.js?ver=3.6.0:2)
           at Object.fireWith [as resolveWith] (jquery.min.js?ver=3.6.0:2)
           at l (jquery.min.js?ver=3.6.0:2)
           at XMLHttpRequest.<anonymous> (jquery.min.js?ver=3.6.0:2)
       ```
   
 *  Plugin Author [wipeoutmedia](https://wordpress.org/support/users/wipeoutmedia/)
 * (@wipeoutmedia)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/duplicate-id-error/#post-14863455)
 * Hello there,
 * Sorry for the delay in getting back to you.
    This is an interesting issue, which
   we have never seen before. Code blocks must have unique names and if it detects
   that the same code block name exists, then a new code block cannot be created.
   So it is strange that another code block was created or duplicated. Are you still
   seeing this? Also, when deleting code blocks, you need to press the Save or Save
   All button so it takes effect otherwise refreshing the CJT dashboard page without
   doing so, the code blocks will show again. That said, it sounds like when deleting
   the code blocks, it does not actually disappear at all, which is strange. Thank
   you for posting the error. This may help us dig deeper.
 * Thanks
 *  Thread Starter [Dan](https://wordpress.org/support/users/cmdntd/)
 * (@cmdntd)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/duplicate-id-error/#post-14985685)
 * Thank you, I reply late because I do not receive notification of your reply through
   email
    I will test “save button” for this. Do you have any upgrade for this bug?
 *  Plugin Author [wipeoutmedia](https://wordpress.org/support/users/wipeoutmedia/)
 * (@wipeoutmedia)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/duplicate-id-error/#post-15029177)
 * Hello,
 * Thank you for the follow-up. Now it is my turn to apologise for the delay in 
   replying.
 * How did you go with ‘saving’ the code blocks?
 * Also, if you can send us an email directly from our CJT website, we will be able
   to respond quicker.
 * Thank you
 *  Plugin Author [wipeoutmedia](https://wordpress.org/support/users/wipeoutmedia/)
 * (@wipeoutmedia)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/duplicate-id-error/#post-15153105)
 * Hi there,
 * We have resolved this one, which will be coming in the next update (version 11.5).
 * This may have been an edge case with the latest version of MySQL (v8).
 * Even then, the code logic to get the latest ID for the new block needed a rewrite,
   which was the main reason that new blocks were getting assigned an old, existing
   block ID.
 * So we have reworked that function and that fixed the issue. It was initially 
   fetching the “revision block” ID for the newly created block and that’s why there
   was an error for duplicate entry.
 * Initial testing is positive, and everything is working well.
 * Thanks
 *  Plugin Author [wipeoutmedia](https://wordpress.org/support/users/wipeoutmedia/)
 * (@wipeoutmedia)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/duplicate-id-error/#post-15161521)
 * Hi there,
 * I am just letting you know that CJT version 11.5 has now ben released with the
   following changes:
 * * Compatibility: PHP version 8+
    * Compatibility: MySQL version 8+ * Fix: Duplicate
   ID issue, which on rare occasions was fetching the ‘revision block’ ID for a 
   newly created block causing an error for duplicate entry * Enhancement: If the‘
   wp-content’ directory is renamed to something different (e.g. ‘content’), CJT
   will now find any custom content directories and install correctly.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Duplicate id error’ is closed to new replies.

 * ![](https://ps.w.org/css-javascript-toolbox/assets/icon-256x256.gif?rev=3132209)
 * [CSS & JavaScript Toolbox](https://wordpress.org/plugins/css-javascript-toolbox/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/css-javascript-toolbox/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/css-javascript-toolbox/)
 * [Active Topics](https://wordpress.org/support/plugin/css-javascript-toolbox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/css-javascript-toolbox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/css-javascript-toolbox/reviews/)

## Tags

 * [duplicate ID](https://wordpress.org/support/topic-tag/duplicate-id/)

 * 6 replies
 * 2 participants
 * Last reply from: [wipeoutmedia](https://wordpress.org/support/users/wipeoutmedia/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/duplicate-id-error/#post-15161521)
 * Status: resolved