⚠ 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

Adding my own CSS -> echo_and_die fails



opolette
  • profile picture
  • Member

Posted 19 July 2012 - 12:31 PM

[size=4]Hello

I have embedded grocerycrud in my own css/js.

Everything seems to work fine except that, when I delete a record it just displays:

[color=#000000][font=Times]{"success":true,"success_message":"some message here to say it is successful[/font][/color][color=#000000][font=Times]"}[/font][/color]

[color=#000000][font=Times]Instead of having the message nicely displayed at the top of the grid, it is displayed in a blank page.[/font][/color]

[color=#000000][font=Times]What should I do to have it working with my css/js ?[/font][/color]

[color=#000000][font=Times]Thanks [/font][/color][/size]

noskov.biz
  • profile picture
  • Member

Posted 19 July 2012 - 12:45 PM

Hi, opolette!

This happens when you have lost some of grocery CRUD js-files. It is also important the sequence of js-files. If you did some changes, probably, you have missed something. Please, check the firebug. Is there any error?

opolette
  • profile picture
  • Member

Posted 19 July 2012 - 14:07 PM

[size=4]Hello

I got it.. This is because there was a single quote in the subject ($crud->set_subject(...)).

This breaks the code since the string is put inside simple quotes by GroceryCRUD (even if the quote in the subject is preceeded by a \).

This is a severe drawback for some languages that use single quotes.

The strings should be escaped by groceryCRUD.

using [color=#333366][font=arial, helvetica, sans-serif]' solves the problem.[/font][/color][/size]

noskov.biz
  • profile picture
  • Member

Posted 19 July 2012 - 18:42 PM

Hm, and what language do you use? Does this error occur if you use double quotes? For example: $crud->set_subject("Something");