Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2005-10-30 10:22:37

aba
Plugin Author
Registered: 2004-04-14
Posts: 119

Re: aba_import_images (formerly nhn_import_images)

> Again on windows there should be no permission issues, however it reports these warnings but still imports the images ok. This may be disconcerting to my client:

Again: Please enable debugging and send me the output. Does it happen with all images?

> double bug: I have been unable to reproduce it, but when it did happen last time it was when I did it within a subfolder (i.e. a category) within the import folder.

I tried everything but still can’t reproduce it. Damned. I check again.

Offline

#26 2005-11-01 19:58:54

SuperStar
New Member
From: New Zealand
Registered: 2005-09-23
Posts: 7

Re: aba_import_images (formerly nhn_import_images)

Ok, with debugging on:

There was a problem reading image info. Check the image file or the permissionsCould not delete W-AUT-17.jpg – please delete it yourself to prevent reimporting.
There was a problem reading image info. Check the image file or the permissionsCould not delete W-AUT-35.jpg – please delete it yourself to prevent reimporting.
There was a problem reading image info. Check the image file or the permissionsCould not delete W-Lucas-10-09-05-001.jpg – please delete it yourself to prevent reimporting.
There was a problem reading image info. Check the image file or the permissionsCould not delete W-Ngati-Babe-04_edited.jpg – please delete it yourself to prevent reimporting.
aba_import_images imported 4 images

However, it did delete the images successfully. It happens with all images. Edit: I am just noticed that with debugging on that it acutally imported the images twice.

Cheers,
Nick.

Last edited by SuperStar (2005-11-01 20:10:35)

Offline

#27 2005-11-01 21:02:59

aba
Plugin Author
Registered: 2004-04-14
Posts: 119

Re: aba_import_images (formerly nhn_import_images)

>> Ok, with debugging on:

> There was a problem reading image info. Check the image file or the permissionsCould not delete W-AUT-17.jpg – please delete it yourself to prevent reimporting.
> aba_import_images imported 4 images

The strange thing is that debugging should print a lot more (and yes, I need to put a br at the end of the statements).
Even stranger: The message There was a problem reading image info. means that php couldn’t execute the getimagesize function that reads size and image format from the file. If this message occurs the image is not imported/changed in any way (either getimagesize works and the magic happens or it faults and the script prints out the message and goes on with the next file).
The Could not delete W-AUT-17.jpg comes from an unsuccessful unlink, either the unlink works (the image is deleted) or the message is printed.

Restarting importing will import the not deleted files again.

Unfortunately the script is straight forward and each file is (for my understanding) only handled once so I’m lost with double imports.

I’m quite lost why it barfes out the above mentioned messages but imports images.

> However, it did delete the images successfully.

Now for the difficult part: Why does the image get deleted if php tells me it didn’t? Sigh, I think I have a lot to read concerning php under windows in the next days. Please send me a phpinfo() output by email so I can doublecheck whether there are known issues with your version – including you windows version might help as well. Thanks in advance.

> It happens with all images. Edit: I am just noticed that with debugging on that it acutally imported the images twice.

unfortunately this is not the fault of debugging. If you check the code you may see that the only difference between debugging and no debugging is a great number of echo and print statements (and I would like to get rid of them once and for all if I can put a finger on the source of the mentioned double import problem I still haven’t been able to reproduce) – the code doesn’t do other things when debugging is switched on it merely prints a lot more stuff.

I’ll have a day off on friday – I will set up a windows server and test it there.

Offline

#28 2005-11-24 21:06:35

Anton
Plugin Author
From: Alingsås, Sweden
Registered: 2004-11-16
Posts: 138
Website

Re: aba_import_images (formerly nhn_import_images)

hi. i’ve imported all my images but i had to change the ids afterwards due to some hardlinking from articles. however, it seems now that the dimensions for each image is wrong, is there any way to reset this? like batching through all the images again and have fresh height/width data applied?

thanx in advance!

/Anton

Offline

#29 2005-11-24 21:34:24

