Articles Model Example

edited February 2011 in Installation
Hi
I'm trying out the articles model example from the user guide and getting this error.

Severity: Notice

Message: Undefined index: categories

Filename: models/articles_model.php

Line Number: 93

It happens when no categories are selected but works OK when one or more categories are selected.

I'm just trying to understand the method for saving many to many relationships for a project that needs colour options for products.

Can you help please?

Comments

  • edited 7:55AM
    That line should be:
    $data = (!empty($this->normalized_save_data['categories'])) ? $this->normalized_save_data['categories'] : array();

    The save_related has kind of an odd method signature.
  • edited 7:55AM
    Many Thanks,

    Your time is much appreciated
Sign In or Register to comment.