Undefined Index 'idorattribute'

Hi, i add into my project in jcrop extension , i i run this is error messages.

Undefined index: getCoordsFromPost _x ??

how to get the image cropping coordinates (or implement your own method) $coords = $jcropper->getCoordsFromPost(‘idOrAttributeName’); ???

Thanks.

Hi,

You have to pass your attribute name from your model…

Below method needs attribute name :)





	/**

	 * Get the cropping coordinates from post.

	 * 

	 * @param type $attribute The model attribute name used.

	 * @return array Cropping coordinates indexed by : x, y, h, w

	 */

	public function getCoordsFromPost($attribute)

	{

		$coords = array('x' => null, 'y' => null, 'h' => null, 'w' => null);

		foreach ($coords as $key => $value) {

			$coords[$key] = $_POST[$attribute . '_' . $key];

		}

		return $coords;

	}




Hi,

Is this problem solved ?

Are you facing any other problem regarding this crop ?

no the cropped image does not save n db

Replace the attached file and check the output… please reply with output :)

it doesn’t work chandran…

Hi sobhana,

I am sure it wont work :) because i have not made any changes

I would like to know … what output did u got in your page?

Because i just included print_r() inside the code… this is the way u have to debug…

Now tell me . what is ur output?

Hi chandran,

i have another doubt,

in cuploadedfile ,in that file image files are uploaded perfectly But the video files not uploaded .If i upload the video it throws the error:ur uploaded file size greater than 2Mb how do i rectify it.How to increase the file size.

Thank u

					 					 					 				 			  												 					 				 				 				 						0