Not sure if anyone else is experiencing this but, whenever I edit a type enabled with FFMPEG converter and save it, the element order is changed. For example, normally, the order should be within the field object:

[0] - Source Video Data Array
[1] - Converted Video Data Array
[2] - Screenshot 1
[3] - Screenshot 2
[4] - Screenshot 3

But it ends up as:

[0] - Screenshot 3
[1] - Screenshot 1
[2] - Screenshot 2
[3] - Converted Video Data Array
[4] - Source Video Data Array

I had a HARD look at the code and wasn't able to figure out what was causing the shifting. Is anyone else experiencing this with 6.x-1.x-dev?

I currently use FFMPEG-wrapper 6.x-1.x-dev.

Comments

zoo33’s picture

Priority: Normal » Minor

Yes, I've seen the same thing, and I'm not sure why it happens. However, FFmpeg Converter doesn't rely on the files being saved in any particular order, it keeps track of the files using its own data which it adds to the data array for each file. If someone can show me a straightforward way to keep the original order of the files, I'd be happy to include it.

zoo33’s picture

Title: After a node edit of a video type, the array element indexes are switched from their original positions. » Order of file field instances is not maintained

Shorter title.

K-Max’s picture

The only workaround that I was able to muster was having one of my custom modules put the order of the field instances back in the correct order during the presave op of hook_nodeapi.

I ended up having to use the Utility module to force my module to run its stuff last to ensure the fix happens. So it could be another module that could be causing the unintended changes.