error messages after installing Phoca gallery

Phoca Gallery - image gallery extension
samueltang
Phoca Member
Phoca Member
Posts: 11
Joined: 24 Sep 2012, 14:22

error messages after installing Phoca gallery

Post by samueltang »

Hi All,

When I have installed phoca gallery and go to the control panel, I got a lot of error essage like these:
______________________________________________________________
Strict Standards: Declaration of PhocaGalleryCpController::display() should be compatible with that of JController::display() in C:\xampp\htdocs\joomla2.5\administrator\components\com_phocagallery\controller.php on line 46

Strict Standards: Non-static method PhocaGalleryRenderInfo::getPhocaVersion() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\joomla2.5\administrator\components\com_phocagallery\views\phocagallerycp\view.html.php on line 22

Strict Standards: Non-static method PhocaGalleryRenderAdmin::quickIconButton() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\joomla2.5\administrator\components\com_phocagallery\views\phocagallerycp\tmpl\default.php on line 9
_________________________________________________________

When I add the gallery into my webpage, it cannot display properly. It shows a lot of error message as well:
________________________________________
Strict Standards: Only variables should be assigned by reference in C:\xampp\htdocs\joomla2.5\components\com_phocagallery\views\categories\view.html.php on line 30

Strict Standards: Only variables should be assigned by reference in C:\xampp\htdocs\joomla2.5\components\com_phocagallery\views\categories\view.html.php on line 31
____________________________________________________________________________

I use joomla v2.5. Can anyone help to solve this problem? THank you.

Samuel
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9965
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: error messages after installing Phoca gallery

Post by Benno »

samueltang
Phoca Member
Phoca Member
Posts: 11
Joined: 24 Sep 2012, 14:22

Re: error messages after installing Phoca gallery

Post by samueltang »

Hi Benno,

Thanks for your help. I followed the instruction and the error messages disappear.
But this just disable the error from displaying on the website, will this error messages affect the opeartion of the gallery in the website?

I got another problem, when I create category in gallery and save it, it shows up the following message:
**************Save failed with the following error: Category must have title*********************

But I really type the title already. Because of this, I can't save the category and can't create the category.
Is there any problem on the setting or do I miss any steps to create the category?

Thanks and Reagrds,
Samuel
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9965
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: error messages after installing Phoca gallery

Post by Benno »

Hi,
will this error messages affect the opeartion of the gallery in the website?
No, I don't think so.
Save failed with the following error: Category must have title
This could have several different reasons. (Perhaps not all database tables were created during installation...)
Search for "Category must have title" in this (Phoca Gallery) forum. You will find several threads to this theme.

Kind regards,
Benno
samueltang
Phoca Member
Phoca Member
Posts: 11
Joined: 24 Sep 2012, 14:22

Re: error messages after installing Phoca gallery

Post by samueltang »

Hi Benno,
I have imported the tables into the database. They are:
#_phocagallery
#_phocagallery_categories
#_phocagallery_comments
#_phocagallery_fb_users
#_phocagallery_img_comments
#_phocagallery_img_votes
#_phocagallery_img_votes_statistics
#_phocagallery_user
#_phocagallery_votes
#_phocagallery_votes_statistics

But when I create the category, I still got the following message:
_______________________________________________________________________
500 - **An error has occurred.**

JDatabaseMySQLi::query: 1146 - Table 'joomla2.5.ho4tf_phocagallery_categories' doesn't exist SQL=SELECT a.*,l.title AS language_title,uc.name AS editor,ag.title AS access_level,c.title AS parentcat_title, c.id AS parentcat_id,ua.id AS userid, ua.username AS username, ua.name AS usernameno,v.average AS ratingavg,cc.countid AS countid FROM `ho4tf_phocagallery_categories` AS a LEFT JOIN `ho4tf_languages` AS l ON l.lang_code = a.language LEFT JOIN ho4tf_users AS uc ON uc.id=a.checked_out LEFT JOIN ho4tf_viewlevels AS ag ON ag.id = a.access LEFT JOIN ho4tf_phocagallery_categories AS c ON c.id = a.parent_id LEFT JOIN ho4tf_users AS ua ON ua.id = a.owner_id LEFT JOIN ho4tf_phocagallery_votes_statistics AS v ON v.catid = a.id LEFT JOIN (SELECT cc.parent_id, count(*) AS countid FROM ho4tf_phocagallery_categories AS cc GROUP BY cc.parent_id ) AS cc ON a.parent_id = cc.parent_id WHERE (a.published IN (0, 1)) GROUP BY a.id ORDER BY a.title asc
______________________________________________________________________________________________

I don't know what happen for this? Can you help to solve it? Thank you.

Regards
Samuel
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9965
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: error messages after installing Phoca gallery

Post by Benno »

Hi,
Table 'joomla2.5.ho4tf_phocagallery_categories' doesn't exist
means what it says, the table "your-prefix"_phocagallery_categories does still not exist.
If you can see it e.g. with help of phpMyAdmin, perhaps you use the wrong prefix for this table.(Meant is the prefix, you set during Joomla! installation.)

