News:

SMF 2.1.5 has been released! Take it for a spin! Read more.

Main Menu

Strange (or not so strange). (Solved)

Started by Worsin, October 02, 2006, 03:20:14 PM

Previous topic - Next topic

Worsin

First off i just tried to delete a previous post on this matter from the other forum cause i put it in the wrong spot and it wouldnt let me delete. So sorry for the double post  :'(

Ok i have:

Joomla! 1.0.11 Stable
SMF 1.1 RC3
JACLPlus
SMF Bridge 1.16
CM 1.01

Everything went smooth at fist i set up the groups in Joomla! to correspond to the ones in SMF.  I would then run the bottom selection in the synch tab to set all the Joomla Groups according to the SMF ones.

Now here is where it gets strange.

If i go to set someone one to Global Moderator it will make them a registered user in Joomla yet i have it set to be an Author in Joomla!.

Right now i have a group called School Guru in SMF that = Author in Joomla!  If i try to change this to School Guru = Publisher and hit save it shows its saved but if i run the synch again (bottom synch button) it doesn't change the School Guru users to Publisher in Joomla!.  It keeps them as Author (the original setting)

It seems like the settings i used when i first set up the Joomla! vs SMF groups wont change even though it shows the change in the groups tab when i make the change.  Or to put another way its like the group tab is'nt actually saving the info in the database but is showing its saved in the groups tab.

Any help is welcomed

Thanks in advance!

Worsin
Joomla! 1.0.11 Stable
SMF 1.1 RC3 w/ Bridge 1.1.6
JACLPlus 1.0.11
CB 1.0.1
Versatility 2 Template (Rocket Themes)

Orstio

In PhpMyAdmin, check your jos_smf_config table.

I'll bet you have several pages of group synching entries.

Worsin

Quote from: Orstio on October 02, 2006, 06:04:14 PM
In PhpMyAdmin, check your jos_smf_config table.

I'll bet you have several pages of group synching entries.

There are 7 pages of them but i dont have a clue what to do with them =)
Joomla! 1.0.11 Stable
SMF 1.1 RC3 w/ Bridge 1.1.6
JACLPlus 1.0.11
CB 1.0.1
Versatility 2 Template (Rocket Themes)

Orstio


Worsin

Quote from: Orstio on October 04, 2006, 07:10:21 PM
Delete all but the first set.

Ok i have like 10 that have all different variables and then like 7 pages that have a variable of synch_group.

Delete all the synch_group?
Joomla! 1.0.11 Stable
SMF 1.1 RC3 w/ Bridge 1.1.6
JACLPlus 1.0.11
CB 1.0.1
Versatility 2 Template (Rocket Themes)

Orstio

You will notice an entire "set" of synch_group entries.  The value1 column should not repeat.

Worsin

Quote from: Orstio on October 04, 2006, 07:36:27 PM
You will notice an entire "set" of synch_group entries.  The value1 column should not repeat.

Deleted all synch_group and then went into the group tab of the bridge and saved again so it set everything right.

Problem solved

Now quick question,  if i change the group relationships and hit save again is it going to replace the synch_groups fields or add to it?

Thanks!!!
Joomla! 1.0.11 Stable
SMF 1.1 RC3 w/ Bridge 1.1.6
JACLPlus 1.0.11
CB 1.0.1
Versatility 2 Template (Rocket Themes)

Orstio

QuoteNow quick question,  if i change the group relationships and hit save again is it going to replace the synch_groups fields or add to it?

It shouldn't.  It's supposed to read from the database first, and if there is already a value, then it is to update instead of inserting.

If it does, I'd like to know more details about your hosting and your MySQL version, etc.

Worsin

#8
Quote from: Orstio on October 04, 2006, 08:06:29 PM
QuoteNow quick question,  if i change the group relationships and hit save again is it going to replace the synch_groups fields or add to it?

It shouldn't.  It's supposed to read from the database first, and if there is already a value, then it is to update instead of inserting.

If it does, I'd like to know more details about your hosting and your MySQL version, etc.

In an effort to help you debug, i made a change to my group relationships in the group tab and hit save then went to my phpAdmin and it is ADDING to the database not replacing the synch_groups variables.

HostMonster is my host
mysql 4.1.21
php 4

If mysql 5 and php 5 are recommended me know
Joomla! 1.0.11 Stable
SMF 1.1 RC3 w/ Bridge 1.1.6
JACLPlus 1.0.11
CB 1.0.1
Versatility 2 Template (Rocket Themes)

