Issue with catogories and generated post pages

edited June 2015 in Bug Reports
First, I want to say how excited I was for the new version fuel, introducing the base posts model.

Sadly, I have run into a road block. I am trying to follow the example you have here:

But when I do and I try to add a new category, the location to the inline window goes here:

Slugs seem to work flawlessly. Any thoughts?


  • edited 12:04PM
    If you look at the base_posts_model.php file on line 122, you'll see that it references a property called name. The name should be the module and the example in the documentation, it uses 'articles'. Do you have that property defined in your model and a module with that name setup?
  • edited June 2015
    Ah thanks for that, after sorting that (module is called "gallery"), now it seems to be stuck in a loop when trying to add a new category:


    that just reopens the current page I am in.

    the only way to get it to sort of work, is commenting out:

    //$fields['category_id']['module'] = $this->name;

    and adding "add_params" with "context='.$this->name"

    it now directs to "fuelcms/categories/inline_create?context=gallery" which allows me to create new categories using the context.

    I am assuming this is not the right way?
  • edited 12:04PM
    That looks to be a bug! Luckily, the base_posts_model is meant to be a starting point to inherit from so to fix for now until the fix is in place (I've pushed it already to the develop branch), you can do the following in your model:
    function form_fields($values = array(), $related = array()) { $fields = parent::form_fields($values, $related); $fields['category_id']['module'] = 'categories'; // put in your own specific code to manipulate the fields here return $fields; }
Sign In or Register to comment.