⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Cannot save



Ron van den Bergh
  • profile picture
  • Member

Posted 02 September 2015 - 18:46 PM

I suddenly have something strange,

 

I have a db field:  comment  varchar 256   (I also tried text)

 

When in the controller put:  $crud->field_type('comment','text');

the save buttons are not working.

 

Update and go back to list does nothing..  (no message, no errorlog)

 

For a new record the save button shows a blank screen  with:

 

{"success":true,"insert_primary_key":6,"success_message":"Your data has been successfully stored into the database. Edit Record<\/a> or Go back to list<\/a><\/p>","success_list_url":"with the url here"}

 

and it did save!!

 

 

When I remove the field_type text, it works.

 

 

I have cleaned the history of my browser and the global_xss_filtering = false

 

 

Sobody an idea?


Amit Shah
  • profile picture
  • Member

Posted 03 September 2015 - 09:48 AM

this is common problem - check if u have multiple jquery being called up or there might be possible the jquery used is less then 1.10.x... that too failed ...

if u already have some jquery being called up in header / theme, do a $crud->unset_jquery() .. and check - it may resolve it..

 

multiple instance of jquery wont crash / generate error in console but it surely is going to generate error in functionality.

 

Happy GCing :)


Ron van den Bergh
  • profile picture
  • Member

Posted 03 September 2015 - 18:20 PM

mmm.

 

Just found something.. 

 

field_type time stopped working too.

then I removed the field_type for that and everything started working again..

 

but it was working before..

 

I Gues I got to dig a little bit deeper.

 

 

Question about: $crud->unset_jquery() at what point should i put it?

 

thanks for your help :)

 

 

 

 

 

 


Amit Shah
  • profile picture
  • Member

Posted 04 September 2015 - 06:15 AM

well u can put anywhere before the rendering the output...!!


Ron van den Bergh
  • profile picture
  • Member

Posted 04 September 2015 - 09:06 AM

Ok thanks.. (no difference..)

 

 

But I found a workaround by creating a callback for the comment field:

  

function callback_comment($value = '')
     {
        return "<textarea id='field-comment' name='comment' class='texteditor' >".$value."</textarea>";
      }              
 

That is working...

 

:P