Development

#3135 (Missing ; at the en of remote_function generated Javascript)

You must first sign up to be able to contribute.

Ticket #3135 (closed defect: fixed)

Opened 7 months ago

Last modified 5 months ago

Missing ; at the en of remote_function generated Javascript

Reported by: jug Assigned to: FabianLange
Priority: minor Milestone: 1.0.15
Component: helpers Version: 1.0.10
Keywords: Cc:
Qualification: Patch rejected, quality issue

Description

Using this will fail :

form_remote_tag( 
  array(
    /* ... */
    'success' => remote_function(/*...*/) . remote_function(/*...*/)
  )
)

because remote_function is not ending its returned javascript by a semi-colon (or is not starting it with)

So in file :

javascriptHelper.php

Line :

449

Replace :

return $function;

By :

return ';'.$function.';';

Thanks,

Change History

05/07/08 10:40:36 changed by FabianLange

  • owner changed from fabien to FabianLange.
  • status changed from new to assigned.
  • qualification changed from Unreviewed to Patch rejected, quality issue.
  • milestone set to 1.0.15.

Even if strictly speaking this is no bug its annoying behaviour that can be fixed backwards compatible. The missing semicolon is added at the end of the javascript statement. It should be a complete statement.

05/07/08 10:41:23 changed by FabianLange

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [8827]) remote_function will return a complete Javascript statement including the trailing semicolon. Fixes #3135

05/07/08 10:41:30 changed by FabianLange

(In [8828]) remote_function will return a complete Javascript statement including the trailing semicolon. Fixes #3135