Symptoms similar to http://drupal.org/node/408248 although latest beta and I do not use image field.
Symptoms:
I select images from the display and press "import". The import progress screen flashes briefly, only to be replaced by a page starting with
Ein Fehler ist aufgetreten. /?id=&op=do
followed by the HTML code of my start page.
What I tried so far:
- there are no Drupal log entries
- the status display looks fine
- galleries are enabled
- I changed the import directory a few times, always making sure full access was given to directory and image files. At one point it allowed me to upload a few images correctly, only to revert to the behaviour above a bit later from the same (new) directory.
- I tried the latest image import dev version
- I tried Garland theme instead of Foliage
Looking into the issue (beware I'm NOT a PHP or Drupal expert):
via inserting watchdog calls into image_import.pages.inc I attempted to figure out the point of failure
according to this, the statement
batch_set($batch);
still executes.
However, function function _image_import_batch_op($args, &$context) never appears to be called.
Comments
Comment #1
joachim commentedWhat's the original English version of 'Ein Fehler ist aufgetreten'?
I've seen other issues to do with the batch not running properly -- if this is one of those, there's not much we can do I think.
Comment #2
dhope commentedHi, it's t('An error occurred.'). Of course a more explicit error message would help.
My batch function as such works (when used for e.g. implementation of new modules etc.), just not for Image Import.
Comment #3
dhope commentedComment #4
joachim commented> Of course a more explicit error message would help.
Heh. Yeah. This is from Drupal core's batch system though. It's possible that the batch operation ran out of memory, but aside from that I'm not sure what to suggest.
Comment #5
dhope commentedThanks Joachim.
Dunno, it happens even when trying to import a single image with 17k.
I'd be happy to insert a few more watchdogs, but as you suggest the problem comes to a head somewhere in the bowels of the system and I just have no clue where to start...
Taxonomy term import also uses batch processing and that works fine though.
Comment #6
shelleyp commentedI also get this behavior, except without the error message. Just the plain blank page.
Happens when I try to upload any image. Size isn't the issue, all permissions should be fine. The blank page is showing too quickly, which makes me think nothing is happening. I don't see any errors in the system log. It just doesn't work.
Comment #7
jsgammato commentedI see a similar thing.
I get three error messages:
Warning: MySQL server has gone away query: INSERT...MySQL server has gone away\nquery: UPDATE batch SET token = ...
Warning: MySQL server has gone away query: INSERT...MySQL server has gone away\nquery: UPDATE sessions SET uid = 1, ...
Warning: MySQL server has gone away query: INSERT ..."Cannot modify header information - headers already sent by (output started at...
All error messages end with:
E:\xampp\htdocs\drupal\includes\database.mysql.inc on line 128
sometimes I get a huge flood of messages - many more than the number of files being imported. They include "SELECT SUM" and "UPDATE search" but still end with "line 128"
I am uploading 123 PNGs. They are listed on three pages. I selected all of page 1, and it failed with those messages. I repeated for all of p2 and the same thing happened. I selected all of p3, and it worked - those images now work fine in my gallery. But all images on p1 and p2 continue to fail, even when I try a single 10kb image.
I tried it again, with GIFs this time, and the same bizarre behavior happened - p3 batch-imported fine, but on p1 and p2 nothing comes in, not even single images!
Comment #8
asb commentedSame issue here, as well with the current dev release as with beta6. The Bulk import screen briefly shows up and then immediately switches to the "result" page without outputting any error. Watchdog logs multiple times:
The message says: "There was an error which prevented the import of {filename}". I was trying to bulk import 66 Jpeg images with a total size of 116 MB. As far as I have seen, watchdog logs one of these error messages per image and per import attempt. The final message is:
(= "image import has been finished"). It does not say that the import was successfull, but does not notify that there were problems, either.
Upgraded from the latest dev release to 6.x-1.0-beta6 with the same result. Permissions of the import folder:
Permissions of the image files to import are also
-rw-rw-rw-. Also tried to change their owner towww-data:www-datawhich didn't help.The files in the import folder are readable and writable for the webserver ("www-data"). Status report points to no problems regarding the setup of the "image" module.
The site runs with
ini_set('memory_limit', '175M');insettings.phpin standard operation. I raised the PHP memory limit temporarily to 500M which also didn't help; so this is most probably no memory error.The last time I used the bulk import sub module was about three weeks ago with one of the current dev releases, so most probable this issue was introduced in this timeframe.
Changing priority to "major" since image import appears to be completely broken at the moment. (Also there's a minor (mostly cosmetic) glitch regarding the outputted number of processed images (51 instead of 50), but that one isn't new). I'll try to reproduce this behaviour on another site and check back here with the result.
Comment #9
joachim commentedI'm completely incapable of reproducing this, but then that's because I'm getting a max packet error...
Can you debug this on your end?
Comment #10
joachim commentedOkay now I'm getting this:
No idea why.
Ultimately, this is not going to hold up a 1.0 release because image import is a nice bonus rather than core operation of image module. Also, BatchAPI is a pig to debug :( and I don't have enough free time.
What you can do to help this is stick some debug statements into the import process to see what's going on.
Comment #11
asb commentedIt seems that there are lots of probably related, but different and tricky errors occuring which we should try to sort out somehow. In the initial report, dhope had an error message; this was at a time when the dev release was working perfectly for me. Joachim got a different error message today, most probably with the most up to date code (#10). I'm getting no error message with the latest released version, but it's importing nothing, either. Nasty.
I can try to insert debug statements into the code, if someone is able to provide instructions what to put where (currently it's me who is like a pig looking into the clockwork when I'm trying to understand the code;) The relevant logic seems to be embedded in
image_import.pages.inc, and there's a "Submit handler for the image import form" and a "Batch operation callback for image import"... but then?If Joachim is short on spare time, maybe someone else can help out with some debugging instructions or a pointer what we'd have to do to help?
@Joachim: Regarding a 1.0 release, it was not my intention to somehow further delay this, it's imho long overdue, and an image contrib by no means must stop the release of an important module like 'Image'!
Comment #12
asb commentedI'm taking my report (#11) back; when retrying the image import a couple of hours later with one file, the import suddently started to work as usual. Next I could successfully process the 66 images batch, and currently I'm importing another 1,200 images - so far without any problems.
I'm not sure what confused Image Import, and the only thing I can think of currently is a failed and canceled Pathauto URL alias bulk update which might have been running silently in the background (which I'll also retry later).
Since neither Joachim nor myself can reproduce this behaviour at the moment, I'll change the priority back to "normal". Could the others who reported this issue earlier please give a quick update if this issue still occurs on their sites?
Comment #13
dhope commentedI have stopped using Image partly because of this issue - in favour of uploading and linking images directly.
Comment #14
asb commented@dhope: That's sad to hear.
As I wrote in #12, I seem to have been hit by a freak incident which went away quickly; in the last few weeks I haven't encountered this issue again. Since I'm not experiencing this issue anymore, and you have stopped using the 'Image' module, there seems to be nobody who could provide help to the module maitainers, thus I'd suggest to close this issue (unless someone else is experiencing this and is willing to help).
Greetings, -asb
Comment #15
Murli commentedHey,
I've got a similar Problem. Image-Import already had worked fine, but suddenly it decided to deny Permission. I don't know, what it is, but I described my issue in http://drupal.org/node/914508.
coul'd please anyone help me? I know, it is not exactly the same problem...
Comment #16
Murli commentedI set it active again, because joachim wanted me to post my issue here, although he had it closed before.
Comment #17
fedbccer commentedAlso for me the image_import module doesn't work
I've tried different to import some image using different browsers from different location.
Here a summary of my "experiments"
Drupal 6.19 on Windows Server 2008 (IIS7), Image Import 6.x-1.0, Using user uid 1
Scenario: Using the Import Module from my PC with Goggle Chrome
The import always failed with a blank page reporting "You do not have permission to view this directory or page."
Scenario: Using the Import Module from my PC with Microsoft Internet Explorer 8
The import always failed with the standard IE error page HTTP 403 - Access denied
Scenario: Using the Import Module from a Remote Desktop connection to the server and MS IE 8 (RDP connection as Local Administrator)
Only once it worked importing 3 images. from that time it always failed.
Different form what happens from the PC, here the error message (translated from italian):
Access denied
You are not authorized to access this page
is shown in a normal page of the web site, in the content region
I checked all the folders permission and they seem ok. Uploading a single image using Create "Content -> Image" works fine
Comment #18
asb commented@fedbccer: From which directory is image_import trying to import the images, which permissions does this directory have, and what permissions do the images have? Please show us your effective files and folder permissions, "they seem ok" is not quite enough since IIS might override them in the server config.
Comment #19
F0X commentedsame problem... i described my issue here: http://drupal.org/node/989554
Comment #20
F0X commentedI just changed safe mode off and now it seems to work... o.0
While I created a gallery node manually I was pointed to a wrong uid by the logfile...
Comment #21
jsgammato commentedMy situation (#7) hasn't changed. I still get the MySQL has gone away error.
I always get three errors:
UPDATE batch SET token = '78877763c32c15d54f93c79dabbe2d3b', batch = 'a:10:{s:4:\\"sets\\";a:1:{i:0;a:11:{s:7:\\"sandbox\\";a:0:{}s:7:\\"results\\";a:0:{}s:7:\\"success\\";b:0;s:5:\\"title\\";s:15:\\"Importing image\\";s:16:\\"progress_message\\";s:29:\\"Importing @current of @total.\\";s:10:\\"operations\\";a:49:{i:0;a:2:{i:0;s:22:\\"_image_import_batch_op\\";i:1;a:1:{i:0;a:7:{s:9:\\"node_type\\";s:5:\\"image\ in E:\xampp\htdocs\drupal\includes\database.mysql.inc on line 128
UPDATE sessions SET uid = 1, cache = 0, hostname = '10.10.1.192', session = 'dblog_overview_filter|a:2:{s:4:\\"type\\";a:1:{s:4:\\"user\\";s:4:\\"user\\";}s:8:\\"severity\\";a:0:{}}updates_remaining|a:0:{}messages|a:1:{s:5:\\"error\\";a:1:{i:0;s:2043329:\\"user warning: MySQL server has gone away\\nquery: UPDATE batch SET token = '78877763c32c15d54f93c79dabbe2d3b', batch = 'a:10:{s:4:\\\\"sets\\\\";a:1:{i:0;a:11:{s:7:\\\\"sandbox\\\\&am in E:\xampp\htdocs\drupal\includes\database.mysql.inc on line 128
"Cannot modify header information - headers already sent by (output started at E:\\xampp\\htdocs\\drupal\\includes\\database.mysql.inc:128)\";s:5:\"%file\";s:42:\"E:\\xampp\\htdocs\\drupal\\includes\\common.inc\";s:5:\"%line\";i:328;}', 3, '', 'http://Drupal1.imprivata.com/drupal/admin/content/image_import', 'http://drupal1.imprivata.com/drupal/admin/content/image_import', '10.10.1.192', 1292186217) in E:\xampp\htdocs\drupal\includes\database.mysql.inc on line 128
Comment #22
littleneo commentedimage import does not work at all for me, whatever the selected number of image, their size or the import options are.
I always get the 'An error occurred.' message, followed by the html source of the front page in the same red warning frame.
it's a fresh, non modded at all, instal :
image 6x-1.0 all enabled, alos tried with the last beta yesterday
drupal 6.2 (with the l10 module integrated, internationalization)
garland default theme
I added some cck field to the image content type. (among them, some are conditioned/conditioning)
some fields are mandatory
source folder ok (http readable, image import page ok) at the root of the site (/tmp/image)
all concerned folders and files rights : 775
sometimes funny characters in the file names (french), but tried with non-accentued filenames only, same problem
I can create an account to see how it fails if you want to.
thanks for any help,
Jerome
Comment #24
joachim commentedThis should probably stay open, if only to keep accumulating reports of it not working :/
Comment #25
asb commentedClosely related: #967080: image_import does not bulk import images
Comment #26
asb commentedComment #27
iex commentedGetting the same error: when importing, 'An error occured' + the page source. Module was working ok long time, now it suddenly stops. I looked at the watchdog, seems errors started to occur fafter the last cron ran (they are sheduled to run every 3 hours). No ideas what to do?
I think, it's somehow related to CCK...
Comment #28
iex commentedI think i found the problem. Maybe it's a coincidence, but check if the file list, which is displayed when you go to admin/content/image_import, does not contain files with illegal symbols.
Comment #29
charly57 commentedI got the same problem today and your solution is the good one. I had a special symbol (french) in a filename and it was the reason why I got always this error whhen I launched the import of images:
Une erreur s'est produite. /?id=&op=do (html code of my home page)
You are the best.
Best regards
Patrice PFEUTY