SMFHacks.com

SMF Gallery Pro => Support => Topic started by: justinbowser on October 31, 2020, 11:16:23 am

Title: Need Help with Coppermine Conversion
Post by: justinbowser on October 31, 2020, 11:16:23 am
Just purchased and installed the Gallery Pro and need converter and help to port Coppermine Gallery to SMF Gallery.
Title: Re: Need Help with Coppermine Conversion
Post by: SMFHacks on October 31, 2020, 11:28:02 am
Go to this topic:
https://www.smfhacks.com/index.php/topic,2839.0.html

Download copperminephp7.0.zip

Extract the files then upload the files to your SMF forum main directory.

Visit the script in your browser of your site to begin the conversion process.
Title: Re: Need Help with Coppermine Conversion
Post by: justinbowser on October 31, 2020, 01:14:41 pm
I downloaded and extracted the conversion script and ran it.  I get the following error:

Error: Can not find the config.inc.php in http://www.suraklyn.com/r65_forum_gallery/include/config.inc.php
Please make sure you have the right coppermime path.

I have confirmed that the file exists at this location on the other host.  I am needing to convert the coppermine on one host to the SMF gallery on a different host.
Title: Re: Need Help with Coppermine Conversion
Post by: SMFHacks on October 31, 2020, 01:22:43 pm
The path should be a filename path not a weburl for instance

/home/public_html/r65_forum_gallery/
Title: Re: Need Help with Coppermine Conversion
Post by: justinbowser on October 31, 2020, 01:35:45 pm
The Coppermine installation is on a different host then the SMF installation.
Title: Re: Need Help with Coppermine Conversion
Post by: SMFHacks on October 31, 2020, 01:48:53 pm
The files and database needs to be copied to the SMF host. or the SMF Host needs to be copied to the coppermine location
Title: Re: Need Help with Coppermine Conversion
Post by: justinbowser on October 31, 2020, 04:50:12 pm
I was afraid of that - nothing is ever easy!

I moved the coppermine installation over to the new host using the procedure at the coppermine forum:

https://documentation.coppermine-gallery.net/en/export.htm#backup_file_complete

1.  I zipped up the entire Coppermine installation on the old host and extracted it on to my new host.
2.  Exported the database to a file through phpMyAdmin.
3.  Created a new mysql database on the target host.
4.  Imported the backup file into the new DB on new host.
5.  Modified the config.inc.php file with the new DB name, DB username, and password.

When I try to do the conversion I get:


Warning: mysqli_connect(): (28000/1045): Access denied for user 'bmwrorg_cpm_adm'@'localhost' (using password: YES) in /home/bmwrorg/public_html/smf/galleryimport.php on line 232
Could not connect to the MySQL server.

