Hello,

I put a scald day and I am very interested in the plupload option.
So I installed this module and its library.

Only when I select plupload in "Upload Type" (scald optional)

I can not select images télécherger.

Look at my picture attachment and you will understand the problem.

(sorry, google translate is my friend)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nagy.balint’s picture

I could not reproduce this particular issue on the latest 1.1 and dev version. When i set the option to plupload, then the uploader appears correctly for me.

However i have an issue on the second step, the options form, as when uploading with plupload the thumbnail is not created, and the upload process cannot be continued, unless we reupload the image again.

This issue however still relates to this issue, as its a problem with plupload and image provider. The issue does not happen at the file provider.

After further investigation the issue seems to be with the " '#upload_location' => scald_atom_thumbnail_path('image')," line in the image provider. The function simply returns public:// (in comparison the file provider which works puts there public://atoms/files/) and then after in the scald_plupload_save_file i get the following error message in my dblog:
"The upload directory public: could not be created or is not accessible."

Not exactly sure what to replace that function with.

A-snowboard: can you test if the issue for you appears also with the scald_file module, and setting the file entity to plupload?

A-snowboard’s picture

Hello,

Sorry but I did not understand what I should do.

However I passed the version 7.x-1.0 scald because I had other problems (notably with the creation of video thumbnails and a unusually slow scald).
And soon as my site is being produced, I do not want to stay longer with a problematic release.

I'll retry installation of the new version of scald and I'll let you know.

jcisio’s picture

Status: Active » Postponed (maintainer needs more info)

I can't not reproduce the bug. I don't have problem with the thumbnail an plupload neither. Tested with Scald Galaxy. I have public://thumbnails/image for scald_atom_thumbnail_path('image').

PS: there is no reason that Scald 1.1 is "slower" than 1.0. No introduced change that could affect performance, unless a new access hook that might slightly affect on a listing with hundreds of atoms.

nagy.balint’s picture

Im not using scald galaxy. Simply using scald 1.1 dev with scald file provider and scald og.
The thumbnail field of course was created before 1.1 and so maybe this is an upgrade issue then.

However i will have to find where this thumbnails/image gets defined, as in the field settings i only saw the option to define whether i want public or private file system and not where it should actually be stored.

A-snowboard’s picture

I do not have many atoms. Only around 30.

Maybe I had a problem updating.

I used the method of automatic updating via drupal.

Can being by changing the files via ftp it will pass better?

gifad’s picture

@nagy.balint : the url “where this thumbnails/image gets defined” is : admin/structure/scald/image/fields/scald_thumbnail

@jcisio : could not this be related to Thumbnails wrong path with plupload integration ?

nagy.balint’s picture

Okey found it thanks.

However that field is optional there, and by default it seems to be empty which causes an error and the image upload to not work, when using plupload. So in fact this is not good. Then there should be some kind of a default value when this field is created and in an update hook, or the plupload part should be modified to not cause an error in this case.

gifad’s picture

However that field is optional there, and by default it seems to be empty

In a really fresh install, it's set up by scald.module : function scald_add_type()

  $instance = array(
    'field_name' => 'scald_thumbnail',
    ...
    'settings' => array(
      'file_directory' => 'thumbnails/' . $type,
    ),

FYI, in scald 1.0, this was set up by
'#upload_location' => 'public://atoms/images/',
compared to 1.1
'#upload_location' => scald_atom_thumbnail_path('image'),

jcisio’s picture

Status: Postponed (maintainer needs more info) » Active

#6 Indeed, it's the same issue. I'm closing that one.

jcisio’s picture

Status: Active » Needs review
FileSize
964 bytes
jcisio’s picture

Title: Plupload and scald incompatibility » Plupload uses wrong path for thumbnail
Component: Scald core » Providers
Status: Needs review » Fixed

Thanks all. Committed #11 (064c725) with a small modification to make the line shorter. We don't have to take care of the case of public:// because public:/// works too.

gifad’s picture

Title: Plupload uses wrong path for thumbnail » Plupload and scald incompatibility
Component: Providers » Scald core
Status: Fixed » Needs review
FileSize
1.01 KB

Same patch, updated to handle empty “File directory“ (that is : just public://)
and cases where user has appended the missing '/'

gifad’s picture

Status: Needs review » Fixed

too slow for 1 minute...
resetting issue status ;)

gifad’s picture

Title: Plupload and scald incompatibility » Plupload uses wrong path for thumbnail
Component: Scald core » Providers

resetting other metadata...

jcisio’s picture

Status: Fixed » Needs review
FileSize
965 bytes

#12 - #14 Nice ;) However I forgot #7. New patch. Does it work for you Balint?

jcisio’s picture

Component: Providers » Scald core

Now it's Scald core.

nagy.balint’s picture

Unfortunately not in my case and probably for some who upgrades from older version, because as gifad mentions the file_directory is set in the scald_add_type function, but if i already have the type defined it will not do anything. The problem here is that i have the scald thumbnail field but the directory is not filled. So there should be an update hook, or a check for empty file directory, otherwise it will always throw the error at file_prepare_directory($directory, FILE_CREATE_DIRECTORY).

jcisio’s picture

Status: Needs review » Active

Ok I agree that we need a hook_update_N to keep scald.module clean.

A-snowboard’s picture

Hello,

In trying to understand your comments (French and thank you google translate) I feel that you have a problem with the way the thumbnails.

Then that's my basic problem is not that at all (better if a bug has been resolved), that I can not even take a picture to load (see the image of the first post).

jcisio’s picture

Status: Active » Fixed

In fact I already committed and push c491307.

#19 do you have the plupload JS library? From the screenshot, I guess not.

A-snowboard’s picture

Hello,

I installed the library plupload downloaded here: http://www.plupload.com/download.php

You talk about another library?

jcisio’s picture

Yes it is. BTW your screenshot looks like the library is not loaded.

gifad’s picture

@ A-snowboard : look at the status report at admin/reports/status (“Tableau de bord”), it will tell you the truth about plupload installation...

A-snowboard’s picture

Hello,

Thank you for your patience. :)

in fact, I was back up to the old version of the module.

I redid the update via the Drupal interface.
Finally everything works.

I think the previous update went wrong. This is why my many problems with scald.

Now everything works fine. Bravo for this module as well as the addition of the multi upload functionality. :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.