Frequently asked questions

  • Q. If I try to initialize fbgallery in my page I get the error: The table "{{galleries}}" for active record class "Gallery" cannot be found in the database.
  • A. You didn't imported configuration files from /FBGallery/sql/fbgallery.sql into your database, or you didn't set your database to use "tablePrefix"=>'tbl_' in your config/main.php.

  • Q. I get error: Trying to get property of non-object
  • A. You didn't imported configuration files from /FBGallery/sql/fbgallery.sql into your database, or you didn't set your database to use "tablePrefix"=>'tbl_' in your config/main.php.
    OR:
    The previous solution to add a record into database doesn't help if you're adding galleries dynamicaly.
    If you use an older version (including FBGallery-v1.1.1), update to last one, or in FBGallery.php line 201 replace:
    		$this->imgsOrder = unserialize($this->gmodel->imgsOrder);
    	
    with:
    		if (isset($this->gmodel->imgsOrder)) $this->imgsOrder = unserialize($this->gmodel->imgsOrder);
    	

  • Q. When I click on a thumbnail I don't get a bigger picture.
  • A. If you use an older version (including FBGallery-v1.1) and a newer version of yii(from 1.1.7), in FBGallery.php line 441 replace
    		$rel = $this->pageTitle.'-'.$this->pid; 
    	
    with
    		$rel = preg_replace('!\-+!', '-', preg_replace("/[^a-z0-9-_.]/", "-", strtolower($this->pageTitle)));