I did notice that when I was updating the config.inc.php file that the existing password looked like it was encrypted and the password I replaced it with was in plain text.  Is there a switch I need to set somewhere to accept a plain test PW or is something else FUBAR?
Title: Re: Need Help with Coppermine Conversion
Post by: SMFHacks on October 31, 2020, 06:13:46 pm
It looks like the bmwrorg_cpm_adm user needs to be added to database of coppermine. I would also give it access to the SMF forum as well. Make sure to grant rights to it.
Title: Re: Need Help with Coppermine Conversion
Post by: justinbowser on October 31, 2020, 06:20:36 pm
OK, got everything sorted with the DB connection and converted the Coppermine data.  It looks like all of the pics got pulled in BUT all of the user associations that I have looked at are wrong!  :( I pull up someone's gallery and all of the pictures belong to somebody else...
Title: Re: Need Help with Coppermine Conversion
Post by: SMFHacks on October 31, 2020, 06:28:22 pm
How was coppermine bridged before? Was it tied to an SMF forum or standalone?
Title: Re: Need Help with Coppermine Conversion
Post by: justinbowser on October 31, 2020, 07:58:56 pm
It was standalone.
Title: Re: Need Help with Coppermine Conversion
Post by: SMFHacks on October 31, 2020, 08:28:11 pm
Where any users on your coppermine gallery part of the forum?
If not we can just reset the owners of all pictures/comments to guests.
Title: Re: Need Help with Coppermine Conversion
Post by: justinbowser on October 31, 2020, 08:53:55 pm
Yes, they were all members of the YaBB forum.  Looking at the DB it seems that the conversion took the user id number from the coppermine DB and assumed the user ID was the same in the SMF DB.  I am going to have to figure out who had what album in coppermine and then cross the user id and then do a search and replace in the SMF DB.  Unfortunately I an not an SQL person so I'll need to do it one by one in phpMyAdmin.
Title: Re: Need Help with Coppermine Conversion
Post by: SMFHacks on October 31, 2020, 09:23:21 pm
I can try to modify the conversion scrpit to do a better search you would need to rerun the conversion though. This is the first time converting a nonbridged gallery.

If you just want to reset all the pictures and comments to a guest user try this sql on the database
Code: [Select]
UPDATE smf_gallery_pic SET id_member = 0;
UPDATE smf_gallery_comment SET id_member = 0;


Title: Re: Need Help with Coppermine Conversion
Post by: justinbowser on October 31, 2020, 10:26:08 pm
I wouldn't be opposed to re-running the conversion.  I would like to say that the majority of the user names would be very close between the forum and coppermine but not all.  In retrospect I should have forced users to have the same name on both platforms but at the time I didn't think it would matter. 

Maybe I could compare coppermine to smf and possibly rename coppermine users to match smf users?  Also, there will be users on coppermine that are no longer on the forum which will also complicate things.

Could a global search and replace on all tables in the coppermine db be performed for something like replace username1 with username2?  I could then make the vast majority of the username match between the two and maybe simplify the conversion.
Title: Re: Need Help with Coppermine Conversion
Post by: SMFHacks on October 31, 2020, 10:32:13 pm
Backup your coppermine database first.

Then go into the coppermine databasae table for CPG_users
And update either username or email to the forum one.

I can then write a script to match based on username or email and match it to the SMF memberid
Title: Re: Need Help with Coppermine Conversion
Post by: justinbowser on October 31, 2020, 10:50:20 pm
Sounds like a plan.  It will take me a while to accomplish this as I have some "real" work I need to get done.  I doubt customers would appreciate me playing with a photo gallery while they waited for their stuff to get fixed!  :o
Title: Re: Need Help with Coppermine Conversion
Post by: justinbowser on October 31, 2020, 10:52:27 pm
Oh, what should I put if there is no match?
Title: Re: Need Help with Coppermine Conversion
Post by: SMFHacks on October 31, 2020, 10:55:50 pm
I would just leave it as is.
I will make them a guest user in that case.
Title: Re: Need Help with Coppermine Conversion
Post by: justinbowser on November 01, 2020, 07:59:45 am
Cool!  I will also delete Coppermine users that don't have any content/images.
Title: Re: Need Help with Coppermine Conversion
Post by: SMFHacks on November 01, 2020, 08:08:19 am
That's not required though. Since I am not looking at users just their content.
Title: Re: Need Help with Coppermine Conversion
Post by: justinbowser on November 01, 2020, 05:31:58 pm
OK.  Will I need to delete the contents of the smf gallery tables to avoid dups?  I had already "fixed" two users albums before I decided to ask for help.
Title: Re: Need Help with Coppermine Conversion
Post by: SMFHacks on November 01, 2020, 06:33:31 pm
Yes, but I can make a change to the script to clear the contents of SMF Gallery
Title: Re: Need Help with Coppermine Conversion
Post by: justinbowser on November 02, 2020, 03:01:36 pm
Great, I should be ready to go whenever you are...
Title: Re: Need Help with Coppermine Conversion
Post by: SMFHacks on November 02, 2020, 11:22:19 pm
Give this a try and see if it helps
Title: Re: Need Help with Coppermine Conversion
Post by: justinbowser on November 03, 2020, 09:34:33 am
Started out nice but got the following error:

Beginning importing of Coppermime information.
Importing Albums..
Running: Select a.aid, a.title, a.description, a.alb_password, a.category FROM cpg_albums AS a
Importing Pictures...
Running Select pid,aid, title,caption,hits,filesize,pheight,pwidth,filename,filepath,ctime,owner_id,keywords FROM cpg_pictures

Notice: Undefined offset: 1 in /home/bmwrorg/public_html/smf/galleryimport.php on line 382
An Error Has Occurred!
The database value you're trying to insert does not exist: ID_CAT
Back


The smf gallery DB table for pictures now has 5 files and user id is all zero.
Title: Re: Need Help with Coppermine Conversion
Post by: SMFHacks on November 03, 2020, 11:17:11 am
Hmm try this
Title: Re: Need Help with Coppermine Conversion
Post by: justinbowser on November 03, 2020, 07:01:03 pm
Getting closer.  It looks like all of the pics were converted, albums created, but the user id is zero on all entries.  There were also a few errors at the end...

Beginning importing of Coppermime information.
Importing Albums..
Running: Select a.aid, a.title, a.description, a.alb_password, a.category FROM cpg_albums AS a
Importing Pictures...
Running Select pid,aid, title,caption,hits,filesize,pheight,pwidth,filename,filepath,ctime,owner_id,keywords FROM cpg_pictures

Notice: Undefined offset: 1 in /home/bmwrorg/public_html/smf/galleryimport.php on line 382

Notice: Undefined offset: 1 in /home/bmwrorg/public_html/smf/galleryimport.php on line 382

Notice: Undefined offset: 1 in /home/bmwrorg/public_html/smf/galleryimport.php on line 382
Importing Comments...
Recounting User Galleries...
Coppermime information Imported!
Visit imported Gallery https://bmwr65.org/smf/index.php?action=gallery
Title: Re: Need Help with Coppermine Conversion
Post by: SMFHacks on November 03, 2020, 08:34:59 pm
Try this added more debugging
Title: Re: Need Help with Coppermine Conversion
Post by: justinbowser on November 03, 2020, 09:24:30 pm
OK, here we go!  Now the gallery_pic table count has doubled so I guess the "new" data was appended.  Here's are the post conversion messages:

Beginning importing of Coppermime information.
Importing Albums..
Running: Select a.aid, a.title, a.description, a.alb_password, a.category FROM cpg_albums AS a
Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 2Query Failed lookup user: 2Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3Query Failed lookup user: 3Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 5Query Failed lookup user: 5Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 7Query Failed lookup user: 7Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 4Query Failed lookup user: 4Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 13Query Failed lookup user: 13Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 20Query Failed lookup user: 20Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 21Query Failed lookup user: 21Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 8Query Failed lookup user: 8Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 24Query Failed lookup user: 24Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 26Query Failed lookup user: 26Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 23Query Failed lookup user: 23Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 27Query Failed lookup user: 27Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 6Query Failed lookup user: 6Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 31Query Failed lookup user: 31Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 22Query Failed lookup user: 22Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 33Query Failed lookup user: 33Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 29Query Failed lookup user: 29Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 34Query Failed lookup user: 34Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 37Query Failed lookup user: 37Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 39Query Failed lookup user: 39Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 43Query Failed lookup user: 43Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 30Query Failed lookup user: 30Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 58Query Failed lookup user: 58Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 64Query Failed lookup user: 64Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 93Query Failed lookup user: 93Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 116Query Failed lookup user: 116Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 121Query Failed lookup user: 121Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 150Query Failed lookup user: 150Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 65Query Failed lookup user: 65Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 66Query Failed lookup user: 66Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 1241Query Failed lookup user: 1241Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 2058Query Failed lookup user: 2058Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 2561Query Failed lookup user: 2561Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 2783Query Failed lookup user: 2783Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3122Query Failed lookup user: 3122Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 2322Query Failed lookup user: 2322Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 2829Query Failed lookup user: 2829Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3138Query Failed lookup user: 3138Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3602Query Failed lookup user: 3602Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3076Query Failed lookup user: 3076Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3605Query Failed lookup user: 3605Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3613Query Failed lookup user: 3613Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3633Query Failed lookup user: 3633Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3646Query Failed lookup user: 3646Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3652Query Failed lookup user: 3652Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 1064Query Failed lookup user: 1064Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3661Query Failed lookup user: 3661Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3664Query Failed lookup user: 3664Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3677Query Failed lookup user: 3677Importing Pictures...
Running Select pid,aid, title,caption,hits,filesize,pheight,pwidth,filename,filepath,ctime,owner_id,keywords FROM cpg_pictures

Notice: Undefined offset: 1 in /home/bmwrorg/public_html/smf/galleryimport.php on line 382

Notice: Undefined offset: 1 in /home/bmwrorg/public_html/smf/galleryimport.php on line 382

Notice: Undefined offset: 1 in /home/bmwrorg/public_html/smf/galleryimport.php on line 382
Importing Comments...
Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 1Query Failed lookup user: 1Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 0Query Failed lookup user: 0Recounting User Galleries...
Coppermime information Imported!
Visit imported Gallery https://bmwr65.org/smf/index.php?action=gallery
Title: Re: Need Help with Coppermine Conversion
Post by: SMFHacks on November 03, 2020, 09:56:57 pm
Can you run this query on your coppermine database via phpmyadmin i want to see what happens/returned

Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 2
Title: Re: Need Help with Coppermine Conversion
Post by: justinbowser on November 03, 2020, 11:30:30 pm
Sure thing, here's a partial screen shot.
Title: Re: Need Help with Coppermine Conversion
Post by: SMFHacks on November 03, 2020, 11:36:06 pm
Try this
Title: Re: Need Help with Coppermine Conversion
Post by: justinbowser on November 04, 2020, 09:44:30 am
Got another boo-boo immediately:

Beginning importing of Coppermime information.
Importing Albums..
Running: Select a.aid, a.title, a.description, a.alb_password, a.category FROM cpg_albums AS a
Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 2
Notice: Undefined index: email in /home/bmwrorg/public_html/smf/galleryimport.php on line 741
An Error Has Occurred!
The database value you're trying to insert does not exist: email
Back
Title: Re: Need Help with Coppermine Conversion
Post by: justinbowser on November 04, 2020, 09:59:48 am
I glanced at the php code and on line 741 it is:

   'email' => $row['email'],

Should it be?

   'email' => $row['user_email'],

If so I can make the change and re-run...
Title: Re: Need Help with Coppermine Conversion
Post by: SMFHacks on November 04, 2020, 10:01:50 am
Yes just make that change!
Title: Re: Need Help with Coppermine Conversion
Post by: justinbowser on November 04, 2020, 11:18:38 am
I think we are almost there!!!!

The import ran, converted all pics, they appear to have the correct users associated with them but... - there's always a but. right?

- On the main gallery page, under "User Galleries" the number of images is listed as zero.

- When you open up a user's gallery each of their galleries/albums show 0 images but when you open it up all of the pics are there!

I think if these two things get ironed out we will be perfect!

Here's the conversion results with a couple of errors at the end:

Beginning importing of Coppermime information.
Importing Albums..
Running: Select a.aid, a.title, a.description, a.alb_password, a.category FROM cpg_albums AS a
Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 2Found SMF MEM ID: 1Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 5Found SMF MEM ID: 231Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 7Found SMF MEM ID: 2Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 4Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 13Found SMF MEM ID: 18Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 20Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 21Found SMF MEM ID: 7Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 8Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 24Found SMF MEM ID: 8Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 26Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 23Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 27Found SMF MEM ID: 4Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 6Found SMF MEM ID: 23Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 31Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 22Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 33Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 29Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 34Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 37Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 39Found SMF MEM ID: 3Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 43Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 30Found SMF MEM ID: 6Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 58Found SMF MEM ID: 43Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 64Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 93Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 116Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 121Found SMF MEM ID: 28Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 150Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 65Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 66Found SMF MEM ID: 31Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 1241Found SMF MEM ID: 39Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 2058Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 2561Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 2783Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3122Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 2322Found SMF MEM ID: 67Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 2829Found SMF MEM ID: 38Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3138Found SMF MEM ID: 300Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3602Found SMF MEM ID: 89Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3076Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3605Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3613Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3633Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3646Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3652Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 1064Found SMF MEM ID: 55Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3661Found SMF MEM ID: 169Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3664Found SMF MEM ID: 179Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3677Found SMF MEM ID: 240Importing Pictures...
Running Select pid,aid, title,caption,hits,filesize,pheight,pwidth,filename,filepath,ctime,owner_id,keywords FROM cpg_pictures

Notice: Undefined offset: 1 in /home/bmwrorg/public_html/smf/galleryimport.php on line 382

Notice: Undefined offset: 1 in /home/bmwrorg/public_html/smf/galleryimport.php on line 382

Notice: Undefined offset: 1 in /home/bmwrorg/public_html/smf/galleryimport.php on line 382
Importing Comments...
Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 1Found SMF MEM ID: 1Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 0
An Error Has Occurred!
The database value you're trying to insert does not exist: username
Back
Title: Re: Need Help with Coppermine Conversion
Post by: SMFHacks on November 04, 2020, 11:23:37 am
Open the script find
Code: [Select]
function ReturnSMFUserID($userID)
{
global $db2, $prefix, $smcFunc, $db_prefix;
$finalID = 0;
$userID = (int) $userID;

Add after
Code: [Select]
if (empty($userID))
return;
Title: Re: Need Help with Coppermine Conversion
Post by: justinbowser on November 04, 2020, 11:39:26 am
Same results as before as far as image counts.  If these counts are stored somewhere I can just add them up and make a DB change.

Beginning importing of Coppermime information.
Importing Albums..
Running: Select a.aid, a.title, a.description, a.alb_password, a.category FROM cpg_albums AS a
Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 2Found SMF MEM ID: 1Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 5Found SMF MEM ID: 231Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 7Found SMF MEM ID: 2Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 4Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 13Found SMF MEM ID: 18Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 20Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 21Found SMF MEM ID: 7Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 8Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 24Found SMF MEM ID: 8Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 26Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 23Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 27Found SMF MEM ID: 4Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 6Found SMF MEM ID: 23Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 31Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 22Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 33Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 29Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 34Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 37Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 39Found SMF MEM ID: 3Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 43Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 30Found SMF MEM ID: 6Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 58Found SMF MEM ID: 43Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 64Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 93Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 116Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 121Found SMF MEM ID: 28Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 150Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 65Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 66Found SMF MEM ID: 31Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 1241Found SMF MEM ID: 39Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 2058Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 2561Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 2783Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3122Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 2322Found SMF MEM ID: 67Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 2829Found SMF MEM ID: 38Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3138Found SMF MEM ID: 300Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3602Found SMF MEM ID: 89Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3076Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3605Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3613Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3633Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3646Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3652Found SMF MEM ID: 0Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 1064Found SMF MEM ID: 55Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3661Found SMF MEM ID: 169Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3664Found SMF MEM ID: 179Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 3677Found SMF MEM ID: 240Importing Pictures...
Running Select pid,aid, title,caption,hits,filesize,pheight,pwidth,filename,filepath,ctime,owner_id,keywords FROM cpg_pictures

Notice: Undefined offset: 1 in /home/bmwrorg/public_html/smf/galleryimport.php on line 382

Notice: Undefined offset: 1 in /home/bmwrorg/public_html/smf/galleryimport.php on line 382

Notice: Undefined offset: 1 in /home/bmwrorg/public_html/smf/galleryimport.php on line 382
Importing Comments...
Select u.user_name,u.user_email FROM cpg_users AS u WHERE u.user_id = 1Found SMF MEM ID: 1
An Error Has Occurred!
The database value you're trying to insert does not exist: id_member
Back
Title: Re: Need Help with Coppermine Conversion
Post by: SMFHacks on November 04, 2020, 12:04:54 pm
Yeah just failing on comment imports now...
There might be a setting to recount them not sure though.

Try this file trying to narrow down the issue.
And also can you run this sql query in phpmyadmin on SMF and report back results

describe smf_gallery_comment;



Title: Re: Need Help with Coppermine Conversion
Post by: justinbowser on November 04, 2020, 12:55:39 pm
I re-ran the conversion with your latest file and looking at the converted gallery all pics seem to be there, user associations correct, image counts are there, and the random comments I've checked seem to be OK.  I'm not sure why the conversion is complaining at the end!

The only thing I noticed in the gallery was that if you did a search for a user's gallery and you entered a user that doesn't exist it comes back with the complete list of images.  Not a biggie but seems like it should report "User not found" or something like that...

Unless you want to continue debugging this script in order to get it to complete without any "Notices" I'm happy unless my users discover something glaring.

Here's the DB query:

Error
SQL query:


describe smf_gallery_comment
MySQL said: Documentation

#1146 - Table 'bmwrorg_SMF_BU.smf_gallery_comment' doesn't exist

Results from new conversion:

Beginning importing of Coppermime information.
Importing Albums..
Running: Select a.aid, a.title, a.description, a.alb_password, a.category FROM cpg_albums AS a
Found SMF MEM ID: 1Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Insert USER ID:Insert USER ID:Insert USER ID:Found SMF MEM ID: 231Insert USER ID:Found SMF MEM ID: 2Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Found SMF MEM ID: 18Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Found SMF MEM ID: 7Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Insert USER ID:Found SMF MEM ID: 8Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Insert USER ID:Found SMF MEM ID: 4Insert USER ID:Found SMF MEM ID: 23Insert USER ID:Insert USER ID:Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Insert USER ID:Insert USER ID:Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Insert USER ID:Found SMF MEM ID: 3Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Found SMF MEM ID: 6Insert USER ID:Found SMF MEM ID: 43Insert USER ID:Insert USER ID:Insert USER ID:Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Insert USER ID:Insert USER ID:Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Found SMF MEM ID: 28Insert USER ID:Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Insert USER ID:Found SMF MEM ID: 31Insert USER ID:Found SMF MEM ID: 39Insert USER ID:Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Insert USER ID:Found SMF MEM ID: 67Insert USER ID:Found SMF MEM ID: 38Insert USER ID:Found SMF MEM ID: 300Insert USER ID:Found SMF MEM ID: 89Insert USER ID:Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Insert USER ID:Insert USER ID:Insert USER ID:Found SMF MEM ID: 0Insert USER ID:Found SMF MEM ID: 55Insert USER ID:Found SMF MEM ID: 169Insert USER ID:Found SMF MEM ID: 179Insert USER ID:Found SMF MEM ID: 240Insert USER ID:Importing Pictures...
Running Select pid,aid, title,caption,hits,filesize,pheight,pwidth,filename,filepath,ctime,owner_id,keywords FROM cpg_pictures

Notice: Undefined offset: 1 in /home/bmwrorg/public_html/smf/galleryimport.php on line 383

Notice: Undefined offset: 1 in /home/bmwrorg/public_html/smf/galleryimport.php on line 383

Notice: Undefined offset: 1 in /home/bmwrorg/public_html/smf/galleryimport.php on line 383
Importing Comments...
Comment test:Comment test:Comment test:Comment test:Comment test:Comment test:Comment test:Comment test:Comment test:Comment test:Comment test:Comment test:Comment test:Found SMF MEM ID: 1Comment test:Comment test:Comment test:Comment test:Comment test:Comment test:Comment test:Comment test:Comment test:Comment test:Comment test:Comment test:Comment test:Comment test:Comment test:Comment test:Comment test:Comment test:Comment test:Recounting User Galleries...
Coppermime information Imported!
Visit imported Gallery https://bmwr65.org/smf/index.php?action=gallery
Title: Re: Need Help with Coppermine Conversion
Post by: SMFHacks on November 04, 2020, 01:05:48 pm
Looks good! Notices where just for us to troubleshoot and find any issues. But looks good above.
Title: Re: Need Help with Coppermine Conversion
Post by: justinbowser on November 04, 2020, 01:23:22 pm
As we used to say in the military, "Outfu%^*ngstanding!"  I guess you now have a standalone Coppermine conversion program!  ;D

I am PMing you about a different issue you might be able to point me in the right direction on.

I appreciate the help more than you can imagine.
Title: Re: Need Help with Coppermine Conversion
Post by: SMFHacks on November 04, 2020, 01:24:09 pm
Glad to help!