Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#16 2005-10-12 10:18:00
- aba
- Plugin Author
- Registered: 2004-04-14
- Posts: 119
Re: aba_import_images (formerly nhn_import_images)
>> bq. ok, did anybody find any strange things using (or trying to use) this plugin? And yes, I even mean warnings and error messages most just seem to have ignored.
> I think you can take silence as yes – people complain loudly when it doesn’t work ;-)
I did… ;)
> I haven’t used the plugin extensively yet, but I found one minor issue. You link above to aba_import_images 0.4.1, but the plugin links to 0.4.0 (in the admin > plugin page)
There is still no page (rl issues) for the plugin, I need to change that…
> Other than that, I’d prefer if the thumbs naming format allowed -thumbs before the extension, as then the thumbnail will be beside it’s image when I’m preparing for upload. eg from- image.jpg
- thumb-image.jpg
- image.jpg
- image-thumb.jpg
> It’s not a big problem until you want to generate thumbnails by hand for 30 images and aren’t sure if you got them all.
I agree. I’ll look into it and chage it accordingly so both will be supported
> Also supporting zip archives would be great, but I imagine a little complex.
It is – unfortunately there is neither a standard php way to access zip nor a standard way to find a unzip on a system. I’ll have to think about it. This is low priority because I don’t see the need for it (using ftp there is no gain in uploading a zip file – the image formats are not very compressable). This would be a plus someone uploads images using the web interface but not ftp.
Offline
Re: aba_import_images (formerly nhn_import_images)
I found that when uploading an image, a thumbnail is created even if I de-select the “create thumbnail” option. I am not sure if I have to change a variable in the plugin for this. Have not really looked – but thought it worth mentioning.
Note I was uploading a single image – so actually I am not sure if TXP used its own system or the plugin.
Offline
#18 2005-10-12 21:25:48
- aba
- Plugin Author
- Registered: 2004-04-14
- Posts: 119
Re: aba_import_images (formerly nhn_import_images)
> jstubbs wrote:
> I found that when uploading an image, a thumbnail is created even if I de-select the “create thumbnail” option. I am not sure if I have to change a variable in the plugin for this. Have not really looked – but thought it worth mentioning.
default is that it does not create a thumbnail unless you change the variable in the plugin code.
> Note I was uploading a single image – so actually I am not sure if TXP used its own system or the plugin.
Uploading within textpattern doesn’t trigger this plugin, it will only do its magic in case you have uploaded some images in the import path using ftp, scp or whatever.
Offline
Re: aba_import_images (formerly nhn_import_images)
Hi aba,
You know, I think it was glx_admin_image that did it. I had that plugin enabled and I see now that it creates thumbnails automatically on upload. I think I need to re-visit which plugin does what and decide which to use on a regular basis!
Offline
#20 2005-10-21 01:19:42
- SuperStar
- New Member
- From: New Zealand
- Registered: 2005-09-23
- Posts: 7
Re: aba_import_images (formerly nhn_import_images)
Hi Aba,
I am running my dev enviroment in apache on windows… however I will report this anyway (your doing a good job btw!)
I copied 4 images into the import directory and got these warnings on the images tab:
Notice: Undefined variable: newy in C:\website\site\textpattern\lib\txplib_misc.php(455) : eval()’d code on line 361
There was a problem reading image info. Check the image file or the permissions
Notice: Undefined variable: newy in C:\website\site\textpattern\lib\txplib_misc.php(455) : eval()’d code on line 361
There was a problem reading image info. Check the image file or the permissions
Notice: Undefined variable: newy in C:\website\site\textpattern\lib\txplib_misc.php(455) : eval()’d code on line 361
There was a problem reading image info. Check the image file or the permissionsThere was a problem reading image info. Check the image file or the permissionsaba_import_images imported 4 images
However it imported the images ok. In another instance it doubled the images up (imported twice) – not sure why.
Can you help here?
Thanks
Nick.
Offline
#21 2005-10-21 11:31:55
- aba
- Plugin Author
- Registered: 2004-04-14
- Posts: 119
Re: aba_import_images (formerly nhn_import_images)
> I copied 4 images into the import directory and got these warnings on the images tab:
> Notice: Undefined variable: newy in C:\website\site\textpattern\lib\txplib_misc.php(455) : eval()’d code on line 361
> There was a problem reading image info. Check the image file or the permissions
> However it imported the images ok. In another instance it doubled the images up (imported twice) – not sure why.
> Can you help here?
congratulations, you’re the first actually using resize and thus triggered a bug that I missed, apparently I never used an image that is wider than high (strange – must have been sleepy that day).
Sigh, for a programmer it’s a very bad habit to write the declaration of newx followed by the declaration of newy if the calculation of newx relies on newy.
Please redownload and tell me if it works now.
For the double import: This is a known bug (at least I know it happens), but I still don’t have any clue what triggers. Turn on debugging if you experience it again and send me the output, I’m eager to find the reason for this behaviour, but I’m unable to reproduce it on my systems.
boblet: at least the problem with the linked version is fixed, for the other part I have to do a bit of rethinking the structure or it would result in an ugly messed up code (ok, it’s messed up already but I don’t want to force that).
Offline
#22 2005-10-27 21:48:36
- dkruitbosch
- New Member
- Registered: 2004-12-17
- Posts: 9
Re: aba_import_images (formerly nhn_import_images)
Hi,
I just downloaded and installed version 0.4.2 and the problem still occurs for. So I guess the problem still exists….
Notice: Undefined variable: newy in /var/www/site2/textpattern/lib/txplib_misc.php(429) : eval()’d code on line 362
There was a problem reading image info. Check the image file or the permissions
Notice: Undefined variable: newy in /var/www/site2/textpattern/lib/txplib_misc.php(429) : eval()’d code on line 362
There was a problem reading image info. Check the image file or the permissionsaba_import_images imported 2 images
I’ve set set imgx and imgy to the same value (300) and this gets me the result i want: the largest dimension of an image is always 300.
If I set imgy=0 or imgx=0 then I get this error: There was a problem reading image info. Check the image file or the permissionsThere was a problem reading image info. Check the image file or the permissionsaba_import_images imported 2 images
Any ideas on how to fix this yet…
Danny
Last edited by dkruitbosch (2005-10-27 22:08:45)
Offline
#23 2005-10-27 22:54:54
- aba
- Plugin Author
- Registered: 2004-04-14
- Posts: 119
Re: aba_import_images (formerly nhn_import_images)
> I just downloaded and installed version 0.4.2 and the problem still occurs for. So I guess the problem still exists….
note to self: if you find an error, fix it on both occurences of the code.
Please redownload and try again – this time it should really really be corrected…
thanks for the patience.
Offline
#24 2005-10-30 08:52:57
- SuperStar
- New Member
- From: New Zealand
- Registered: 2005-09-23
- Posts: 7
Re: aba_import_images (formerly nhn_import_images)
Ok, it seemed to work better now.
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:
There was a problem reading image info. Check the image file or the permissionsThere was a problem reading image info. Check the image file or the permissionsThere was a problem reading image info. Check the image file or the permissionsThere was a problem reading image info. Check the image file or the permissionsaba_import_images imported 4 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.
Keep up the good work!
Nick.
Last edited by SuperStar (2005-10-30 08:54:29)
Offline
#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
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
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