Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: 1 [2] 3   Go Down

Author Topic: Mass Import plugin for cpg1.5.x  (Read 49377 times)

0 Members and 1 Guest are viewing this topic.

S73

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Mass Import plugin for cpg1.5.x
« Reply #20 on: February 29, 2012, 08:57:37 PM »

is there anything I could do to avoid being logged out after a few minutes?

is there anything I could do for images to be assigned correctly to their albums?

is there anything I could do for albums to be properly assigned to their categories?

Logged

S73

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Mass Import plugin for cpg1.5.x
« Reply #21 on: February 29, 2012, 09:00:54 PM »

Can anyone kindly simply point me in the right direction ?

Is it possible that the mass import tool is Not meant to be used in a bridged gallery but should be used in a native one?

I don't mind breaking the bridge and going back to native coppermine. But after the mass import, would I be able to re-bridge without losing the albums and categories?
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 240
Re: Mass Import plugin for cpg1.5.x
« Reply #22 on: February 29, 2012, 09:07:40 PM »

Can anyone kindly simply point me in the right direction ?

Is it possible that the mass import tool is Not meant to be used in a bridged gallery but should be used in a native one?

I don't mind breaking the bridge and going back to native coppermine. But after the mass import, would I be able to re-bridge without losing the albums and categories?

Hi S73,

I'm not an expert in Coppermine, but I got the 'mass import tool' to work for me in a bridged gallery (bridged with SMF2.0). 

If you do decide break the bridge and re-bridge, that shouldn't affect the albums or categories at all from what I understand.

And finally, I think you experienced the same problem as me when I first tried to run Mass Import -- the pictures got imported but were imported into a blank category.  As an admin, go to "Categories" and delete the blank category ... hopefully, that will un-hide the albums that were hidden in the blank category. 

And lastly, I would honestly recommend that you do Batch Add Files, simply because it's the safer method to add pictures.  I'm still testing out Mass Import Plug-in, and nobody supports the plug-in so you won't get any 'official' support on it. 

Cheers,
pols1337
Logged

S73

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Mass Import plugin for cpg1.5.x
« Reply #23 on: February 29, 2012, 09:17:31 PM »

thank you loads pols and I highly appreciate your kind help.

Mine is bridged to vbulletin4 (the bridge says it supports vbulletin3).

I would have used the batch tool ...... but for 70,000 pics in 500 subfolders (albums) in 30 categories......... that is a loooooooooot of work to do manually.

I still thank you for your great feedback. I am breaking the bridge and trying now.

You know pols, I many times heard this " official support".

Well I never asked for official support. Any kind advice that helps me move a bit closer to my target is very welcome.

Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 240
Re: Mass Import plugin for cpg1.5.x
« Reply #24 on: February 29, 2012, 09:25:40 PM »

I have 50,000 pictures in 400 folders.  Trust me, batch adding is not that bad  :-\

Also, breaking the bridge won't do anything.  I hope you understand that.  All that will do is modify the users and permission settings, but won't change how you add photos. 
Logged

S73

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Mass Import plugin for cpg1.5.x
« Reply #25 on: February 29, 2012, 09:32:40 PM »

I have 50,000 pictures in 400 folders.  Trust me, batch adding is not that bad  :-\

Also, breaking the bridge won't do anything.  I hope you understand that.  All that will do is modify the users and permission settings, but won't change how you add photos.

Wow. you must be a very patient man. Or that you added those over some period of time.

I followed your advice, broke the bridge, and guess what...... things look much better now.

Categories were created properly, albums too, albums belong to their categories, and all the pics belong to their owner....... that is much better indeed.

I will let you know how it goes, but for the moment, 1000 pics were added to the right albums in the right categories........ hopefully. I will have to check thoroughly.

Logged

DirtRider

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Mass Import plugin for cpg1.5.x
« Reply #26 on: March 29, 2012, 01:13:54 PM »

Ok I installed it but I just cannot get it to work at all. I create a folder under my albums folder called ftp. Now when I try and do the import it in the option to enter what folder it is or leave blank I put in ftp and I also tried leaving it blank. I then get this error

Critical error
There was an error while processing a database query
 
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15277
Re: Mass Import plugin for cpg1.5.x
« Reply #27 on: March 29, 2012, 02:11:56 PM »

Enable debug mode to get an extended error message.
Logged

DirtRider

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Mass Import plugin for cpg1.5.x
« Reply #28 on: March 30, 2012, 07:22:58 AM »

Here we go

Code: [Select]
Critical error

There was an error while processing a database query.

While executing query 'INSERT INTO cpg15x_categories (pos, parent, name) VALUES ('10000', '0', '')' in plugins\mass_import\import.php on line 360 mySQL error: Field 'description' doesn't have a default value


File: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\dasphoto\include\functions.inc.php - Line: 270



Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15277
Re: Mass Import plugin for cpg1.5.x
« Reply #29 on: March 30, 2012, 12:11:02 PM »

Quote
Field 'description' doesn't have a default value
Either you adjust your database and give that field a default description or you modify the plugin code to submit the description.
Logged

miblo69

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Mass Import plugin for cpg1.5.x
« Reply #30 on: April 10, 2012, 10:49:57 PM »

Hi,

There seems to be a problem with mass import when the directory names contain non-ASCII characters. In my case several directories contain swedish characters: ĺäöĹÄÖ. The import 'succeeds', but no images imported to the Albums that have Swedish characters in their names. Albums (directories) without characters are displayed correctly and contain the images as should.

I tried to locate the function in import.php, but I am no php coder.... If any one has tips on how to solve this, it would be greatly appreciated!

