For some reason, I get the Division by zero error and no image uploaded when my database type is set to mysqli. Changing it to mysql seems to work ok.

Database version
5.0.26
Drupal version
5.3
PHP version
5.1.2

Thanks,
Nate

Comments

zoo33’s picture

Does the same think happen if you add images in the normal way, i.e. through Add content >> Image?

nschindler’s picture

Yes it does. i'm thinking i jumped the gun and it's a problem with the image module, not img_assist.
I haven't had much chance to look into it further.

zoo33’s picture

Project: Image Assist » Image
Component: Code » image.module

Moving to image.module.

drewish’s picture

Status: Active » Postponed (maintainer needs more info)

unless you can provide more information, like a line number where the error is occurring there's not much i can do.

nschindler’s picture

Title: Division by zero and mysqli » Images don't upload when creating a new image node, but do upload when editing an existing image node

No line number yet, but here are more details on what's happening:
When creating a new image node, the following error is displayed:
The selected file
could not be copied, because no file by that name exists. Please check that you supplied the correct filename.

However, the node is still created without an image. It doesn't appear that the temp image file is uploaded.
I can then edit the node, and attach a file.
So, images don't seem to upload properly when creating a node, but it does seem to work when editing a node that already exists.

This is why I thought it was mysqli related. I switched back to mysql after I had created a new image node with a failed attachment, then edited it and the attachment worked. So I was mislead into thinking it was the mysql/mysqli change and not simply an edit an existing vs creating a new node issue.

I've searched for the above error, and found quite a few posts, but none that seem to still apply. I'm using the latest (2007/10/29) dev release.

Thanks,
Nate

nschindler’s picture

It appears to be a conflict with the actions module, but it seems to have stopped working only recently; image nodes have been functioning within our workflow for a while.

The actions we apply from (creation) -> FirstWorkFlowState are as follows:
1) Send e-mail to the user
2) Unpublish node (the default is upublished, this is just to make double-sure)
3) Send e-mail to the moderator

Simply disabling the workflow for image nodes is our work-around, but this can't be a permanent solution for us. We need to apply automated steps to all new nodes of any type.

Thanks,
Nate

drewish’s picture

Project: Image » Actions
Component: image.module » Code

bumping it over to actions then. if it's an image specific issue please change it back.

jvandyk’s picture

Remove your "unpublish node" action and see if the error persists.

nschindler’s picture

Title: Images don't upload when creating a new image node, but do upload when editing an existing image node » Image nodes don't work with actions module unpublish node action

No, it does not persist if the Unpublish Node action is removed from the first workflow transition.
Unfortunately, this is something I'd rather not remove without and I would need to create a whole 'nother workflow for just image nodes.
Images and Stories share the same workflow. Unpublish Node is there to help prevent user error; It helps to keep admins from publishing nodes before they reach the proper workflow state.

By the way, thanks for the responses guys, and sorry for the initial confusion.

Is this really a problem with actions, though? Story nodes in the same workflow have no problem with Unpublish Node in the first transition. This should also be reproducible. I have two sites with this issue.

Thanks,
Nate

doc2@drupalfr.org’s picture

Pomliane’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

This version of Actions is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.