Hi, first off, let me assure you this isn't exclusive to Activity.module, as the Heartbeat.module has the same issue leading to me suspecting Rules or Actions to be the cause.

When I add an activity record for a node with CCK Images such as a photo node, once the node is saved (from new) the image is not displayed. The image is uploaded perfectly fine to its correct directory and filename, but the IMG SRC is pointing to another location, I think it may be the image's original directory on upload, aswel as its original filename.

Comments

Scott Reynolds’s picture

Status: Active » Postponed (maintainer needs more info)

? I take it you are using imagecache ? Is it a Views field that is displaying the image? Are you using a token ? Give an example of the src attribute and what it should be.

leading to me suspecting Rules or Actions to be the cause.

Doubtful...

edit: The reason I ask about imagecache is because it requires clean urls to create the new images. It is a common technique to generate new sized images on demand.

darklight’s picture

Yes I'm using ImageCache module, and I'm using tokens to generate a directory. E.g. /sites/default/files/albums/[uid]/filename.png
The filename is also tokenized.

Is that what you meant?

Thanks for your reply :)

Scott Reynolds’s picture

How are you displaying the image? Views or is it with the Activity Message itself?

Do you have clean urls turned on?

darklight’s picture

Clean URLs are on. I am using a tpl file to display the Node's CCK Image. Here's the code:

print $node->field_image_picture[0]['view'];

Any ideas?

Scott Reynolds’s picture

So your using Views to display the image?

And what makes you think this is a bug in Activity?

darklight’s picture

No, I am using the standard Node TPL file for node of type Photo. Not Views. And I only get this issue when I use Activity to display messages on Node Save.

Scott Reynolds’s picture

And what makes you think this is a bug in Activity?

I use Activity to display messages on Node Save.

Explain.

darklight’s picture

Basically, everything works great until I create an Activity template and use it when creating a Photo node. Then the photo doesn't work.

Scott Reynolds’s picture

Please explain how you think this is an Activity bug.

Please explain how you are "display messages on Node Save"

darklight’s picture

I have already explained why I think it is an Activity.module issue, and I think it obvious by now that the issue is when I have a template for when a user creates a new node with images. If Activity.module is used, the image is not displayed. What don't you understand?

Scott Reynolds’s picture

I have already explained why I think it is an Activity.module issue, and I think it obvious by now that the issue is when I have a template for when a user creates a new node with images.

Point me too it then. Thats fine. But I REALLY REALLY don't know understand the issue. So if you want me to fix it you have to deal with me :-D.

This is what I think you are reporting

When you create a Photo node, you believe that Activity module is missing up the image. Which of course makes no sense, as Activity module doesn't do anything on node save, nor on the node form. Only 'node' thing it does is on node_delete and it cleans up the records.

Trigger Module provides the event action.

So really please, save us some time and type more then a few words of whats going on.

darklight’s picture

Ahhh yes, I think it might be Trigger as Heartbeat module does this too. I'm gonna postphone this issue until I know more about whats going on. Thanks for your replies :)

Scott Reynolds’s picture

If you turn off Activity module, does the image save right? And yes, if you tested this previously PLEASE retest it. Cause it wouldn't make sense, so I want to make 100% it is happening with Activity turned on.

I would bet that a form submit callback is doing a drupal_goto('some/url') instead of $form['redirect'] = 'some/url'

darklight’s picture

Hey, I've uninstalled Activity temporarily until an official release is available. And yes, that was the case, turning it off made it work, but this also happens with anything similar, such as Heartbeat, Rules, Activity, Trigger etc. Anything triggered when the photo node is saved messes it up. Honestly though, I'm almost certain this isn't an activity.module fault, your module is very stable and i fully intend to use it when it's released :)

sirkitree’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

I haven't been able to replicate this at all, closing for now. If I can get some help in understanding the bug, or there is a patch to review, please reopen.