Home arrow Forum
error when sync ing user
  Welcome, Guest. Please login or register.
December 02, 2008, 03:21:25 AM
Home New Posts Search Calendar


Login with username, password and session length
Forum  |  MamboHacks.com  |  Mambo-SMF Forum 1.3.0 Support  |  Topic: error when sync ing user « previous next »
Pages: 1 2 [3] Go Down Print
Author Topic: error when sync ing user  (Read 31968 times)
robbievk
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 32


View Profile
Re: error when sync ing user
« Reply #30 on: April 28, 2005, 12:01:58 PM »

Could this help in my case as well (not synching all users)?

wobo

i guess you got the same issues as i do
Logged
cowboy
Administrator
Hero Member
*****

Karma: +30/-0
Offline Offline

Posts: 663



View Profile WWW
Re: error when sync ing user
« Reply #31 on: April 30, 2005, 03:16:53 AM »

Ok, I just found out why. Just tested with 3000 dummies on my website.

Please get patch2 here.
Logged
Gandalf
Jr. Member
**

Karma: +0/-0
Offline Offline

Posts: 80



View Profile WWW
Re: error when sync ing user
« Reply #32 on: April 30, 2005, 03:35:26 AM »

ok i'm uploading it and i will get you result, BTW how do i resync members? do ihave to delete them all using phpmyadmin (except admin) and resync but also sync button is disabled no?

EDIT: the button isn't disabled syncing now..
« Last Edit: April 30, 2005, 03:38:19 AM by Gandalf » Logged
cowboy
Administrator
Hero Member
*****

Karma: +30/-0
Offline Offline

Posts: 663



View Profile WWW
Re: error when sync ing user
« Reply #33 on: April 30, 2005, 03:41:29 AM »

yes, if all your member are from SMF.
Logged
Gandalf
Jr. Member
**

Karma: +0/-0
Offline Offline

Posts: 80



View Profile WWW
Re: error when sync ing user
« Reply #34 on: April 30, 2005, 03:43:28 AM »

nope i still have 10 pages out of 81 Cry
what i've done, uploaded the new patch, "click to sync"

quoting still doesn't work for me Cry

EDIT: ok since you answered yes, i will delete all users from phpmyadmin
Logged
Gandalf
Jr. Member
**

Karma: +0/-0
Offline Offline

Posts: 80



View Profile WWW
Re: error when sync ing user
« Reply #35 on: April 30, 2005, 03:54:20 AM »

hmmmmmmm.. still in the same situation, neither usermanager neither quoting works Shocked
Logged
Gandalf
Jr. Member
**

Karma: +0/-0
Offline Offline

Posts: 80



View Profile WWW
Re: error when sync ing user
« Reply #36 on: April 30, 2005, 04:33:06 AM »

I apologise man, i didn't notice that files permission was screwed up and ftp failed to upload the patch, so far so good, i actually see now 72 pages out of 81 (50 user each page) so still some members missing

quoting also works great!!!

man can i know what was the problem with users since they was successfully transfered why they didn't appear???
Logged
cowboy
Administrator
Hero Member
*****

Karma: +30/-0
Offline Offline

Posts: 663



View Profile WWW
Re: error when sync ing user
« Reply #37 on: April 30, 2005, 11:50:55 AM »

they were suppose to be inserted to 3 mambo tables. I didn't realize that it was not executed in mos_core_acl_aro and  group_id_aro_id_groups_aro_map tables.
Logged
Gandalf
Jr. Member
**

Karma: +0/-0
Offline Offline

Posts: 80



View Profile WWW
Re: error when sync ing user
« Reply #38 on: April 30, 2005, 01:11:11 PM »

k then there's still a problem

mos_core_acl_aro :  3,838
mos_core_acl_groups_aro_map :  3,573
mos_users :  4,034
Logged
Gandalf
Jr. Member
**

Karma: +0/-0
Offline Offline

Posts: 80



View Profile WWW
Re: error when sync ing user
« Reply #39 on: April 30, 2005, 02:37:52 PM »

ok guys i already fixed mine by a simple dirty script (manually) it's already sync and i have all users in usermanager now, here i attach the script (fill in the first values of the script)

P.S: don't look at the code it's dirty 5 minutes job so a lot of useless maybe there's a better way also in it but it just do the trick) Tongue Tongue

P.P.S:this script will not touch SMF database, it suppose that you have already done the sync using the bridge, also don't forget to make a backup of the whole database just in case..

Code:
<?
$username="";
$password="";
$database="";
$mos_prefix="";



