Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved Merge PHP error
#11
Not Solved
(12-04-2019, 07:40 PM)noyle Wrote: OK, I should know now. The SQL indeed can't run under strict mode on with my own sql_mode setting.

Actually, pid shouldn't exist in a SQL query when converting/merging a forum.
And how silly I'm. I should be able to find that it's the SMF 2 module's bug when I was writing a board converter.

Would you like to open a new issue in Merge System's GitHub? https://github.com/mybb/merge-system/issues/new
I will if you don't, and hopefully bring a fix before next week.


If you could open that issue it would be great. I wouldnt know what to write or how to word it properly.
Reply
#12
Not Solved
Quote:... pid shouldn't exist in a SQL query when converting/merging a forum ...
that pid should be parent forum's id !
Reply
#13
Not Solved
(12-04-2019, 11:25 PM)bynw Wrote: If you could open that issue it would be great. I wouldnt know what to write or how to word it properly.

OK. I'll do more investigation and try to get it solved.

(12-05-2019, 01:52 AM).m. Wrote:
Quote:... pid shouldn't exist in a SQL query when converting/merging a forum ...
that pid should be parent forum's id !

Oh yes, you're right. I messed SMF2 module with other modules. And the problem should be here.

I'm not sure but now it looks like a SMF2 data inconsistency problem to me.

Please run this query in your SMF 2 database (this is the forum where your merging went wrong):
SELECT * FROM smf_boards WHERE id_board=30;
And take in the result of column id_cat as x and the result of column id_parent as y, and run following queries:
SELECT * FROM smf_categories WHERE id_cat=x;
SELECT * FROM smf_boards WHERE id_board=y;

Replace smf_ with your SMF2's database prefix.
Worth a try.
Reply
#14
Not Solved
mysql> SELECT * FROM smfrc_boards WHERE id_board=30;
+----------+--------+-------------+-----------+-------------+-------------+----------------+----------------------------------------------------------------------------+------------+-----------+----------------------------------------+------------+-----------+-------------+----------+----------------+----------+------------------+-------------------+----------------+
| id_board | id_cat | child_level | id_parent | board_order | id_last_msg | id_msg_updated | member_groups                                                              | id_profile | name      | description                            | num_topics | num_posts | count_posts | id_theme | override_theme | redirect | unapproved_posts | unapproved_topics | require_prefix |
+----------+--------+-------------+-----------+-------------+-------------+----------------+----------------------------------------------------------------------------+------------+-----------+----------------------------------------+------------+-----------+-------------+----------+----------------+----------+------------------+-------------------+----------------+
|       30 |      8 |           1 |       112 |          15 |       22866 |          22866 | -1,0,13,12,14,9,16,4,36,19,20,21,22,23,24,25,29,28,27,26,35,34,33,32,31,30 |          4 | KK's News | Conventions and Tidbits from Katherine |         39 |        51 |           0 |        0 |              0 |          |                0 |                 0 |              0 |
+----------+--------+-------------+-----------+-------------+-------------+----------------+----------------------------------------------------------------------------+------------+-----------+----------------------------------------+------------+-----------+-------------+----------+----------------+----------+------------------+-------------------+----------------+
1 row in set (0.00 sec)


mysql> SELECT * FROM smfrc_categories WHERE id_cat=8;
+--------+-----------+-------------------------------------+--------------+
| id_cat | cat_order | name                                | can_collapse |
+--------+-----------+-------------------------------------+--------------+
|      8 |        2 | Katherine Kurtz and Scott MacMillan |            1 |
+--------+-----------+-------------------------------------+--------------+
1 row in set (0.00 sec)