aba
Plugin Author
Registered: 2004-04-14
Posts: 119

Re: aba_import_images (formerly nhn_import_images)

not with this plugin, sorry. It would’ve probably been easier to change the articles and not the image ids.

Make a backup of your image dir and your database and try to change the line

$id = mysql_insert_id();

to

$id = $filename;

Then move all images from the image dir to the import dir (except for the thumbnails – otherwise they would get imported as images as well).

it may work (I didn’t test it and I don’t intend to). The result will be (hopefully) that every image gets imported at the same place as before but because of all the importing the dimensions and all other data will be rewritten.

Good luck

Offline

#30 2005-11-24 21:49:22

Anton
Plugin Author
From: Alingsås, Sweden
Registered: 2004-11-16
Posts: 138
Website

Re: aba_import_images (formerly nhn_import_images)

ah, good idea! thanx, aba :)

edit: fyi, it worked, but the files got double suffixes (.jpg.jpg) and the id’s were still auto_incremented. all fixed now though.

Last edited by Anton (2005-11-24 23:54:41)

Offline

#31 2005-12-07 00:00:41

t0ma
Member
From: On the edge of arctic circle
Registered: 2005-04-28
Posts: 24
Website

Re: aba_import_images (formerly nhn_import_images)

I have the same problem with double import, Quite annoying. I am currently unable to give more info as I am sitting in small cafe in Arequipa, Peru and trying to update my travel blog.

Best regards, Topi


“The role of art is to make a world which can be inhabited.”

Offline

#32 2005-12-07 00:19:45

aba
Plugin Author
Registered: 2004-04-14
Posts: 119

Re: aba_import_images (formerly nhn_import_images)

unfortunately I can’t find any reason for it or even a solution (and it doesn’t happen here, using Firefox). I was told that it will do this when using the same session so logging out of textpattern after importing the images and logging in again might work. I’m in the process of reading some heavy stuff about pHP internals I don’t even pretend to fully understand to maybe find out what to do – according to the code it shouldn’t happen at all and the number of replies indicate that only some are affected.

Debugging a problem I can’t reproduce doesn’t make it easier at all – any help is appreciated.

apart from that: enjoy your trip – Machu Picchu is still on my todo list.

Offline

#33 2005-12-07 06:21:02

Anton
Plugin Author
From: Alingsås, Sweden
Registered: 2004-11-16
Posts: 138
Website

Re: aba_import_images (formerly nhn_import_images)

t0ma: sure about your chmod settings? i had no problem when having 777 on everything, IIRC.

Offline

#34 2005-12-07 08:39:56

lwray
Member
From: Allston, MA
Registered: 2004-12-02
Posts: 21
Website

Re: aba_import_images (formerly nhn_import_images)

On my first attempt using this plugin, I had the same problems as Superstar, with same error messages (no debugging on) and double images. I knew I should have started with something less than 100 images…

Anyway, I tried to duplicate it with debugging on (and that’s the only thing I changed), but now the plugin works flawlessly. Perhaps it’s something that only happens on the first go? Has anyone experienced double image uploads after the first attempt?

edited to add: This was also all done in the same session of Textpattern, i.e. I didn’t log in or out.

Last edited by lwray (2005-12-07 08:40:58)

Offline

#35 2005-12-07 11:43:48

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: aba_import_images (formerly nhn_import_images)

Nice plugin. The former was not very usable without the automatic thumbnail tool. I will give it a try.

Offline

#36 2005-12-11 17:05:11

mordread
New Member
From: Paris
Registered: 2004-08-30
Posts: 6
Website

Re: aba_import_images (formerly nhn_import_images)

> aba wrote:
> I was told that it will do this when using the same session so logging out of textpattern after importing the images and logging in again might work.

I also have the same problem of double import (and didn’t notice anything in the debug output).
In fact, your recommendation works well:

  • logging out,
  • copying image files into /import dir,
  • logging in again

Thanks for this Plugin!

Offline

Board footer

Powered by FluxBB