Bokt / flarum-phpbb-migrate

Migrates from phpbb to flarum.
MIT License
15 stars 3 forks source link

SQL syntax error migrating topic-state #4

Open jslirola opened 4 years ago

jslirola commented 4 years ago
 // Starting migration for topic-state.                                                       

PHP Warning:  mb_strpos() expects parameter 1 to be string, array given in /var/www/flarum/vendor/illuminate/support/Str.php on line 107

Warning: mb_strpos() expects parameter 1 to be string, array given in /var/www/flarum/vendor/illuminate/support/Str.php on line 107
PHP Warning:  stripos() expects parameter 1 to be string, array given in /var/www/flarum/vendor/illuminate/database/Query/Grammars/Grammar.php on line 1031

Warning: stripos() expects parameter 1 to be string, array given in /var/www/flarum/vendor/illuminate/database/Query/Grammars/Grammar.php on line 1031
PHP Warning:  preg_split() expects parameter 2 to be string, array given in /var/www/flarum/vendor/illuminate/database/Grammar.php on line 77

Warning: preg_split() expects parameter 2 to be string, array given in /var/www/flarum/vendor/illuminate/database/Grammar.php on line 77

In Connection.php line 664:

  SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syn  
  tax; check the manual that corresponds to your MariaDB server version for the right synta  
  x to use near 'as `` asc limit 1000 offset 0' at line 1 (SQL: select * from `phpbb_topics  
  _track` order by `` as `` asc limit 1000 offset 0)                                         

In PDOConnection.php line 66:

  SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syn  
  tax; check the manual that corresponds to your MariaDB server version for the right synta  
  x to use near 'as `` asc limit 1000 offset 0' at line 1                                    

In PDOConnection.php line 64:

  SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syn  
  tax; check the manual that corresponds to your MariaDB server version for the right synta  
  x to use near 'as `` asc limit 1000 offset 0' at line 1                                    

Array given:

array(2) {
  [0]=>
  string(7) "user_id"
  [1]=>
  string(8) "topic_id"
}

Edit: it's caused due the primary key on TopicsTrack model, it doesn't work with two fields. If you change by one will work but I didn't test its behavior after migrating.