mysql> SELECT * FROM smfrc_boards WHERE id_parent=112;
+----------+--------+-------------+-----------+-------------+-------------+----------------+----------------------------------------------------------------------------+------------+------------------------+----------------------------------------+------------+-----------+-------------+----------+----------------+----------+------------------+-------------------+----------------+
| id_board | id_cat | child_level | id_parent | board_order | id_last_msg | id_msg_updated | member_groups                                                              | id_profile | name                   | description                            | num_topics | num_posts | count_posts | id_theme | override_theme | redirect | unapproved_posts | unapproved_topics | require_prefix |
+----------+--------+-------------+-----------+-------------+-------------+----------------+----------------------------------------------------------------------------+------------+------------------------+----------------------------------------+------------+-----------+-------------+----------+----------------+----------+------------------+-------------------+----------------+
|       30 |      8 |           1 |       112 |          15 |       22866 |          22866 | -1,0,13,12,14,9,16,4,36,19,20,21,22,23,24,25,29,28,27,26,35,34,33,32,31,30 |          4 | KK's News              | Conventions and Tidbits from Katherine |         39 |        51 |           0 |        0 |              0 |          |                0 |                 0 |              0 |
|      111 |      8 |           1 |       112 |          16 |       21294 |          21294 | -1,0,13,36,12,14,16,9,4,19,20,21,22,23,24,25,29,28,27,26,35,34,33,32,31,30 |          1 | Q&A with Katherine | Q&A's with Katherine Kurtz         |         39 |        50 |           0 |        0 |              0 |          |                0 |                 0 |              0 |
|      114 |      8 |           1 |       112 |          14 |       16090 |          16090 | -1,0,13,36,12,14,16,9,4,19,20,21,22,23,24,25,29,28,27,26,35,34,33,32,31,30 |          1 | Biography              | Katherine's Biography                  |          1 |         1 |           0 |        0 |              0 |          |                0 |                 0 |              0 |
|      115 |      8 |           1 |       112 |          17 |       19368 |          19368 | -1,0,13,36,12,14,16,9,4,19,20,21,22,23,24,25,29,28,27,26,35,34,33,32,31,30 |          1 | Interviews             | Interviews with Katherine Kurtz        |          4 |        10 |           0 |        0 |              0 |          |                0 |                 0 |              0 |
+----------+--------+-------------+-----------+-------------+-------------+----------------+----------------------------------------------------------------------------+------------+------------------------+----------------------------------------+------------+-----------+-------------+----------+----------------+----------+------------------+-------------------+----------------+
4 rows in set (0.00 sec)
Reply
#15
Not Solved
SELECT * FROM smfrc_boards WHERE id_board=112;

Though I think it'll be just OK. That's so weird!

By the way, I still don't know what's causing your real issue. I'll try to post another version of the merge system on this weekend, though it's not for your problem, you still can try then.

Or if you could dump a SQL file of these two tables and send it to me, with description/title/etc. set to blank '' or 0, just give me a PM with a link to that dumped file.

What I need is:
columns id_cat in table smfrc_categories; and
columns id_board, id_cat, id_parent in table smfrc_boards
Worth a try.
Reply
#16
Not Solved
here is that corrected output.

mysql> SELECT * FROM smfrc_boards WHERE id_board=112;
+----------+--------+-------------+-----------+-------------+-------------+----------------+----------------------------------------------------------------------------+------------+--------------------+---------------------------------------------+------------+-----------+-------------+----------+----------------+----------+------------------+-------------------+----------------+
| id_board | id_cat | child_level | id_parent | board_order | id_last_msg | id_msg_updated | member_groups                                                              | id_profile | name               | description                                 | num_topics | num_posts | count_posts | id_theme | override_theme | redirect | unapproved_posts | unapproved_topics | require_prefix |
+----------+--------+-------------+-----------+-------------+-------------+----------------+----------------------------------------------------------------------------+------------+--------------------+---------------------------------------------+------------+-----------+-------------+----------+----------------+----------+------------------+-------------------+----------------+
|      112 |      8 |           0 |         0 |          13 |           0 |          22404 | -1,0,13,36,12,14,16,9,4,19,20,21,22,23,24,25,29,28,27,26,35,34,33,32,31,30 |          1 | Katherine's Corner | All things from and about Katherine herself |          0 |         0 |           0 |        0 |              0 |          |                0 |                 0 |              0 |
+----------+--------+-------------+-----------+-------------+-------------+----------------+----------------------------------------------------------------------------+------------+--------------------+---------------------------------------------+------------+-----------+-------------+----------+----------------+----------+------------------+-------------------+----------------+
1 row in set (0.00 sec)
Reply
#17
Not Solved
OK, I know where the problem is and will later bring a fix at GitHub.

GitHub issue: https://github.com/mybb/merge-system/issues/238

The PR is opened but still needs more examination on other modules and test: https://github.com/mybb/merge-system/pull/239

OP may just grab a copy from my repo for test and report back:
Source: https://github.com/yuliu/mybb-merge-syst...re-fix-238
Download as .zip file: https://github.com/yuliu/mybb-merge-syst...ix-238.zip
Worth a try.
Reply
#18
Not Solved
so is that zip file linked above a good one to try out ?
Reply
#19
Not Solved
^ yes, it is expected to fix the forums issue you have faced during the conversion.
Reply
#20
Not Solved
Well it didnt error on the Forum import. However it did error on the next step for importing forum settings.

MyBB has experienced an internal SQL error and cannot continue.

SQL Error: 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'smfrc.p.id_group' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by Query: SELECT p.id_group, GROUP_CONCAT(p.permission) as permissions, b.id_board FROM smfrc_boards b LEFT JOIN smfrc_board_permissions p ON (p.id_profile=b.id_profile) WHERE p.permission IN ('poll_vote','remove_own','delete_own','modify_own','poll_add_own','post_attachment','post_new','post_reply_any','view_attachments') GROUP BY b.id_board


Also it created duplicate forums when I went back to check on the forum creation. They are duplicated in triplicate.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)