Error
  • Model class artistsModelVideo not found in file
setState('artist.id',$pk); } public function getItem($pk = NULL) { $pk = (!empty($pk)) ? $pk : (int)$this->getState('artist.id'); if ($this->_item === null) { $this->_item = array(); } if (!isset($this->_item[$pk])) { try { $db = $this->getDbo(); $query = $db->getQuery(true); $query->select( $this->getState( 'item.select', 'a.id, a.name, a.alias, a.bio, a.sculpture_bio, a.book_text, a.video_text' ) ); $query->from('#__artists AS a'); $query->where('a.id = ' . $pk); $db->setQuery($query); $item = $db->loadObject(); // Sculptures $query = $db->getQuery(true); $query->select('COUNT(b.id)'); $query->from('#__artists_sculptures AS b'); $query->where('b.artist_id = ' . $pk); $query->where('b.state = 1'); $db->setQuery($query); $item->sculptures = $db->loadResult(); // Books $query = $db->getQuery(true); $query->select('COUNT(c.id)'); $query->from('#__artists_books AS c'); $query->where('c.artist_id = ' . $pk); $query->where('c.state = 1'); $db->setQuery($query); $item->books = $db->loadResult(); // Join videos $query = $db->getQuery(true); $query->select($db->quoteName(array('e.title','e.image','e.detail','e.ordering','e.state'))); $query->from('#__artists_videos AS e'); $query->where('e.artist_id = ' . $pk); $query->where('e.state = 1'); $query->order('e.title DESC'); $db->setQuery($query); $item->videos = $db->loadObjectList(); $this->_item[$pk] = $item; } catch (JException $e) { if ($e->getCode() == 404) { JError::raiseError(404,$e->getMessage()); } else { $this->setError($e); $this->_item[$pk] = false; } } } return $this->_item[$pk]; } }