Orstio

In your admin.smf.php, can you find this:

//Now for the group sync...
foreach($sync_group as $smf_group => $mambo_group) {
$database->setQuery("
SELECT `value2`
FROM #__smf_config
WHERE (`variable` = 'sync_group' AND `value1`='$smf_group')");
$result['check'] = $database->loadAssocList();
if ($result['check']['value2']){
$database->setQuery("
UPDATE #__smf_config
SET `value2` = '$mambo_group'
WHERE (`variable` = 'sync_group' AND `value1`='$smf_group')");
$result[$smf_group] = $database->query();


and replace it with this:

//Now for the group sync...
foreach($sync_group as $smf_group => $mambo_group) {
$database->setQuery("
SELECT `value2`
FROM #__smf_config
WHERE (`variable` = 'sync_group' AND `value1`='$smf_group')");
$result['check'] = $database->loadResult();
if ($result['check']!=0){
$database->setQuery("
UPDATE #__smf_config
SET `value2` = '$mambo_group'
WHERE (`variable` = 'sync_group' AND `value1`='$smf_group')");
$result[$smf_group] = $database->query();

Worsin

#10
This is what i have currently

//Now for the group sync...
foreach($sync_group as $smf_group => $mambo_group) {
$database->setQuery("
SELECT `value2`
FROM #__smf_config
WHERE (`variable` = 'sync_group' AND `value1`='$smf_group')");
$result['check'] = $database->loadAssocList();
if ($result['check']['value2']){
$database->setQuery("
UPDATE #__smf_config
SET `value2` = '$mambo_group'
WHERE (`variable` = 'sync_group' AND `value1`='$smf_group')");
$result[$smf_group] = $database->query();


I change it to


//Now for the group sync...
foreach($sync_group as $smf_group => $mambo_group) {
$database->setQuery("
SELECT `value2`
FROM #__smf_config
WHERE (`variable` = 'sync_group' AND `value1`='$smf_group')");
$result['check'] = $database->loadResult();
if ($result['check']!=0){
$database->setQuery("
UPDATE #__smf_config
SET `value2` = '$mambo_group'
WHERE (`variable` = 'sync_group' AND `value1`='$smf_group')");
$result[$smf_group] = $database->query();



and i get this error

Parse error: syntax error, unexpected ';' in /home/teenhelp/public_html/administrator/components/com_smf/admin.smf.php on line 784


Just let me know what to do next  ;D

Update: when i go to paste the same exact information i had previously in that file i get same error.

I even tried it with just the 1 line that is different in the code you pasted and it still does it.

This makes no sence to me as i am setting it back exactly the way it was before.  The only way i can restore it to normal is to use the backup file i made.
Joomla! 1.0.11 Stable
SMF 1.1 RC3 w/ Bridge 1.1.6
JACLPlus 1.0.11
CB 1.0.1
Versatility 2 Template (Rocket Themes)

Worsin

I got it to work.  The code you provided was the ticket.

I was using the joomlaXplorer Componant and for some reason it wasnt doing something right so i used gedit in gnome to make the change and it works perfect now.

Thanks for the help

You rock!!
Joomla! 1.0.11 Stable
SMF 1.1 RC3 w/ Bridge 1.1.6
JACLPlus 1.0.11
CB 1.0.1
Versatility 2 Template (Rocket Themes)

Worsin

Since i got you in this thread i have another issue im trying to work out.

If i try to use the Preview feature when posting something in my forum i get.

Fetching preview...

and thats it  :'(

any suggestions on where to start looking?
Joomla! 1.0.11 Stable
SMF 1.1 RC3 w/ Bridge 1.1.6
JACLPlus 1.0.11
CB 1.0.1
Versatility 2 Template (Rocket Themes)


Worsin

#14
Quote from: Orstio on October 05, 2006, 05:48:15 PM
Can I see a URL?

www.teenhelpcenter.us

if you need admin access or something let me know.
Joomla! 1.0.11 Stable
SMF 1.1 RC3 w/ Bridge 1.1.6
JACLPlus 1.0.11
CB 1.0.1
Versatility 2 Template (Rocket Themes)


Worsin

Joomla! 1.0.11 Stable
SMF 1.1 RC3 w/ Bridge 1.1.6
JACLPlus 1.0.11
CB 1.0.1
Versatility 2 Template (Rocket Themes)

Advertisement: