Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL syntax error migrating topic-state #4

Open
jslirola opened this issue Jun 28, 2020 · 0 comments
Open

SQL syntax error migrating topic-state #4

jslirola opened this issue Jun 28, 2020 · 0 comments

Comments

@jslirola
Copy link

jslirola commented Jun 28, 2020

 // 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant