Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2005-12-11 17:22:04

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: aba_import_images (formerly nhn_import_images)

I always get an error message after import that the folder is not readable….and that the images were imported. They always are, and the folder is 777. Don’t know why the message comes but it does not really affect the usage too much.

Offline

#38 2005-12-12 17:27:50

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

Re: aba_import_images (formerly nhn_import_images)

Anton: Yes I have chmodded it 777, problem isn’t there. Anyway, I’ll try that ending session today and will report back later.


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

Offline

#39 2005-12-13 18:54:03

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 tried the plugin today. I got doubles again. I did that close sessions while uploading and new session after upload. I don’t know if the problem is there but I clicked images tab again while there was no sign of lige. Maybe it started working with images again when I did this.

Weird, some of the images were four times, some three or two times.

Poor me, 85 images I uploaded. A lot work to delete those doubles.

Last edited by t0ma (2005-12-13 18:57:07)


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

Offline

#40 2005-12-19 12:01:45

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

Re: aba_import_images (formerly nhn_import_images)

I have an issue. The plugin doesn’t work with utf8 characters in the filename. For example a file Jérémie.jpg will work when added with Textpattern, but not with the plugin (I got a Apache 500 error).

Last edited by Jeremie (2005-12-19 12:11:45)

Offline

#41 2005-12-19 15:54:01

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

Re: aba_import_images (formerly nhn_import_images)

do you have access to the errorlog?

Offline

#42 2005-12-19 16:24:19

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

Re: aba_import_images (formerly nhn_import_images)

Of course when I try to reproduce it after activating the apache logs, it doesn’t work. Grmbl.

Ok now I’ve got this error : “There was a problem reading the file info, please check permission” (the file was 777, even if I don’t need it because PHP is under fast-cgi/suexec). The image is imported (and resized, thumbnailed,etc.) but the name of the image is cropped to the first ascii characters until the first non ascii one (here the “é”).

Nothing shows on the error log, but I can’t be sure of it, I’ve tested it on Textdrive and their console (to activate the log and its level) is.. well… strange :)

I’m not sure if I’m clear. Need some sleep ^^

Offline

#43 2005-12-19 18:18:34

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

Re: aba_import_images (formerly nhn_import_images)

strange, I use umlauts (being a native german) all the time without a problem.

For the error report: I put it in because of some reports that told me people tend not have the correct permissions for files but it seems to be wrong sometimes so I will get rid of all additional error checking. I’m still trying to reproduce the aforementioned “double import” error before releasing a stripped down version without debug code.

I’ll try to find out why the name is truncated and let you know asap – in the meantime: just ignore the error… ;)

Offline

#44 2005-12-21 13:00:16

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

Re: aba_import_images (formerly nhn_import_images)

The displayed error is fine, nobody sees it but me. But the truncation of the name is more a thing right now :(

Offline

#45 2005-12-21 15:01:59

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

Re: aba_import_images (formerly nhn_import_images)

locate the line (approx in the middle of the file

$name2db = doSlash($imagename);

replace with

$name2db = utf8_encode(doSlash($imagename));

and tell me if this works.

Unfortunately I’m not a php guru nor an utf8 expert so this is a wild shot in the dark.

Offline

#46 2005-12-21 23:23:53

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

Re: aba_import_images (formerly nhn_import_images)

Nope, same thing (Jérémie truncated into J). But if you can use umlaut, it’s very strange indeed. Maybe it’s OS related (my file was created and ftp with Win32, the server is FreeBSD 5.4 with the appropriate locales I believeà.

But I done some more testing, and my previous HTTP500 errors were not caused by your code (it seems the PHP module and/or Textdrive doesn’t like at all resizing 20 or 30 images when they are in medium resolution —200 or 300dpi. To say nothing of a hundred :p).

Last edited by Jeremie (2005-12-21 23:25:33)

Offline

#47 2005-12-22 00:15:59

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

Re: aba_import_images (formerly nhn_import_images)

Ok, either I’m under heavy scrutiny by Murphy, or I need a new brain.

But whatever. I’ve done some more testing, the utf8_encode on the $name2bd works for me. I will try some more complex glyphs, but it seems to do the trick.

I have used it on the $alt = $imagename line too (without it the alt is also truncated).

Last edited by Jeremie (2005-12-22 00:17:55)

Offline

#48 2005-12-22 01:30:23

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

Re: aba_import_images (formerly nhn_import_images)

For the resizing timeout: This is covered in the docs… ;)
Unfortunately I haven’t found a good was to get rid of it – I wanted to rewrite the plugin to use some sophisticated javascript (like ajax) to open a new session for every bunch of images but I got distracted by learning ruby and even with this the server load might be a bit hefty. I implemented it because someone asked for it but it’s not for everyone, I’m afraid.

For the truncating: I settled for changing the
$imagename = substr($filename, 0, strrpos($filename, ‘.’));

line to

$imagename = utf8_encode(substr($filename, 0, strrpos($filename, ‘.’)));

That should cover it all. Thanks for verifying it for me. An updated plugin is available. I already got rid of the excessive debugging code and I will get rid of the excessive checking as well because it seems that it does no good giving false error messages and not helping to find other errors.

Last edited by aba (2005-12-22 01:42:00)

Offline

Board footer

Powered by FluxBB