Jump to content


Photo

Error Moving Blog Content


When deleting a blog and moving the content to a new one the following error is hit.

Error: 1062 - Duplicate entry '3' for key 1 IP Address: 79.117.104.129 - /blog/manage/page__section__dashboard__act__delete__blogid__2__form_hash__97ee6ae9ea44ad83a7fe08a05ba51725&moveTo=3 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- mySQL query error: UPDATE ibf_blog_rsscache SET blog_id=3 WHERE blog_id=2 .--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------. | File | Function | Line No. | |----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------| | admin/applications_addon/ips/blog/sources/classes/blogFunctions.php | [db_main_mysql].update | 475 | '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------' | admin/applications_addon/ips/blog/modules_public/manage/dashboard.php | [blogFunctions].moveBlogContent | 144 | '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------' | admin/applications_addon/ips/blog/modules_public/manage/dashboard.php | [public_blog_manage_dashboard].delete | 68 | '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------' | admin/sources/base/ipsController.php | [public_blog_manage_dashboard].doExecute | 306 | '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------'

in blogFunctions::moveBlogContent()

$this->DB->update( 'blog_rsscache'		  , array( 'blog_id' => $to_id ), "blog_id=" . $blog_id );

I'm not sure why you would need to move the cache in the first place but blog_id is the primary key for this table so you can't alter the value in this way in any case. I expect we should simply remove the deleted content cache and rebuild the other.

Status: Fixed
Version: 2.5.1
Fixed In: 2.5.2


0 Comments