FuelCMS Delete problem : Message: Undefined variable: title

suwsuw
edited June 2012 in Modules
When I try to delete one or multiple rows from my model I get this error:

You are about to delete the item:
Message: Undefined variable: title

Filename: _layouts/module_delete.php

Line Number: 15
How do I set $title on, it seems I missed some variables or something...

My model class extends extends Base_module_model,
with or without declaring list_items function - I have the same problem,
I don't have "name" field in my database - ? do I have to?

Comments

  • suwsuw
    edited June 2012
    strange - I just found out that if I make a search and I try to delete the filtered rows,
    the error dissapear, can be a javascript error?
    - If I clean the search bar and try to delete - the error appears again.
  • suwsuw
    edited 6:36AM
    I solve it - It was the db structure.
    It seems - on delete confirmation, fuel is looking to read next field
    after id or whatever your key field is defined.
    If that field is NULL - you get this error - so all I had to do was to change
    the field's order in the database and now It is working

    db example: - was:
    id,name,email << most of name field had NULL values.

    changed:
    id,email,name << email is a required field - so It won't be null.

    now When I want to delete multiple or single, it's working.
  • edited 6:36AM
    You don't need to have a name field. Do you have a "display_field" specified for your module's configuration?
  • suwsuw
    edited 6:36AM
    thank you for this - I just realized how dumb I was - still the documentation is a little bit fuzzy - the module configure example is explained in "simple module" chapter, I didn't even looked there since I wanted to create some "advanced modules"...

    http://www.getfuelcms.com/user_guide/modules/simple
Sign In or Register to comment.