coppermine-gallery.com/forum

Support => cpg1.6.x Support => cpg1.6 bridging => Topic started by: lurkalot on April 08, 2023, 06:36:43 PM

Title: Bridging with SMF 2.1.3
Post by: lurkalot on April 08, 2023, 06:36:43 PM
I upgraded my site from SMF 2.0.19 to the new SMF 2.1.3 and then bridged it.  All seems to be working except if I click on anyone's username anywhere in the gallery it gives an error on page.

Critical error
There was an error while processing a database query

Running SMF 2.1.3
Coppermine Photo Gallery 1.6.23
MySQL engine: MariaDB
MySQL version: 10.3.38-MariaDB-cll-lve
PHP: 7.3.33





Title: Re: Bridging with SMF 2.1.3
Post by: ron4mac on April 08, 2023, 09:05:48 PM
In the file bridge/smf21.inc.php, at about line 89:
replace
'location' => 'location', // name of 'location' field in users table
with
'location' => "''", // name of 'location' field in users table
Title: Re: Bridging with SMF 2.1.3
Post by: lurkalot on April 08, 2023, 10:31:29 PM
Thank you, that fixed it nicely.  8)
Title: Re: Bridging with SMF 2.1.3
Post by: lurkalot on April 08, 2023, 10:37:34 PM
Sorry spoke too soon.  Although it fixed the error when clicking on a username which now works fine, but,

Now I get that same error if I click the "Users" button.
Title: Re: Bridging with SMF 2.1.3
Post by: ron4mac on April 09, 2023, 01:41:36 AM
I'm not seeing the same error. Could you turn on maintenance debugging and try again? You should get more detail about the database error.
Were you bridging with SMF before? The first error that you reported must have existed for quite a while and I had an instance of SMF 2.1 RC4 that I troubleshot it against.
Title: Re: Bridging with SMF 2.1.3
Post by: lurkalot on April 09, 2023, 06:41:46 AM
Yes it was previously bridged with SMF 2.0.19 and as far as I'm aware no issues.  I've only just upgraded to SMF 2.1.3 which has gone through many changes since SMF 2.1 RC4 that you were testing with. 

Looks like all the dates are messed up.  The error I'm seeing after clicking "Users" in the database log is,

%268 %09, %2023 am30 %0:%Apr %p - While executing query 'SELECT id_member AS user_id, real_name AS user_name, email_address AS user_email, date_registered AS user_regdate, last_login AS user_lastvisit, AS user_active, COUNT(pid) AS pic_count, ROUND(SUM(total_filesize)/1024) AS disk_usage, group_name, group_quota FROM `caeerace_smf7`.smf_members AS u INNER JOIN `caeerace_smf7`.cpg_usergroups AS g ON u.id_post_group+100 = g.group_id LEFT JOIN `caeerace_smf7`.cpg_pictures AS p ON p.owner_id = u.id_member GROUP BY user_id ORDER BY user_regdate DESC LIMIT 0, 25;' in bridge/udb_base.inc.php on line 59 the following error was encountered:
1064 : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AS user_active, COUNT(pid) AS pic_count, ROUND(SUM(total_filesize)/1024) AS d...' at line 1
Title: Re: Bridging with SMF 2.1.3
Post by: ron4mac on April 09, 2023, 01:46:21 PM
When you edited the bridge file, I think you may have accidentally wiped out the line above the edited line:

                'active' => 'is_activated', // is user account active
Title: Re: Bridging with SMF 2.1.3
Post by: lurkalot on April 09, 2023, 02:10:09 PM
Quote from: ron4mac on April 09, 2023, 01:46:21 PM
When you edited the bridge file, I think you may have accidentally wiped out the line above the edited line:

                'active' => 'is_activated', // is user account active


You are spot on, I did indeed.  Ok that error is gone now. Thank you.

I do have another issue though, all dates appear to be messed up, and I get a error on page when I click an album in the user galleries when as regular member, or global moderator etc.
Title: Re: Bridging with SMF 2.1.3
Post by: ron4mac on April 09, 2023, 02:29:34 PM
Can I just unzip the 2.1.3 install over my current RC4, overwriting everything, to do the upgrade?
Title: Re: Bridging with SMF 2.1.3
Post by: lurkalot on April 09, 2023, 02:32:59 PM
Quote from: ron4mac on April 09, 2023, 02:29:34 PM
Can I just unzip the 2.1.3 install over my current RC4, overwriting everything, to do the upgrade?

Yes sort of, but don't use the install zip, grab the large upgrade zip, and overwrite your files, the run the upgrader from your browser address bar.
Title: Re: Bridging with SMF 2.1.3
Post by: ron4mac on April 09, 2023, 02:53:57 PM
I'm not seeing anything that looks like the issues you are describing ...
Title: Re: Bridging with SMF 2.1.3
Post by: lurkalot on April 09, 2023, 02:58:19 PM
Quote from: ron4mac on April 09, 2023, 02:53:57 PM
I'm not seeing anything that looks like the issues you are describing ...

All your dates are showing correctly under the images and in users?

I will try logging in as regular member and see if it generates a error in the log.
Title: Re: Bridging with SMF 2.1.3
Post by: lurkalot on April 09, 2023, 03:20:29 PM
Well it doesn't throw a error in the log when I click on an album, I just get a This page isn't working message.

By the way everything seems to work as admin, but not when one of the other groups.

The dates thing I mentioned is like this, in my screenshots

Title: Re: Bridging with SMF 2.1.3
Post by: ron4mac on April 09, 2023, 03:37:55 PM
see here for the date thing:
https://forum.coppermine-gallery.net/index.php/topic,80524.msg389468.html#msg389468

I think that might be your issue.
Title: Re: Bridging with SMF 2.1.3
Post by: lurkalot on April 09, 2023, 06:16:19 PM
For the sake of others reading this thread,  and with a lot of kind help from ron4mac (Thank You).

It turns out the blank pages I was getting when clinking on a users album was due to a outdated theme I had selected, reverting back to the Default theme cured that issue.

The strange date characters issue was because somehow my profile was using the English (British) language file, correcting this and changing to English sorted that problem.