I've opened this thread to track a new issue that was raised under the bug report demanding a valid filename on upload of .swf. That original issue is fixed (I think!) so creating a new thread as this is a different issue.

However, now I get a different kind of error. The file is saved under files/flash, but when I try to view the node, I get this message four times:

Could not display the flash because "files/flash/temp/turretdefense2.swf" does not appear to exist.

It tries to find the swf file at the wrong folder.

CommentFileSizeAuthor
#11 flash1.gif12.69 KBGoofyX

Comments

Stuart Greenfield’s picture

Copy of entries from related thread
----------------------------------

files/flash/temp is the "holding" area that flash node uses during the node creation process. Your flash file goes there first and it allows the preview function to work. It sounds like the database didn't get updated properly as files are moved from flash/temp to just flash when you submit the node.

Q) If you look at the site via FTP is the swf file actually in the flash folder? If it is then the file was moved correctly, and the database is wrong. If the files isn't there then it means it never got moved. Either way, seems another bug has popped up!

Also, is this error occurring for every node you create, or just one/some?

Stuart Greenfield’s picture

Copy of entries from related thread
----------------------------------

The file is in files/flash. It seems that the database is not updated correctly.

I created a new node (without previewing it first) and after I see the new node, I get those messages. The file is moved into files/flash, but it seems that in database its location is in temp. I temporarily solve this problem, by symlinking it from temp to ../ (files/flash).

Stuart Greenfield’s picture

Copy of entries from related thread
----------------------------------

I've just committed a debug version of Flash node to HEAD. It provides messages during the insert process to track what is happening. If you could try that and paste the results that would be a big help.

From what you're saying the node is saving ok, but not viewing? And the same message four times? Really weird!

Also from what you've said the files are going to the right place (/files/flash) but the database is wrong (/files/flash/temp). The filepath should update as part of the move process, so I don't understand why the file moved but the path didn't get stored right!

For info, on the current version then when I create a new node I get:

Doing flashnode_insert...
Trying to move files/flash/temp/seans birthday.swf to flash/seans birthday.swf
Move was successful
Filename for database is flash/seans birthday.swf
_flashnode_insert succeeded
Your Flash has been created.

Thanks! And sorry flash node isn't working out easy for you!!

GoofyX’s picture

OK, I used the HEAD version, tried to insert a new flash node and got these messages:

Doing flashnode_insert...
Trying to move files/flash/temp/parkmycar.swf to flash/parkmycar.swf
Move was successful
Filename for database is flash/parkmycar_0.swf
_flashnode_insert succeeded
Created new alias test for node/25
Your Flash has been created.

I also get the four messages:

Could not display the flash because "files/flash/temp/parkmycar.swf" does not appear to exist.
Could not display the flash because "files/flash/temp/parkmycar.swf" does not appear to exist.
Could not display the flash because "files/flash/temp/parkmycar.swf" does not appear to exist.
Could not display the flash because "files/flash/temp/parkmycar.swf" does not appear to exist.

The really strange part is that the html code is:

<div class="swftools-wrapper swftools-swf "><div class="swftools"><object width="580" height="420" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie"   value="http://mypalmer/files/flash/parkmycar_0.swf" />

I see the flash. The only strange thing are the four error messages I get during the node creation.

I will test again to verify, with another flash file.

GoofyX’s picture

Confirmed with another .swf file. The node appears fine, the only strange part are the error messages.

Stuart Greenfield’s picture

So are you saying that once you've created a node it displays fine? The swf file is in the /files/flash folder, the entry in the database is right, and so once created there is no error to the end user?

The log messages would seem to indicate the file is being successfully moved, and the files table is being updated correctly.

Are you using some sort of node alias module - you have an additional message in Created new alias test for node/25. Can you post to say what aliasing module you're using - I'll try installing that on my dev server and see if it causes this behaviour for me.

If that's not it then it might be some other conflict between modules so I might need to ask for a list of what else you're using!

The fact you see the message four times seems to suggest some sort of looping is going on, but no idea what!!

Curious!

GoofyX’s picture

So are you saying that once you've created a node it displays fine? The swf file is in the /files/flash folder, the entry in the database is right, and so once created there is no error to the end user?

The log messages would seem to indicate the file is being successfully moved, and the files table is being updated correctly.

Yes, as I mentioned in my previous message, I see the flash node just fine.

Are you using some sort of node alias module - you have an additional message in Created new alias test for node/25. Can you post to say what aliasing module you're using - I'll try installing that on my dev server and see if it causes this behaviour for me.

If that's not it then it might be some other conflict between modules so I might need to ask for a list of what else you're using!

I'm using Pathauto, so the extra message that you see is generated from that module.

I'm also using a bunch of contributed modules, like: Ad, CCK, Advanced cache, Devel, ecommerce, Date API, XML Sitemap, phpFreechat, Site map, Tablemanager, taxonomy access control, token, weather, the SWF Tools (as a requirement for Flashnode), Views and Fivestar with the Voting API. It's a big list...

Tell me how I can help more.

Stuart Greenfield’s picture

Status: Postponed (maintainer needs more info) » Active

Great - leave it with me. It sounds like the bug isn't stopping you from using Flash node, but I'll now see if I can re-create the bug on my system...

I'm a bit snowed under with my "proper" job at the moment, so given this one isn't completely stopping Flash node from working I'll work on it as and when time allows. Don't want you to think I've forgotten the issue if you don't see a reply straight away!

Thanks for your help!

GoofyX’s picture

Priority: Critical » Normal

So, considering the fact that the node creation actually works, we must lower its priority.

If you need further info, please tell me.

Stuart Greenfield’s picture

The error message is generated by SWFTools, and it is part of the function swftools_get_media_url.

On my system this function is never called during node submission, but it seems that in your case it is.

First up, can we check what's in your admin for the following:

Under Administer > SWFTools > Embedding settings > File locations what do you have showing for Media directory url, and is Check files checked or not?

The under Administer > SWF Tools > Flash node what do you have for Default base parameter?

For me media url is http://localhost/files
Check files is checked.
Default base path is ./files

GoofyX’s picture

StatusFileSize
new12.69 KB

See screenshot.

As for the second question, it's ./files.

Stuart Greenfield’s picture

Back to the drawing board!

AFAIK the function swf is only called when a node is rendered for view, and I cannot figure out (yet) why the function is being called when the file has been moved, but the filename hasn't been updated.

Just to check, does the "Could not display..." message appear before or after the other flash node log messages?

GoofyX’s picture

The error messages appear after the node log messages.

Stuart Greenfield’s picture

I've not got any further with investigation of this one - is it still causing you a problem?

Stuart Greenfield’s picture

Status: Active » Closed (fixed)

I was never able to recreate this error, and no further posts/information since begining of December so I'm changing status to "closed". During development of flash node for Drupal 6 I never saw this error at any stage so it sounds like a possible clash between modules?

Please post again and re-open the thread if necessary.