And, no, removing all Swedish characters in the directory names is not an option... I have some 80k pictures in 3000 directories I want to import.

Many Thanks!
~Mike
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15277
Re: Mass Import plugin for cpg1.5.x
« Reply #31 on: April 12, 2012, 10:14:32 AM »

removing all Swedish characters in the directory names is not an option... I have some 80k pictures in 3000 directories I want to import.
Would it be an option if the script renames your files and folders automatically before it adds them to the gallery?
Logged

miblo69

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Mass Import plugin for cpg1.5.x
« Reply #32 on: April 20, 2012, 10:13:24 AM »

No, that wouldn't be an option. The whole Coppoermine Gallery suports UTF-8, so I would assume the Mass-Import would also support it.

I did some elementary troubleshooting, and I can see all the albums (including thoe with nonASCII characters) in the cpg_albums table. But the Pictures that reside in a non_ASCII directory, are not available in the cpg_pictures table. So part of the import seems to work. I.e Albums are ok, but not pictures. I would think there is a missing 'character conversion procedure' in the Picture import, but it is present in the Album import.

But my php knowledge limits me from troubleshooting this further...

Thanks,
~Mike
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15277
Re: Mass Import plugin for cpg1.5.x
« Reply #33 on: April 20, 2012, 02:13:23 PM »

Please try the following. Open import.php, find
Code: [Select]
$sql = "SELECT aid " . "FROM {$CONFIG['TABLE_ALBUMS']} " . "WHERE title='" . addslashes($title) . "' AND category=" . (INT)$category . " LIMIT 1";and replace with
Code: [Select]
$sql = "SELECT aid " . "FROM {$CONFIG['TABLE_ALBUMS']} " . "WHERE title='" . addslashes(utf8_encode($title)) . "' AND category=" . (INT)$category . " LIMIT 1";
find
Code: [Select]
$sql = "SELECT pid " . "FROM {$CONFIG['TABLE_PICTURES']} " . "WHERE filepath='" . addslashes($dir_name) . "' AND filename='" . addslashes($sane_name) . "' " . "LIMIT 1";and replace with
Code: [Select]
$sql = "SELECT pid " . "FROM {$CONFIG['TABLE_PICTURES']} " . "WHERE filepath='" . addslashes(utf8_encode($dir_name)) . "' AND filename='" . addslashes($sane_name) . "' " . "LIMIT 1";

This fixes the functionality in my testbed. However, it doesn't fix the output, but that's currently not important IMHO.
Logged

miblo69

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Mass Import plugin for cpg1.5.x
« Reply #34 on: April 26, 2012, 11:31:17 PM »

HI,

No, it stil doesnt fix the problem. I removed the database completely, and did a fresh install. Copied my albums to import, to the /albums/ directory. Started Mass_import, applied your suggested changes, and it scrolled through all files. But unfortunately nothing was imported. It creates categories for each album, but they don't contain any pictures.

So the change has effectively stopped import of *all* albums. Previously it was only albums with non-ASCII characters in the directory name. Let me know what debug info you need and I'll provide it.

Thanks,
~Mike
Logged

sindbad5

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Posts: 203
    • My Images - medienarchiv.com
Re: Mass Import plugin for cpg1.5.x
« Reply #35 on: August 06, 2014, 07:57:17 PM »

I've installed the plugin. It creates categories and albums but will upload only up to 20 pictures per go. This is not helpfull  if there are some thousand images.

Tom

   
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15277
Re: Mass Import plugin for cpg1.5.x
« Reply #36 on: August 07, 2014, 12:48:15 PM »

Unattended run works for me as expected. Please wait some time when you see the window you attached as screenshot. I'm sure it will refresh and the number of remaining files will decrease.
Logged

ge-flopt

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 44
Re: Mass Import plugin for cpg1.5.x
« Reply #37 on: July 09, 2015, 12:22:46 AM »

Hopefully you can help me. Have migrated mine coppermine site to a new disk. Have all the files, but forgot to transfer the database. I can't retrieve it, because the disk is already formated. Well hopefully mass import can help me. I have only one problem. The import tool gives me the following error:
Fatal error: Maximum execution time of 30 seconds exceeded in /......./plugins/mass_import/import.php on line 55

I can change the tomeout to a higher number, but i don't know if that's the correct way to go.

Any ideas?

Specs:
Server: Raspberry pi (it does the job!)
Images: 128.148 (Full files, Normal files and thumb files included)

THX!
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4357
    • Windsurf.me
Re: Mass Import plugin for cpg1.5.x
« Reply #38 on: July 09, 2015, 11:16:45 AM »

Yes, that is the correct way to go. Try 60 seconds and gradually increase it until the script works.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15277
Re: Mass Import plugin for cpg1.5.x
« Reply #39 on: July 09, 2015, 11:28:41 AM »

If I remember correctly the mass import plugin always imports a whole directory. So increasing the execution time might work for some directories, but maybe not for larger directories. I don't know if the plugin regards already existing intermediate-sized pictures and thumbnails. If so, the script just needs to add some meta data to the MySQL database. If you're hosting the database (and files) on the SD card, it's maybe a good idea to transfer them to a HDD to increase performance.

You maybe also want to run the import process on your desktop PC, which has usually much more power, and then export/import the database dump when completed. So you avoid any PHP timeout issues.


OT: I always wanted to install Coppermine on one of my Pis (early model B with 256 and 512 MB RAM) and check how it performs, but never done that. Do you use a Raspberry Pi 1 or 2? How's the performance / Coppermine page load times?
Logged
Pages: 1 [2] 3   Go Up
 

Page created in 0.085 seconds with 21 queries.