Hi, i upload my script to PHP (v 5.3.29) server;
I get Ajax errors - 500 (Internal Server Error) ;
So i figured out the issue;
when i write like this everything is fine, there is no problem;
//if edit mode and password is blank, do not save.
$editor->on( 'preEdit', function ( $e, $id, $values ) {
if ( $values['users']['user_pass'] === '' ) {
$e->field( 'users.user_pass' )->set( false );
}
} );
//if create - validate for pass
$editor->on( 'preCreate', function ( $editor, $values ) {
$editor->field( 'users.user_pass' );
$editor->validator( 'Validate::notEmpty' );
} );
but in my original script in localhost, the code is like below;
//if edit mode and password is blank, do not save.
->on( 'preEdit', function ( $e, $id, $values ) {
if ( $values['users']['user_pass'] === '' ) {
$e->field( 'users.user_pass' )->set( false );
}
} )
//if create - validate for pass
->on( 'preCreate', function ( $editor, $values ) {
$editor
->field( 'users.user_pass' )
->validator( 'Validate::notEmpty' );
} );
so is there a way to make the original code work on remote server without any changes? Cause i have to update so many rows.
Thanx