Page 1 of 1

Error convert DB SCJ >>TCMS

Posted: Fri Feb 07, 2020 6:31 am
Здравствуйте.
Производим перенос мастер слейва с SCJ на TCMS.
1. Переводим базу в innodb.
2. Апдейтим сайт до 52
env HTTP_HOST=xxx php update.php 52
3. Устанавливаем TCMS:
curl -sS http://smartcj.com/updates2/install | php7.2 --
Тут ошибок нет. Всё окей.
Кидаем права для пользователя.

4. Конвернтируем
php7.2 scj_1to2_db_converter.php
На этапе конвентирования получаем ошибки:

Code: Select all

Mysql error 1062: Duplicate entry 'favorites' for key 'name' (insert into rot_pages (`id`, `name`, `rows`, `cols`, `shows`, `clicks`, `benchmark_start`, `benchmark_pages`, `template`, `save_path`, `create_archives`, `cms_page`, `cache_time`) values ('30', 'favorites', '0', '0', '0', '28', '0', '0', '<template name=default ><div class=\"item\">
<a href=\"/gallery/<!--SAFE_DESC-->/<!--GALLERY_ID-->/index.html\" arts=\'<!--THUMB_LINK-->\'><img src=\"<!--THUMB_URL-->\" />
<div class=\"info\">
<h3><!--ALT_23--></h3>
<span class=\"g_rating\"><?=(<!--RATING--> == 0) ? \'0\' : round( (<!--RATING--> - 1) * 100 ) . \'%\'?></span>
<div class=\"clearfix\"></div>
</div>
</a>
<div class=\"remove\"><a href=\'/action/favorites/remove=<!--GALLERY_ID-->/\' target=\"_parent\" title=\"Delete this gallery from your favorites\">Delete</a></div>
</div></template><?php $index_page=\"favorites\"; ?>
<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">
<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">
<title>Your Favorites | xxx</title>
<!--SCJ_INCLUDE-->
<link href=\"/styles.css\" rel=\"stylesheet\" type=\"text/css\">
<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>

<script type=\"text/javascript\">
$(document).ready(function(){
   $(\'a\').each(function(){
      if ($(this).attr(\'arts\')) {
         $(this).bind(\'click\', function(){
             $(this).attr(\'href\', $(this).attr(\'href\')+ \'?\' + $(this).attr(\'arts\'));
            $(this).unbind(\'click\');
         });
      }
   });
});
</script>



<script>
$(document).ready(function(){

$(\"#login-open\").toggle(
	function(){
		$(\".login_blk\").show();
	},
	function(){
		$(\".login_blk\").hide();

	});

});
</script>

<base target=\"_blank\">
</head>

<body><!--SCJ_COUNT_VIEWS-->

<div class=\"container\">
<div class=\"wrapper\">
<div class=\"header\">
<!--INCLUDE_TEMPLATE_header_links-->
  <h1 class=\"logo\"><a href=\"/\"><img src=\"/img/logo.png\" width=\"240\" height=\"45\"></a></h1>   
 <!--INCLUDE_TEMPLATE_navigation-->
  
  <div class=\"clearfix\"></div>
  </div>
</div><!--wrapper-->
<div class=\"wrapper\">
<ul class=\"pages\">
<li class=\"ttx\">Pages: </li>
<pagination first_pages=3 adjustment=1 last_pages=3 range_separator=\"...\">
<li><a href=\"/action/favorites/page=<!--PAGE_NUM-->/\" title=\"Page #<!--PAGE_NUM-->\" target=\"_parent\"><!--PAGE_NUM--></a></li>
</pagination>
<div class=\"clearfix\"></div>
</ul>

<div class=\"thumbs\">
<!--default_1-180-->
<div class=\"clearfix\"></div>
</div>
<ul class=\"pages\">
<li class=\"ttx\">Pages: </li>
<pagination first_pages=3 adjustment=1 last_pages=3 range_separator=\"...\">
<li><a href=\"/action/favorites/page=<!--PAGE_NUM-->/\" title=\"Page #<!--PAGE_NUM-->\" target=\"_parent\"><!--PAGE_NUM--></a></li>
</pagination>
<div class=\"clearfix\"></div>
</ul>


</div><!--wrapper-->

<div class=\"footer\">
<div class=\"wrapper\">

<b>xxx art</b> is a work depicting the vision of an artist working with the human form naked. Be it paintings, photographs, or mixed media, the <b>art xxx</b> is a term attempting to give an artistic depiction of a xxx woman form.<br>
Warning! This site contains porn links to sexually explicit material. If you\'re under the age of 18, find adult material offensive, or if it\'s illegal for you to view adult material in your community, please leave now. All images on this site are all in compliance with the 18 USC 2257 US Federal Law
<br>
© Copyright 2004-2014, xxx- ALL RIGHTS RESERVED<br>

<div class=\"clearfix\"></div></div>
</div><!--wrapper-->
</div>
</body></html>', 'favorites', '0', '2', '0'))  (15.020900011063, 0.0076620578765869) 

Fatal error: Uncaught Exception: Mysql error:: 1062 (Duplicate entry 'favorites' for key 'name') (db_link) in query insert into rot_pages (`id`, `name`, `rows`, `cols`, `shows`, `clicks`, `benchmark_start`, `benchmark_pages`, `template`, `save_path`, `create_archives`, `cms_page`, `cache_time`) values ('30', 'favorites', '0', '0', '0', '28', '0', '0', '<template name=default ><div class=\"item\">
<a href=\"/gallery/<!--SAFE_DESC-->/<!--GALLERY_ID-->/index.html\" arts=\'<!--THUMB_LINK-->\'><img src=\"<!--THUMB_URL-->\" />
<div class=\"info\">
<h3><!--ALT_23--></h3>
<span class=\"g_rating\"><?=(<!--RATING--> == 0) ? \'0\' : round( (<!--RATING--> - 1) * 100 ) . \'%\'?></span>
<div class=\"clearfix\"></div>
</div>
</a>
<div class=\"remove\"><a href=\'/action/favorites/remove=<!--GALLERY_ID-->/\' target=\"_parent\" title=\"Delete this gallery from your favorites\">Delete</a></div>
</div></template><?php $index_page=\"favorites\"; ?>
<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">
<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">
<title>Your Favorites | xxx</title>
<!--SCJ_INCLUDE-->
<link href=\"/styles.css\" rel=\"stylesheet\" type=\"text/css\">
<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>

<script type=\"text/javascript\">
$(document).ready(function(){
   $(\'a\').each(function(){
      if ($(this).attr(\'arts\')) {
         $(this).bind(\'click\', function(){
             $(this).attr(\'href\', $(this).attr(\'href\')+ \'?\' + $(this).attr(\'arts\'));
            $(this).unbind(\'click\');
         });
      }
   });
});
</script>



<script>
$(document).ready(function(){

$(\"#login-open\").toggle(
	function(){
		$(\".login_blk\").show();
	},
	function(){
		$(\".login_blk\").hide();

	});

});
</script>

<base target=\"_blank\">
</head>

<body><!--SCJ_COUNT_VIEWS-->

<div class=\"container\">
<div class=\"wrapper\">
<div class=\"header\">
<!--INCLUDE_TEMPLATE_header_links-->
  <h1 class=\"logo\"><a href=\"/\"><img src=\"/img/logo.png\" width=\"240\" height=\"45\"></a></h1>   
 <!--INCLUDE_TEMPLATE_navigation-->
  
  <div class=\"clearfix\"></div>
  </div>
</div><!--wrapper-->
<div class=\"wrapper\">
<ul class=\"pages\">
<li class=\"ttx\">Pages: </li>
<pagination first_pages=3 adjustment=1 last_pages=3 range_separator=\"...\">
<li><a href=\"/action/favorites/page=<!--PAGE_NUM-->/\" title=\"Page #<!--PAGE_NUM-->\" target=\"_parent\"><!--PAGE_NUM--></a></li>
</pagination>
<div class=\"clearfix\"></div>
</ul>

<div class=\"thumbs\">
<!--default_1-180-->
<div class=\"clearfix\"></div>
</div>
<ul class=\"pages\">
<li class=\"ttx\">Pages: </li>
<pagination first_pages=3 adjustment=1 last_pages=3 range_separator=\"...\">
<li><a href=\"/action/favorites/page=<!--PAGE_NUM-->/\" title=\"Page #<!--PAGE_NUM-->\" target=\"_parent\"><!--PAGE_NUM--></a></li>
</pagination>
<div class=\"clearfix\"></div>
</ul>


</div><!--wrapper-->

<div class=\"footer\">
<div class=\"wrapper\">

<b>xxxt</b> is a work depicting the vision of an artist working with the human form naked. Be it paintings, photographs, or mixed media, the <b>art xxx</b> is a term attempting to give an artistic depiction of a xxx woman form.<br>
Warning! This site contains porn links to sexually explicit material. If you\'re under the age of 18, find adult material offensive, or if it\'s illegal for you to view adult material in your community, please leave now. All images on this site are all in compliance with the 18 USC 2257 US Federal Law
<br>
© Copyright 2004-2014, xxx - ALL RIGHTS RESERVED<br>

<div class=\"clearfix\"></div></div>
</div><!--wrapper-->
</div>
</body></html>', 'favorites', '0', '2', '0'). ()  in /home/sites/sites/xxx/ertyu/includes/db_modules/mysql.php:129
Stack trace:

Stack trace:
#0 /home/sites/sites/xxx/ertyu/includes/db_modules/mysql.php(160): db_error('insert into rot...', 1062, 'Duplicate entry...', 'db_link')
#1 /home/sites/sites/xxx/ertyu/includes/db_modules/mysql.php(272): db_query('insert into rot...', 'db_link')
#2 /home/sites/sites/xxx/ertyu/bin/scj_1to2_db_converter.php(156): db_perform('rot_pages', Array)
#3 {main}
  thrown in /home/sites/sites/xxx/ertyu/includes/db_modules/mysql.php on line 129

Не подскажете, как исправить ошибку? База не поверждена. Оптимизация средствами SCJ не помогает. Кэш сбрасывали.

Re: Error convert DB SCJ >>TCMS

Posted: Fri Feb 07, 2020 9:39 am
by admin
При переносе темплейтов оказывается что такой уже есть. Можно в tcms rot_pages таблицу очистить перед конвертом, а я добавлю проверку

Re: Error convert DB SCJ >>TCMS

Posted: Fri Feb 07, 2020 10:49 am
Перед конвертированием выполнили в mysql для базы TCMS TRUNCATE TABLE rot_pages;
Не помогло.

Code: Select all

Type 'md5' if you want gallery slugs to be gallery_md5 or just hit enter 

Copy traders (10.557778835297, 10.557778835297) 
Coping table admins (10.644515991211, 0.086737155914307) 
Coping table admin_access_log (10.648260831833, 0.0037448406219482) 
Coping table admin_sessions (10.651510000229, 0.0032491683959961) 
Coping table blacklist (10.654717922211, 0.0032079219818115) 
Coping table browsers (10.657696008682, 0.0029780864715576) 
Coping table forces (10.844254016876, 0.18655800819397) 
Coping table functions_data (10.847363948822, 0.0031099319458008) 
Coping table ga_categories (10.851415872574, 0.0040519237518311) 
Coping table ga_sites (10.853765964508, 0.0023500919342041) 
Coping table inrules (10.857329845428, 0.0035638809204102) 
Coping table ips (10.859277963638, 0.0019481182098389) 
Coping table language (11.854188919067, 0.99491095542908) 
Coping table links (11.939585924149, 0.085397005081177) 
Coping table outrules (12.919595956802, 0.98001003265381) 
Coping table out_ips (12.923367977142, 0.0037720203399658) 
Coping table out_ips2trader (14.109694004059, 1.1863260269165) 
Coping table quality_settings (14.29568195343, 0.18598794937134) 
Coping table refs (14.298812866211, 0.0031309127807617) 
Coping table reports (14.416204929352, 0.11739206314087) 
Coping table rot_cell_data (14.425228834152, 0.009023904800415) 
Coping table rot_cell_skimming (14.493110895157, 0.067882061004639) 
Coping table rot_groups (14.495818853378, 0.0027079582214355) 
Coping table rot_groups_data (14.49889087677, 0.0030720233917236) 
Coping table rot_models (14.50172495842, 0.0028340816497803) 
Coping table rot_models_data (14.50344991684, 0.0017249584197998) 
Coping table rot_sponsors (14.505416870117, 0.0019669532775879) 
Coping table rot_sponsors_data (14.509305000305, 0.0038881301879883) 
Coping table rot_crop_profiles (14.516206979752, 0.0069019794464111) 
Coping table rot_pages (14.518759012222, 0.0025520324707031) 
Mysql error 1062: Duplicate entry 'favorites' for key 'name' (insert into rot_pages (`id`, `name`, `rows`, `cols`, `shows`, `clicks`, `benchmark_start`, `benchmark_pages`, `template`, `save_path`, `create_archives`, `cms_page`, `cache_time`) values ('30', 'favorites', '0', '0', '0', '28', '0', '0', '<template name=default ><div class=\"item\">
<a href=\"/gallery/<!--SAFE_DESC-->/<!--GALLERY_ID-->/index.html\" arts=\'<!--THUMB_LINK-->\'><img src=\"<!--THUMB_URL-->\" />
<div class=\"info\">
<h3><!--ALT_23--></h3>
<span class=\"g_rating\"><?=(<!--RATING--> == 0) ? \'0\' : round( (<!--RATING--> - 1) * 100 ) . \'%\'?></span>
<div class=\"clearfix\"></div>
</div>
</a>
<div class=\"remove\"><a href=\'/action/favorites/remove=<!--GALLERY_ID-->/\' target=\"_parent\" title=\"Delete this gallery from your favorites\">Delete</a></div>
</div></template><?php $index_page=\"favorites\"; ?>
<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">
<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">
<title>Your Favorites | xxx Art</title>
<!--SCJ_INCLUDE-->
<link href=\"/styles.css\" rel=\"stylesheet\" type=\"text/css\">
<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>

<script type=\"text/javascript\">
$(document).ready(function(){
   $(\'a\').each(function(){
      if ($(this).attr(\'arts\')) {
         $(this).bind(\'click\', function(){
             $(this).attr(\'href\', $(this).attr(\'href\')+ \'?\' + $(this).attr(\'arts\'));
            $(this).unbind(\'click\');
         });
      }
   });
});
</script>



<script>
$(document).ready(function(){

$(\"#login-open\").toggle(
	function(){
		$(\".login_blk\").show();
	},
	function(){
		$(\".login_blk\").hide();

	});

});
</script>

<base target=\"_blank\">
</head>

<body><!--SCJ_COUNT_VIEWS-->

<div class=\"container\">
<div class=\"wrapper\">
<div class=\"header\">
<!--INCLUDE_TEMPLATE_header_links-->
  <h1 class=\"logo\"><a href=\"/\"><img src=\"/img/logo.png\" width=\"240\" height=\"45\"></a></h1>   
 <!--INCLUDE_TEMPLATE_navigation-->
  
  <div class=\"clearfix\"></div>
  </div>
</div><!--wrapper-->
<div class=\"wrapper\">
<ul class=\"pages\">
<li class=\"ttx\">Pages: </li>
<pagination first_pages=3 adjustment=1 last_pages=3 range_separator=\"...\">
<li><a href=\"/action/favorites/page=<!--PAGE_NUM-->/\" title=\"Page #<!--PAGE_NUM-->\" target=\"_parent\"><!--PAGE_NUM--></a></li>
</pagination>
<div class=\"clearfix\"></div>
</ul>

<div class=\"thumbs\">
<!--default_1-180-->
<div class=\"clearfix\"></div>
</div>
<ul class=\"pages\">
<li class=\"ttx\">Pages: </li>
<pagination first_pages=3 adjustment=1 last_pages=3 range_separator=\"...\">
<li><a href=\"/action/favorites/page=<!--PAGE_NUM-->/\" title=\"Page #<!--PAGE_NUM-->\" target=\"_parent\"><!--PAGE_NUM--></a></li>
</pagination>
<div class=\"clearfix\"></div>
</ul>


</div><!--wrapper-->

<div class=\"footer\">
<div class=\"wrapper\">

<b>xxx art</b> is a work depicting the vision of an artist working with the human form naked. Be it paintings, photographs, or mixed media, the <b>art xxx</b> is a term attempting to give an artistic depiction of a xxx woman form.<br>
Warning! This site contains porn links to sexually explicit material. If you\'re under the age of 18, find adult material offensive, or if it\'s illegal for you to view adult material in your community, please leave now. All images on this site are all in compliance with the 18 USC 2257 US Federal Law
<br>
© Copyright 2004-2014, xxx - ALL RIGHTS RESERVED<br>

<div class=\"clearfix\"></div></div>
</div><!--wrapper-->
</div>
</body></html>', 'favorites', '0', '2', '0'))  (14.527272939682, 0.0085139274597168) 

Fatal error: Uncaught Exception: Mysql error:: 1062 (Duplicate entry 'favorites' for key 'name') (db_link) in query insert into rot_pages (`id`, `name`, `rows`, `cols`, `shows`, `clicks`, `benchmark_start`, `benchmark_pages`, `template`, `save_path`, `create_archives`, `cms_page`, `cache_time`) values ('30', 'favorites', '0', '0', '0', '28', '0', '0', '<template name=default ><div class=\"item\">
<a href=\"/gallery/<!--SAFE_DESC-->/<!--GALLERY_ID-->/index.html\" arts=\'<!--THUMB_LINK-->\'><img src=\"<!--THUMB_URL-->\" />
<div class=\"info\">
<h3><!--ALT_23--></h3>
<span class=\"g_rating\"><?=(<!--RATING--> == 0) ? \'0\' : round( (<!--RATING--> - 1) * 100 ) . \'%\'?></span>
<div class=\"clearfix\"></div>
</div>
</a>
<div class=\"remove\"><a href=\'/action/favorites/remove=<!--GALLERY_ID-->/\' target=\"_parent\" title=\"Delete this gallery from your favorites\">Delete</a></div>
</div></template><?php $index_page=\"favorites\"; ?>
<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">
<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">
<title>Your Favorites | xxx Art</title>
<!--SCJ_INCLUDE-->
<link href=\"/styles.css\" rel=\"stylesheet\" type=\"text/css\">
<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>

<script type=\"text/javascript\">
$(document).ready(function(){
   $(\'a\').each(function(){
      if ($(this).attr(\'arts\')) {
         $(this).bind(\'click\', function(){
             $(this).attr(\'href\', $(this).attr(\'href\')+ \'?\' + $(this).attr(\'arts\'));
            $(this).unbind(\'click\');
         });
      }
   });
});
</script>



<script>
$(document).ready(function(){

$(\"#login-open\").toggle(
	function(){
		$(\".login_blk\").show();
	},
	function(){
		$(\".login_blk\").hide();

	});

});
</script>

<base target=\"_blank\">
</head>

<body><!--SCJ_COUNT_VIEWS-->

<div class=\"container\">
<div class=\"wrapper\">
<div class=\"header\">
<!--INCLUDE_TEMPLATE_header_links-->
  <h1 class=\"logo\"><a href=\"/\"><img src=\"/img/logo.png\" width=\"240\" height=\"45\"></a></h1>   
 <!--INCLUDE_TEMPLATE_navigation-->
  
  <div class=\"clearfix\"></div>
  </div>
</div><!--wrapper-->
<div class=\"wrapper\">
<ul class=\"pages\">
<li class=\"ttx\">Pages: </li>
<pagination first_pages=3 adjustment=1 last_pages=3 range_separator=\"...\">
<li><a href=\"/action/favorites/page=<!--PAGE_NUM-->/\" title=\"Page #<!--PAGE_NUM-->\" target=\"_parent\"><!--PAGE_NUM--></a></li>
</pagination>
<div class=\"clearfix\"></div>
</ul>

<div class=\"thumbs\">
<!--default_1-180-->
<div class=\"clearfix\"></div>
</div>
<ul class=\"pages\">
<li class=\"ttx\">Pages: </li>
<pagination first_pages=3 adjustment=1 last_pages=3 range_separator=\"...\">
<li><a href=\"/action/favorites/page=<!--PAGE_NUM-->/\" title=\"Page #<!--PAGE_NUM-->\" target=\"_parent\"><!--PAGE_NUM--></a></li>
</pagination>
<div class=\"clearfix\"></div>
</ul>


</div><!--wrapper-->

<div class=\"footer\">
<div class=\"wrapper\">

<b>xxx art</b> is a work depicting the vision of an artist working with the human form naked. Be it paintings, photographs, or mixed media, the <b>art xxx</b> is a term attempting to give an artistic depiction of a xxx woman form.<br>
Warning! This site contains porn links to sexually explicit material. If you\'re under the age of 18, find adult material offensive, or if it\'s illegal for you to view adult material in your community, please leave now. All images on this site are all in compliance with the 18 USC 2257 US Federal Law
<br>
© Copyright 2004-2014, xxx - ALL RIGHTS RESERVED<br>

<div class=\"clearfix\"></div></div>
</div><!--wrapper-->
</div>
</body></html>', 'favorites', '0', '2', '0'). ()  in /home/sites/sites/xxx/ertyu/includes/db_modules/mysql.php:129
Stack trace:
#0 /home/sites/sites/xxx/ertyu/includes/db_modules/mysql.php(160): db_error('insert into rot...', 1062, 'Duplicate entry...', 'db_link')
#1 /home/sites/sites/xxx/ertyu/includes/db_modules/mysql.php(272): db_query('insert into rot...', 'db_link')
#2 /home/sites/sites/xxx/ertyu/bin/scj_1to2_db_converter.php(156): db_perform('rot_pages', Array)
#3 {main}
  thrown in /home/sites/sites/xxx/ertyu/includes/db_modules/mysql.php on line 129

Re: Error convert DB SCJ >>TCMS

Posted: Sat Feb 08, 2020 7:12 am
by admin
Ок, скиньте плз буду, буду тестировать на ней

Re: Error convert DB SCJ >>TCMS

Posted: Mon Feb 10, 2020 12:18 am
Базу отправили Вам в ЛС.

Re: Error convert DB SCJ >>TCMS

Posted: Mon Feb 10, 2020 3:11 am
by admin
спасибо, добавлен фикс в апдейт

Re: Error convert DB SCJ >>TCMS

Posted: Mon Feb 10, 2020 8:01 am
Здравствуйте.
Спасибо, всё успешно конвертировали.

Re: Error convert DB SCJ >>TCMS

Posted: Mon Feb 10, 2020 8:03 am
by admin
Отлично)