Duplicate entry for key ‘post_id_2’: INSERT INTO `litespeed_img_optm`
-
My site is using WP Multisite with 1 main site (Site1) and 2 subsites (Site2 and Site3). There’s a plugin named Broadcast to clone posts from main site to other sites.
Everytime I broadcast a post from Site1 to Site2 and Site3, this plugin copies images (.png) also. The Site2 serves .webp but the Site3 doesn’t. There’s no .webp files were created for Site3
I check error log and get this:
Duplicate entry ‘9749-‘ for key ‘post_id_2’ with query INSERT INTO
wp_3_litespeed_img_optm
( post_id, optm_status, src, src_filesize ) VALUES (‘9749′,’0′,’2020/06/filename.png’,’590119′),(‘9749′,’0′,’2020/06/filename-120×120.png’,’16790′),(‘9749′,’0′,’2020/06/filename-470×470.png’,’165006′),(‘9749′,’0′,’2020/06/filename-02-1024×1024.png’,’276234′),(‘9749′,’0′,’2020/06/filename-02-1536×1536.png’,’1311515′) requested by do_action_ref_array(‘litespeed_task_imgoptm_req’), WP_Hook->do_action, WP_Hook->apply_filters, LiteSpeed\Img_Optm::cron_auto_request, LiteSpeed\Img_Optm->new_req, LiteSpeed\Img_Optm->_gather_images, LiteSpeed\Img_Optm->_save_raw, LiteSpeed\Img_Optm->_insert_img_optmI check structure of tables and see that:
Site1 and Site2 has the same structure of table wp_3_litespeed_img_optm
Site3 has different one. (see attachemnt).
Site1-2 structure: https://prnt.sc/srev5k
Site3 structure: https://prnt.sc/srevkaI think there’s an error occur while upgrading Litespeed. I don’t know when it happened.
How can I fix this error?
- The topic ‘Duplicate entry for key ‘post_id_2’: INSERT INTO `litespeed_img_optm`’ is closed to new replies.