srs81 / CakePHP-AjaxMultiUpload

CakePHP 2 plugin to allow for easy multi-file upload with AJAX
Other
65 stars 32 forks source link

Notice (8): Undefined index: #14

Closed andranos closed 12 years ago

andranos commented 12 years ago

Hi

Its working fine under my localhost but when i upload it to my host server, it shows Notice (8): Undefined index: Notice (8): Undefined index: Recipe.id [APP\Plugin\Authake\View\recipes\edit.ctp, line 19] this is the code <?php echo $this->Upload->edit('Recipe', $this->Form->fields['Recipe.id']); ?>

thanks

andranos commented 12 years ago

Nevermind, it's already fixed

deadsoulja commented 11 years ago

Hi andranos, could you please tell me how u fixed that problem? i'm getting the same error for users but under customers it works fine. don't know where the problem is.

010100 commented 11 years ago

I have the same issue, have any one be kind to share a proper solution.

greetings

anhlt commented 10 years ago

Oh Please tell me how to fix it. I'm stuck in here

deadsoulja commented 10 years ago

Hi, I'm not sure about the problem because it's about a year ago. So if you can describe the problem maybe I can give you a solution.

anhlt commented 10 years ago

I want to upload a document, I have a table name "Documents" controller DocumentController When I echo echo $this->Upload->edit('Document', $this->Form->fields['Document.id']); I recieve an error Notice (15): Undefined index: And I want to store that Document belong to a Lesson by set lesson_id. How can I do that

destinydriven commented 10 years ago

@anhlt If you post your view code it will be easier to assist you

anhlt commented 10 years ago

It just. <?php echo $this->Upload->edit('Document', $this->Form->fields['Document.id']); ?> I still able to upload, but I don't know why it has a error like this. And I also want to set lesson_id of Document Model after upload finished. Any solution?

Ps : has nothing on edit action

destinydriven commented 10 years ago

@anhlt What does your $this->form->create() look like?

destinydriven commented 10 years ago

@anhlt Make sure your form->create() is for Document model.

Add to your form echo $this->Form->input('id');

That should fix your specific error.

deadsoulja commented 10 years ago

You need the ID in your form so you can read it out as a field. The solution of destinydriven should fix the problem.