$missing = array();
$mos_users_temp=array();
$mos_users=array();
$mos_core_acl_aro_temp=array();
$mos_core_acl_aro=array();
$handle=mysql_connect("localhost","$username","$password");
mysql_select_db("$database");
$result = mysql_query("SELECT id FROM {$mos_prefix}users");
while ($mos_users_temp[] = mysql_fetch_assoc($result)){
$mos_users[] = $mos_users_temp[count($mos_users_temp) - 1]['id'];
}

$result=mysql_query("SELECT value FROM {$mos_prefix}core_acl_aro");
while($mos_core_acl_aro_temp[] = mysql_fetch_assoc($result)){
$mos_core_acl_aro[] = $mos_core_acl_aro_temp[count($mos_core_acl_aro_temp) - 1]['value'];
}

foreach ($mos_users as $value)
{
    if(!in_array($value,$mos_core_acl_aro))
        $missing[]=$value;
}

/*print_r($missing);
print_r($mos_users);
print_r($mos_core_acl_aro);*/
foreach($missing as $value)
{
    $result=mysql_query("SELECT name FROM {$mos_prefix}users WHERE id=$value");
    $name=mysql_fetch_assoc($result);
    $result=mysql_query("INSERT into {$mos_prefix}core_acl_aro (value, name) VALUES ($value,'$name[name]')");
}


$aro_id_temp=array();
$aro_id=array();
$aro_id_temp2=array();
$aro_id2=array();
$missing=array();
$result=mysql_query("SELECT aro_id FROM {$mos_prefix}core_acl_aro");
while ($aro_id_temp[] = mysql_fetch_assoc($result)){
$aro_id[] = $aro_id_temp[count($aro_id_temp) - 1]['aro_id'];
}

$result=mysql_query("SELECT aro_id FROM {$mos_prefix}core_acl_groups_aro_map");
while ($aro_id_temp2[] = mysql_fetch_assoc($result)){
$aro_id2[] = $aro_id_temp2[count($aro_id_temp2) - 1]['aro_id'];
}

foreach ($aro_id as $value)
{
        if(!in_array($value,$aro_id2))
                $missing[]=$value;
}

foreach($missing as $value)
{
       $result=mysql_query("INSERT into mos_core_acl_groups_aro_map (group_id, aro_id) VALUES (18,$value)");
}

print "done";
?>

or just copy
http://www.siemens-mobiles.org/blablo.phps and rename it to whatver .php
« Last Edit: April 30, 2005, 03:00:44 PM by Gandalf » Logged
Wolfgang Bornath
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 30


View Profile
Re: error when sync ing user
« Reply #40 on: April 30, 2005, 10:02:17 PM »

YOU DA MAN!

Now I'm able to see at least all 265 users which were synched  (out of 2,000). Good job!

wobo
Logged
Gandalf
Jr. Member
**

Karma: +0/-0
Offline Offline

Posts: 80



View Profile WWW
Re: error when sync ing user
« Reply #41 on: April 30, 2005, 10:03:09 PM »

no problem it's just a 5min job lol, i'm laughing when i see my code lol Cheesy
Logged
cowboy
Administrator
Hero Member
*****

Karma: +30/-0
Offline Offline

Posts: 663



View Profile WWW
Re: error when sync ing user
« Reply #42 on: April 30, 2005, 10:16:35 PM »

good job man.

anyway, i guess we're ready for the main release.
I also fixed this issue plus 2-way syncing.
Logged
Gandalf
Jr. Member
**

Karma: +0/-0
Offline Offline

Posts: 80



View Profile WWW
Re: error when sync ing user
« Reply #43 on: April 30, 2005, 10:19:37 PM »

is it already there( i mean the fixed one, because i'm trying to find out now why the modify doesn't work by installing fresh install of both mambo + SMF
Logged
Gandalf
Jr. Member
**

Karma: +0/-0
Offline Offline

Posts: 80



View Profile WWW
Re: error when sync ing user
« Reply #44 on: April 30, 2005, 10:42:16 PM »

man please before going with final release, verify that no problems with statistics as i describe it [ur=http://www.mambohacks.com/component/option,com_smf/Itemid,66/expv,2/topic,205.0]here[/url]
Logged
Pages: 1 2 [3] Go Up Print 
Forum  |  MamboHacks.com  |  Mambo-SMF Forum 1.3.0 Support  |  Topic: error when sync ing user « previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Forum | Powered by SMF 1.0.5 & Mambo-SMF.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!
None of the text or images in this public website may be copied without the expressed written consent of the authors.
Copyright 2005 by MamboHacks.com. Powered by Mambo. All rights reserved.
TERMS OF USE