Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1] 2   Go Down

Author Topic: phpbb bridging not working, fresh install  (Read 12837 times)

0 Members and 1 Guest are viewing this topic.

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
phpbb bridging not working, fresh install
« on: May 02, 2005, 11:26:12 pm »

I had problems adding a phpbb bridge, using phpbb 2.0.11 and the current dev checkout.

It caused database error.  So I installed the latest 2.0.14 version of phpbb, and on another up to date 1.4 cpg install, had exactly the same problem.

The db error is as follows;

Quote
While executing query "SELECT user_id as user_id FROM `clive_cpg`.phpbb_users WHERE group_id in (1)" on 0

mySQL error: Unknown column 'group_id' in 'where clause'

On checking, I found there is no such thing as 'group_id' in the phpbb users table, the nearest thing is 'user_level'.  I tried various changes to the phpbb.inc.php, all without success, as it's a bit above me.
« Last Edit: May 09, 2005, 12:07:40 am by donnoman »
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Nibbler

  • Guest
Re: phpbb bridging not working, fresh install
« Reply #1 on: May 03, 2005, 09:01:15 pm »

Caused by this code in init.inc.php

Code: [Select]
// Retrieve Array of Admin Users (used for hiding admin usernames on thumbnails)
$results = cpg_db_query("SELECT {$cpg_udb->field['user_id']} as user_id FROM $cpg_udb->usertable WHERE {$cpg_udb->field['usertbl_group_id']} in (" . implode(',',$CONFIG['ADMIN_GROUPS']).')');
$CONFIG['ADMIN_USERS']=array();
while ($row = mysql_fetch_array($results)) {
    $CONFIG['ADMIN_USERS'][] = $row['user_id'];
} // while
mysql_free_result($results);


You can't assume that all forums have such a simple user-group relationship, in fact most do not. I propose we cut this feature, and schedule it for 1.5 where it can be properly implemented. (unless someone has the time to find and test a solution for all 13 bbs).
Logged

Nibbler

  • Guest
Re: phpbb bridging not working, fresh install
« Reply #2 on: May 07, 2005, 12:58:17 pm »

Taking that silence as agreement, feature removed.
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: phpbb bridging not working, fresh install
« Reply #3 on: May 07, 2005, 04:02:36 pm »

Just did an update, but still get the same error as originally posted;

Quote
While executing query "SELECT user_id as user_id FROM `clive_cpg`.phpbb_users WHERE group_id in (1)" on 0

mySQL error: Unknown column 'group_id' in 'where clause'
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Nibbler

  • Guest
Re: phpbb bridging not working, fresh install
« Reply #4 on: May 07, 2005, 04:07:22 pm »

Try rev 1.92
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: phpbb bridging not working, fresh install
« Reply #5 on: May 08, 2005, 12:35:49 pm »

Version 1.92 does not give an error, but admin is seen as a regular user, and gets the admin menus as a registered user, not admin, so cannot admin the gallery.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Nibbler

  • Guest
Re: phpbb bridging not working, fresh install
« Reply #6 on: May 08, 2005, 09:29:50 pm »

Unrelated issue. Marking this as fixed. Will commit fixed up phpbb bridge for this new issue shortly.
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Nibbler, Why did you remove the display_admin_uploader feature?
« Reply #7 on: May 08, 2005, 09:50:00 pm »

That was an approved 1.4 feature.


It should not have been removed without discussion.
Logged

Nibbler

  • Guest
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: phpbb bridging not working, fresh install
« Reply #9 on: May 08, 2005, 09:59:14 pm »

Sorry Nibbler, I missed this section as I do not use phpbb bridging so I never read this thread.

However you nixed a feature that I like for the sake of a single bridge that isn't working, I don't think thats a valid reason.

Fix either the bridging or the feature, I don't think nixing it is an acceptable solution.
Logged

Nibbler

  • Guest
Re: phpbb bridging not working, fresh install
« Reply #10 on: May 08, 2005, 10:09:42 pm »

The code you added breaks many of the bridges in order to add a trivial feature. I only commented out the code, it is still there if you can fix the bug.
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: phpbb bridging not working, fresh install
« Reply #11 on: May 08, 2005, 10:11:04 pm »

I don't understand where casper was having a problem with the original code.

