MyBB Community Forums

Full Version: Merge System and SMF2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Actually, that permission system is still the same. The permission in question comes from the board_permissions table, not the regular permissions table. The issue here seems to be an incorrect variable re-initialization:
	function get_group_permissions()
	{
		$query = $this->old_db->simple_select("permissions", "*", "add_deny = 1");
		$permissions = array();
		while($permission = $this->old_db->fetch_array($query))
		{
			$permissions[$permission['id_group']][$permission['permission']] = 1;
		}
		$this->old_db->free_result($query);
		
		$query = $this->old_db->simple_select("board_permissions", "id_group, permission", "add_deny = 1");
		$permissions = array();
		while($permission = $this->old_db->fetch_array($query))
		{
			$permissions[$permission['id_group']][$permission['permission']] = 1;
		}
		$this->old_db->free_result($query);
		
		return $permissions;
	}

Should not have the 2nd $permissions = array();
Try removing that from the code and let me know what happens. Thanks.

It should be using the default permission in the even one doesn't exist in either table for that usergroup, in merge/resources/modules/usergroups.php we have:
		// Should loop through and fill in any values that aren't set based on the MyBB db schema or other standard default values
		$data = $this->process_default_values($data);

Which should fill in the ones that aren't set for each group.

Out of curiosity, which version of PHP are you using?
We crossed paths. I'll update the code and see what happens. I've added some more notes too.
(2011-08-05, 06:42 PM)Talei Wrote: [ -> ]I then make it all the way to Forumperms: "1366 - Incorrect integer value: '' for column 'gid' at row 1" Gid isn't pulling and I cannot set a default.
I still cannot see anything in the code that is wrong... the gids cache code is exactly the same as the fids cache code, except the variable name obviously.

(2011-08-05, 06:42 PM)Talei Wrote: [ -> ]Skipping permissions I advance to Posts:
"SQL Error:
1366 - Incorrect integer value: '' for column 'firstpost' at row 1
Query:
UPDATE mybb_threads SET firstpost='' WHERE import_firstpost = '226'"

Don't ask me how this happened, but somehow part of the code got deleted for this.
$this->insert($post);
Should be:
$pid = $this->insert($post);

Its very weird that is missing since when I originally made this module I just copied the SMF1 code to new files and changed all the db structure info that was different. And that code is correct in SMF1 module :/
I downloaded the SVN for usergroups without the redundant array. "1366 - Incorrect integer value: '' for column 'canaddevents' at row 1" out the gate. - Sigh.

Looking at the string, Canviewonline is also pulling blanks.
Heh!

So I decided to just do the defaults thing on usergroups again so I can move on... I added just defaults on 'canaddevents' and 'Canviewonline'. So what does the code do? It wipes out the values for the next two entries. I swear the merge system is do this on purpose.
Users.php: "1364 - Field 'passwordconvertsalt' doesn't have a default value" - The field isn't used in the insert command and the NULL allowance isn't set in the DB.
I'm going back into the corner....

Post.php - "1366 - Incorrect integer value: '' for column 'replyto' at row 1" (its empty)

Privatemessages.php: "1366 - Incorrect integer value: '' for column 'icon' at row 1". Also, 'PMID' and 'SMILIEOFF' are also empty.

Moderators.php: I cannot even get it to run. I betting that's since I have no moderators for my board. Usergroups did the same until I made one.

Forumperms.php: I don't think convert_data function is getting getting either FID or GID. Both values are blank. I put in a cheap echo just to make sure the function was even getting called, it was, but nothing shows if I ask for either ID.

passwordconvertsalt should be allowed to be null. My bad on that one.
http://dev.mybb.com/issues/1690

But you still haven't answered me as to what version of PHP you're using... I need to know why your arrays aren't getting merged.
Oh, and when you click run, if there is 0 to do, it should just return you to the menu as completed.
Sorry, somewhere I missed that. PHP 5.3.6
(2011-08-05, 09:06 PM)Dylan M. Wrote: [ -> ]Oh, and when you click run, if there is 0 to do, it should just return you to the menu as completed.

Well.... one would assume that....

On the plus side, by the time I'm converted MyBB will be the only non gratis Message board that can convert from SMF 2.0 directly.
I set my server to use PHP 5.2.17 (thanks IIS) and that didn't fix any of the issues. It might be the MySQL version?

Also, I tried to import using an old copy of the boards without user groups and, like Moderators, the page goes blank once you hit run.
Ok, I solved many of the hang ups by simply disabling Strict mode on MySQL. That said:

Forumperms gets trapped in a cycle and never finishes.

Moderators is still a blank page on run.
privatemessages - It tries to write to the column import_pmid, unfortunately that column exists in the tracker and not the mail table.
Pages: 1 2 3