Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xupload 5.0.1 not working with Yii 1.16.1 #27

Open
ifocus22 opened this issue Jan 6, 2015 · 10 comments
Open

Xupload 5.0.1 not working with Yii 1.16.1 #27

ifocus22 opened this issue Jan 6, 2015 · 10 comments

Comments

@ifocus22
Copy link

ifocus22 commented Jan 6, 2015

Thanks for this great extension. I'm using it properly with Yii framework v 1.15.

I tried the same code with 1.16.1 but it's failing. The widget is displayed properly but the upload does not work. No info in tha app log, no error in the js console. I'm using the basic scenario :

public function actions()
{
return array(
'upload'=>array(
'class' =>'xupload.actions.XUploadAction',
'path' =>Yii::app() -> getBasePath() . "/../uploads",
'publicPath' => Yii::app() -> getBaseUrl() . "/uploads",
),
);
}

public function actionIndex()
{

  Yii::import("xupload.models.XUploadForm");
    $model = new XUploadForm;
    $this -> render('index', array('model' => $model, ));
}
@gplaza
Copy link
Contributor

gplaza commented Jan 9, 2015

Same thing here (not working with yii 1.1.16) !
But i have an javascript error :

Error jquery :
TypeError: that is undefined
options = that.options,

The object "options" seem empty

@dev3k
Copy link

dev3k commented Feb 22, 2015

try changing the code in assets/jquery.fileupload-ui.js

from
var that = $(this).data('fileupload');
to
var that = $("#fileupload").data('blueimpUI-fileupload');

http://stackoverflow.com/questions/23762825/why-is-this-datamycontrol-undefined

@Asgaroth
Copy link
Owner

Looks like Yii 1.1.16 updated the included version of jquery, so the correct solution would be to update the corresponding jquery upload library included in this extension.

I am no longer supporting this extension, so I am looking for any interested maintainers.

Please submit a PR, not sure how to transfer the access to updating the extension in the Yii site, probably just remove the downloads there, and point to this repository would work.

@gplaza
Copy link
Contributor

gplaza commented Feb 25, 2015

@dev3k : This change doesn't work :(
same problem with Yii 1.1.16

@dev3k
Copy link

dev3k commented Feb 25, 2015

@gplaza you have to replace all the recurrences, try my working version of the file https://jsfiddle.net/khalilmajdalawi/os2gtamt/

@gplaza
Copy link
Contributor

gplaza commented Feb 25, 2015

@dev3k :
Sorry you are right !
I have changed this :
var that = $(this).data('fileupload');
to
var that = $("#fileupload").data('blueimpUI-fileupload');

but in reality it's just the sample of stackoverflow .... (#fileupload)

the good change is :
var that = $(this).data('blueimpUI-fileupload');

@Asgaroth
Copy link
Owner

Is it possible that one of you can create a PR? I can update the extension page in the yii site.

On Wed, Feb 25, 2015 at 11:01 AM, gplaza [email protected] wrote:

@dev3k :
Sorry you are right !
I have changed this :
var that = $(this).data('fileupload');
to
var that = $("#fileupload").data('blueimpUI-fileupload');
but in reality it's just the sample of stackoverflow .... (#fileupload)
the good change is :

var that = $(this).data('blueimpUI-fileupload');

Reply to this email directly or view it on GitHub:
#27 (comment)

@gplaza
Copy link
Contributor

gplaza commented Feb 25, 2015

Here a PR : #28
thx for your extension Asgaroth :D
i have no tried with a downgrade of Yii (1.1.15 for ex.)

@Asgaroth
Copy link
Owner

Does it work if you replace assets/jquery.fileupload-ui.js with the latest version of the jquery plugin ?

@gplaza
Copy link
Contributor

gplaza commented Feb 26, 2015

@Asgaroth : no, there is lot of refactoring to create if you update with the last version of Jquery Plugin.
for a simple fix is more simple to only change jquery.fileupload-ui.js.

ps : I'm not an expert in javascript but i have tried it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants