9IPOCTb Posted February 20, 2018 Share Posted February 20, 2018 Добрый день, уважаемые форумчане. В свое время обновил форум 3.4.х до 4.х без обновления галереи и страниц. Теперь, когда произвожу обновление, выдает ошибку: Duplicate entry 'gallery-category-1' for key 'perm_type' /home/*******/*******/www/applications/gallery/setup/upg_60000/upgrade.php::41 UPDATE `core_permission_index` core_permission_index SET perm_type='category', perm_5=perm_4, perm_4=perm_3, perm_3=perm_2, perm_2=perm_view WHERE app=? как ее исправить? и почему она появляется? Заранее спасибо! Link to comment Share on other sites More sharing options...
newbie Posted February 20, 2018 Share Posted February 20, 2018 как ее исправить? и почему она появляется? В таблице core_permission_index есть дублирующие записи.Сделайте sql-запрос SELECT * FROM core_permission_index WHERE app='gallery' AND perm_type='category' AND perm_type_id=1Должна быть только одна запись. Дубли нужно удалить 1 Link to comment Share on other sites More sharing options...
9IPOCTb Posted February 20, 2018 Author Share Posted February 20, 2018 сделал запрос, вот что выдало: http://prntscr.com/ih73f1 Link to comment Share on other sites More sharing options...
newbie Posted February 20, 2018 Share Posted February 20, 2018 В файле \applications\gallery\setup\upg_60000\upgrade.php найти \IPS\Db::i()->update( 'core_permission_index', "perm_type='category', perm_5=perm_4, perm_4=perm_3, perm_3=perm_2, perm_2=perm_view", array( 'app=?', 'gallery' ) ); заменить на try { \IPS\Db::i()->update( 'core_permission_index', "perm_type='category', perm_5=perm_4, perm_4=perm_3, perm_3=perm_2, perm_2=perm_view", array( 'app=?', 'gallery' ) ); } catch (\Exception $e) {} 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now