Kind regards,
Benno
samueltang
Phoca Member
Phoca Member
Posts: 11
Joined: 24 Sep 2012, 14:22

Re: error messages after installing Phoca gallery

Post by samueltang »

Hi Benno,
In fact, I installed the gallery in extension manager in usual way and import the tables from the file "install.bak.sql".
The tables are imported inside the database but the name of the tables with prefix "#_" ,
e.g.#_phocagallery and #__phocagallery_categories .

But from the error message, it needs tables with prefix "joomla2.5.ho4tf_" e.g. name 'joomla2.5.ho4tf_phocagallery_categories' .

What can I do to change the table prefix or I use a wrong version of gallery?
I use gallery version 3.2.1, joomla 2.5.

Thanks.
Samuel
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9965
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: error messages after installing Phoca gallery

Post by Benno »

Hi,
I don't think joomla2.5.ho4tf_ is your table prefix. Perhaps tf_
1.) Check your table prefix with help of phpMyAdmin.

2.) Delete your imported tables.
#_phocagallery
#_phocagallery_categories
#_phocagallery_comments
#_phocagallery_fb_users
#_phocagallery_img_comments
#_phocagallery_img_votes
#_phocagallery_img_votes_statistics
#_phocagallery_user
#_phocagallery_votes
#_phocagallery_votes_statistics
(Because importing is the wrong way)

3.) Copy and paste this database queries:

Code: Select all

DROP TABLE IF EXISTS `#__phocagallery_categories`;
CREATE TABLE `your-prefix_phocagallery_categories` (
  `id` int(11) NOT NULL auto_increment,
  `parent_id` int(11) NOT NULL default 0,
  `owner_id` int(11) NOT NULL default 0,
  `title` varchar(255) NOT NULL default '',
  `name` varchar(255) NOT NULL default '',
  `alias` varchar(255) NOT NULL default '',
  `image` varchar(255) NOT NULL default '',
  `section` varchar(50) NOT NULL default '',
  `image_position` varchar(30) NOT NULL default '',
  `description` text,
  `date` datetime NOT NULL default '0000-00-00 00:00:00',
  `published` tinyint(1) NOT NULL default '0',
  `approved` tinyint(1) NOT NULL default '0',
  `checked_out` int(11) unsigned NOT NULL default '0',
  `checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00',
  `editor` varchar(50) default NULL,
  `ordering` int(11) NOT NULL default '0',
  `access` tinyint(3) unsigned NOT NULL default '0',
  `hits` int(11) NOT NULL default '0',
  `count` int(11) NOT NULL default '0',
  `accessuserid` text,
  `uploaduserid` text,
  `deleteuserid` text,
  `userfolder` text,
  `latitude` varchar(20) NOT NULL default '',
  `longitude` varchar(20) NOT NULL default '',
  `zoom` int(3) NOT NULL default '0',
  `geotitle` varchar(255) NOT NULL default '',
  `params` text,
  `metakey` text,
  `metadesc` text,
  `metadata` text,
  `extid` varchar(255) NOT NULL default '',
  `exta` varchar(255) NOT NULL default '',
  `extu` varchar(255) NOT NULL default '',
  `extauth` varchar(255) NOT NULL default '',
  `extfbuid` int(11) NOT NULL default '0' '',
  `extfbcatid` varchar(255) NOT NULL default '',
  `language` char(7) NOT NULL default '',
  PRIMARY KEY  (`id`),
  KEY `cat_idx` (`section`,`published`,`access`),
  KEY `idx_access` (`access`),
  KEY `idx_checkout` (`checked_out`)
)   DEFAULT CHARSET=utf8;

into your phpMyAdmin Run SQL query/queries form.
(see the image below)

4.) Change the second line:
CREATE TABLE `your-prefix_phocagallery_categories with your table prefix.
(In my case it's j25_)
Image
Press the Go button.
Now the table your-prefix_phocagallery_categories should be created correctly.

5.) This is an example for the your-prefix_phocagallery_categories table.
If necessary, do the steps 3 and 4 for all missing table.
You will find all queries inside install.bak.sql

Kind regards,
Benno
samueltang
Phoca Member
Phoca Member
Posts: 11
Joined: 24 Sep 2012, 14:22

Re: error messages after installing Phoca gallery

Post by samueltang »

Hi Benno,
I checked that my prefix is "ho4tf" e.g.ho4tf_photogallery

I followed your step and run SQL query for each table. The table were really created in the database. But the error message
"Save failed with the following error: Category must have title" still appear and can't creat the category. I have restarted the server again and it also failed.

It makes me fustrated. Anything I can do for it now?

Thanks and Regards
Samuel
samueltang
Phoca Member
Phoca Member
Posts: 11
Joined: 24 Sep 2012, 14:22

Re: error messages after installing Phoca gallery

Post by samueltang »

Sorry, I haved mistakenly added double underscore in the table name, when I change it to single underscore, it works.

THank you for your help Benno.

Regards,
Samuel
Post Reply