Code: [Select]
// Retrieve Array of Admin Groups (used for hiding admin usernames on thumbnails)
$results = cpg_db_query("SELECT group_id FROM {$CONFIG['TABLE_USERGROUPS']} WHERE has_admin_access ");
$CONFIG['ADMIN_GROUPS']=array();
while ($row = mysql_fetch_array($results)) {
    $CONFIG['ADMIN_GROUPS'][]= $row['group_id'];
} // while
mysql_free_result($results);

// Retrieve Array of Admin Users (used for hiding admin usernames on thumbnails)
$results = cpg_db_query("SELECT {$cpg_udb->field['user_id']} as user_id FROM $cpg_udb->usertable WHERE {$cpg_udb->field['usertbl_group_id']} in (" . implode(',',$CONFIG['ADMIN_GROUPS']).')');
$CONFIG['ADMIN_USERS']=array();
while ($row = mysql_fetch_array($results)) {
    $CONFIG['ADMIN_USERS'][] = $row['user_id'];
} // while
mysql_free_result($results);
Just did an update, but still get the same error as originally posted;

Quote
While executing query "SELECT user_id as user_id FROM `clive_cpg`.phpbb_users WHERE group_id in (1)" on 0

mySQL error: Unknown column 'group_id' in 'where clause'

Which means theres an admin group with id of 1 set as administrators, but no users in the group... so how can any bridged user ADMIN his coppermine install?

He then reports:

Version 1.92 does not give an error, but admin is seen as a regular user, and gets the admin menus as a registered user, not admin, so cannot admin the gallery.

So this leads me to believe that if you correct the admin issue with the bridge, the original code for the admin uploader feature will work as designed.
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: phpbb bridging not working, fresh install
« Reply #12 on: May 08, 2005, 10:16:45 pm »

Nibbler what was the "unrelated" issue?

Casper can you re-enable all the oringinal admin uploader code and see if it works properly now that you have the admin problem fixed.
« Last Edit: May 08, 2005, 10:22:14 pm by donnoman »
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: phpbb bridging not working, fresh install
« Reply #13 on: May 08, 2005, 10:23:11 pm »

The admin problem is not fixed yet, so going back at the moment will just return me to the opening point of this thread.

I'm waiting for Nibblers fix to the phpbb.inc.php file.

Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Nibbler

  • Guest
Re: phpbb bridging not working, fresh install
« Reply #14 on: May 08, 2005, 10:24:28 pm »

It's how the tables are setup in the database of the forum.

Your query assumes the user table stores the group of the user. Coppermine does this, so the query works.

PHPBB and others use a usergroups table, so you have to join the 2 tables on user_id to get the groups for a specified user.

I don't think there is an easy fix here.

I already searched the whole code to check the impact of commenting out yours. The unrelated issue is unrelated, and the fix is not yet in cvs.
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: phpbb bridging not working, fresh install
« Reply #15 on: May 08, 2005, 10:25:10 pm »

Ahh sorry Casper, I didn't realise that.

Perhaps Nibbler can test the uploader code when he's finished with the admin fix.
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: phpbb bridging not working, fresh install
« Reply #16 on: May 08, 2005, 10:29:14 pm »

Nibbler, the group code is synced to coppermine, and thats how users can establish that they are the gallery admin period. Thats how coppermine works.

It's immaterial how the forum stores the information, the bridge HAS to give it to coppermine in that form, it has nothing to do with the uploader code.

The uploader code is just looking for the same thing that the rest of coppermine looks for to see if a user is "GALLERY_ADMIN".

Fix the admin problem, uploader code should work.
Logged

Nibbler

  • Guest
Re: phpbb bridging not working, fresh install
« Reply #17 on: May 08, 2005, 10:31:31 pm »

Commited fix, update phpbb bridge and udb_core. Ignore updated picmgmt.inc.php.

Don't try to tell me how coppermine works.
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: phpbb bridging not working, fresh install
« Reply #18 on: May 08, 2005, 10:33:44 pm »

Did you test the uploader code?
Logged

Nibbler

  • Guest
Re: phpbb bridging not working, fresh install
« Reply #19 on: May 08, 2005, 10:35:05 pm »

Check here
Logged
Pages: [1] 2   Go Up
 

Page created in 0.025 seconds with 18 queries.