PersonalMode Posted October 11, 2022 Posted October 11, 2022 Hi the community, Can you help me, because I try to find the solution since few weeks. With no reasons, when I try to add a new category in gallery, or forum, or in database from Page, I always have an error about the permissions. Here an example of the last error : INSERT INTO `ibf_core_permission_index` ( `app`, `perm_type`, `perm_type_id`, `perm_view`, `perm_2`, `perm_3`, `perm_4`, `perm_5` ) VALUES ( 'forums', 'forum', 163, '*', '', '', '', '' ) IPS\Db\Exception: Duplicate entry '1945' for key 'PRIMARY' (1062) I use Community 4.2.6 and I cannot upgrade now (too much custom), and the news are too hot now to begin a big work of custom. Thanks a lot
Randy Calvert Posted October 11, 2022 Posted October 11, 2022 Sounds like you need to just remove the extra duplicate entry noted in the ipb_core_permission_index table. Before you do anything, take a full backup of the database just to be safe. Also... the version of IPB that you are running is over 5 years old. In that time, there have been over a dozen critical security fixes. I know it sucks to hear you should upgrade, but you REALLY need to work on upgrading.
PersonalMode Posted October 11, 2022 Author Posted October 11, 2022 Thanks @Randy Calvert I think you are right. I waited too long between versions and the ideal is to update. Randy Calvert 1
PersonalMode Posted October 19, 2022 Author Posted October 19, 2022 No chance. The problem was not fixed with the 4.7.3 update. At least with the forum, because in the gallery it seems that it works again. INSERT INTO `ibf_core_permission_index` ( `app`, `perm_type`, `perm_type_id`, `perm_view`, `perm_2`, `perm_3`, `perm_4`, `perm_5` ) VALUES ( 'forums', 'forum', 165, '*', '*', '', '11,4,7,12,10,3,13,6,9,8', '11,4,7,12,10,3,13,6,9,8' ) IPS\Db\Exception: Duplicate entry '1957' for key 'PRIMARY' (1062)
PersonalMode Posted October 20, 2022 Author Posted October 20, 2022 Same problem with database in Pages.
PersonalMode Posted November 2, 2022 Author Posted November 2, 2022 On 10/11/2022 at 9:59 PM, Randy Calvert said: Sounds like you need to just remove the extra duplicate entry noted in the ipb_core_permission_index table. I'm not an expert in MySQL. I don't see in this table, where there is extra duplicate entry.
Marc Posted November 2, 2022 Posted November 2, 2022 At this point, you are really at a crossroad where you need to get your site upgraded. It may well be you are hitting a bug that is causing the duplicated items there. For context, you are 44 releases behind, which is 5 years behind. In addition to this, 10 of those were security related, so you are running software with known security flaws
PersonalMode Posted November 2, 2022 Author Posted November 2, 2022 On 10/20/2022 at 1:40 AM, PersonalMode said: No chance. The problem was not fixed with the 4.7.3 update. 49 minutes ago, Marc Stridgen said: At this point, you are really at a crossroad where you need to get your site upgraded. It may well be you are hitting a bug that is causing the duplicated items there. For context, you are 44 releases behind, which is 5 years behind. In addition to this, 10 of those were security related, so you are running software with known security flaws Hi @Marc Stridgen Like I said, I finally decided to update. I have the latest version (4.7.3). But the update did not fix the problem (except for the Gallery app apparently) Just try to add a new forums INSERT INTO `ibf_core_permission_index` ( `app`, `perm_type`, `perm_type_id`, `perm_view`, `perm_2`, `perm_3`, `perm_4`, `perm_5` ) VALUES ( 'forums', 'forum', 167, '*', '*', '11,4,7,12,10,3,13,6,9,8', '11,4,7,12,10,3,13,6,9,8', '11,4,7,12,10,3,13,6,9,8' ) IPS\Db\Exception: Duplicate entry '1971' for key 'PRIMARY' (1062) #0 /home3/depechem/public_html/system/Db/Db.php(941): IPS\_Db->preparedQuery() #1 /home3/depechem/public_html/system/Node/Model.php(1898): IPS\_Db->insert() #2 /home3/depechem/public_html/system/Node/Controller.php(1246): IPS\Node\_Model->setPermissions() #3 /home3/depechem/public_html/applications/forums/modules/admin/forums/forums.php(122): IPS\Node\_Controller->permissions() #4 /home3/depechem/public_html/system/Dispatcher/Controller.php(107): IPS\forums\modules\admin\forums\_forums->permissions() #5 /home3/depechem/public_html/system/Node/Controller.php(69): IPS\Dispatcher\_Controller->execute() #6 /home3/depechem/public_html/applications/forums/modules/admin/forums/forums.php(44): IPS\Node\_Controller->execute() #7 /home3/depechem/public_html/system/Dispatcher/Dispatcher.php(153): IPS\forums\modules\admin\forums\_forums->execute() #8 /home3/depechem/public_html/admin/index.php(13): IPS\_Dispatcher->run() #9 {main} Just now, PersonalMode said: Just try to add a new forums The new forums appears in the AdminPC But not in the public area
Adriano Faria Posted November 2, 2022 Posted November 2, 2022 (edited) Do you have this every time you try to create a forum? Does it happen with other apps too (Gallery, Downloads, Blogs, Pages, 3rd-party, etc.)? Edited November 2, 2022 by Adriano Faria
PersonalMode Posted November 2, 2022 Author Posted November 2, 2022 56 minutes ago, Adriano Faria said: Do you have this every time you try to create a forum? Does it happen with other apps too (Gallery, Downloads, Blogs, Pages, 3rd-party, etc.)? Yes, every time, and all app (I try on Forums, Pages, Gallery) Just try on Dowload App, same error
Marc Posted November 2, 2022 Posted November 2, 2022 Before we continue, please visit support within your admin CP and address the mysql items shown
Miss_B Posted November 2, 2022 Posted November 2, 2022 (edited) 3 hours ago, PersonalMode said: ust try to add a new forums INSERT INTO `ibf_core_permission_index` ( `app`, `perm_type`, `perm_type_id`, `perm_view`, `perm_2`, `perm_3`, `perm_4`, `perm_5` ) VALUES ( 'forums', 'forum', 167, '*', '*', '11,4,7,12,10,3,13,6,9,8', '11,4,7,12,10,3,13,6,9,8', '11,4,7,12,10,3,13,6,9,8' ) IPS\Db\Exception: Duplicate entry '1971' for key 'PRIMARY' (1062) #0 /home3/depechem/public_html/system/Db/Db.php(941): IPS\_Db->preparedQuery() #1 /home3/depechem/public_html/system/Node/Model.php(1898): IPS\_Db->insert() #2 /home3/depechem/public_html/system/Node/Controller.php(1246): IPS\Node\_Model->setPermissions() #3 /home3/depechem/public_html/applications/forums/modules/admin/forums/forums.php(122): IPS\Node\_Controller->permissions() #4 /home3/depechem/public_html/system/Dispatcher/Controller.php(107): IPS\forums\modules\admin\forums\_forums->permissions() #5 /home3/depechem/public_html/system/Node/Controller.php(69): IPS\Dispatcher\_Controller->execute() #6 /home3/depechem/public_html/applications/forums/modules/admin/forums/forums.php(44): IPS\Node\_Controller->execute() #7 /home3/depechem/public_html/system/Dispatcher/Dispatcher.php(153): IPS\forums\modules\admin\forums\_forums->execute() #8 /home3/depechem/public_html/admin/index.php(13): IPS\_Dispatcher->run() There must already be an entry for that key in the table. Can you run this sql query? SELECT * FROM ibf_core_permission_index WHERE perm_id = 1971; Another thing to check is if the perm_id field is set as AUTO_INCREMENT. Edited November 2, 2022 by Miss_B
Marc Posted November 2, 2022 Posted November 2, 2022 As mentioned, perform those actions first of all, and once that is done, please let us know
PersonalMode Posted November 3, 2022 Author Posted November 3, 2022 On 11/2/2022 at 12:58 PM, Miss_B said: Can you run this sql query? SELECT * FROM ibf_core_permission_index WHERE perm_id = 1971; Hi, here is what I get On 11/2/2022 at 12:58 PM, Miss_B said: Another thing to check is if the perm_id field is set as AUTO_INCREMENT. Yes. On 11/2/2022 at 11:54 AM, Marc Stridgen said: Before we continue, please visit support within your admin CP and address the mysql items shown I assume you are talking about that? I guess it's better to pass the tables to InnoDB first and then proceed to the "Compact" step
Solution PersonalMode Posted November 4, 2022 Author Solution Posted November 4, 2022 On 11/2/2022 at 11:54 AM, Marc Stridgen said: Before we continue, please visit support within your admin CP and address the mysql items shown I make a copy of my database. After the copy, the problem with 'Compact' table type was resolved. Then I use this process to convert MyISAM tables to InnoDB From now, this seems to have solved my original problem. But I haven't finished testing in all the apps LiquidFractal 1
Gary Posted November 4, 2022 Posted November 4, 2022 That's great to hear, @PersonalMode. Please don't hesitate to let us know if you encounter any issues with the other apps once you've performed all the testing required. LiquidFractal and PersonalMode 1 1
Recommended Posts