Page 1 of 1

1146 error: "_phocagallery_styles doesn't exist"

Posted: 29 Oct 2014, 22:22
by annecampbell
Hello,

My client's site is running the latest version of Phoca Gallery, 4.1.2. The gallery works fine in the back end, but when I create a menu item to display the gallery in the front end, the page gives this error:

1146 - Table 'shelburnefalls_joomla.mmp_sf_phocagallery_styles' doesn't exist SQL=SELECT a.filename as filename, a.type as type, a.menulink as menulink FROM mmp_sf_phocagallery_styles AS a WHERE a.published = 1 ORDER BY a.type, a.ordering ASC

I checked in phpMyAdmin, and in fact, the _phocagallery_styles table does not exist. However, when I copy the SQL queries from install/sql/mysql/install.utf8.sql and run them on the database (as described here: https://www.phoca.cz/documents/2-phoca-g ... em-solving ), nothing seems to happen. The _phocagallery_styles table is not created.

I made sure to replace the "#_" with the correct table prefix.

Do you have any suggestions? I know nothing about SQL, so I would very much appreciate some simple instructions.

Thanks very much -
Anne

Re: 1146 error: "_phocagallery_styles doesn't exist"

Posted: 30 Oct 2014, 20:04
by Jan
Hi, did you do the import properly:

Code: Select all

CREATE TABLE IF NOT EXISTS `#__phocagallery_styles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL DEFAULT '',
  `alias` varchar(255) NOT NULL DEFAULT '',
  `filename` varchar(255) NOT NULL DEFAULT '',
  `menulink` text,
  `type` tinyint(1) NOT NULL DEFAULT '0',
  `published` 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',
  `ordering` int(11) NOT NULL DEFAULT '0',
  `params` text,
  `language` char(7) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8 ;

INSERT INTO `#__phocagallery_styles` (`id`, `title`, `alias`, `filename`, `menulink`, `type`, `published`, `checked_out`, `checked_out_time`, `ordering`, `params`, `language`) VALUES
(1, 'Phocagallery', 'phocagallery', 'phocagallery.css', '', 1, 1, 0, '0000-00-00 00:00:00', 1, NULL, '*'),
(2, 'Rating', '', 'rating.css', NULL, 1, 1, 0, '0000-00-00 00:00:00', 2, NULL, '*'),
(3, 'Default', '', 'default.css', NULL, 2, 1, 0, '0000-00-00 00:00:00', 3, NULL, '*'),
(4, 'Bootstrap', '', 'bootstrap.min.css', NULL, 1, 0, 0, '0000-00-00 00:00:00', 4, NULL, '*');
including inserting the values and changing the #__ to your prefix?

Jan

Re: 1146 error: "_phocagallery_styles doesn't exist"

Posted: 31 Oct 2014, 14:27
by rsav
I just updated from 2.5 to 3.3 and get the same error.

I have many documents on the system so want to make sure everything goes ok.
Shoud I just run the sql script as mentioned above?

If I read it correctly it makes a new table. Does it not remove the existing contents, or is it an additional table?

I also found some recommendations on the site: https://www.phoca.cz/documents/16-joomla ... extensions
Is this a different sollution to the same problem?

Thanks

Richard.

Re: 1146 error: "_phocagallery_styles doesn't exist"

Posted: 31 Oct 2014, 15:08
by rsav
I just created the tables. The sql error is now gone. Instead I have a new error

Fatal error: Call to undefined method PhocaGalleryRenderAdmin::CategoryTreeOption() in /home/zeilrace/public_html/plugins/content/phocagallery/phocagallery.php on line 776

or for phocadownload

Fatal error: Call to undefined method JUser::authorisedLevels() in /home/zeilrace/public_html/modules/mod_phocadownload_tree/mod_phocadownload_tree.php on line 94

UPDATE

I had to update some of the plugins too. Problem now solved!

Re: 1146 error: "_phocagallery_styles doesn't exist"

Posted: 31 Oct 2014, 15:57
by Benno
@ rsav
Well Done!! :twisted:

Kind regards,
Benno

Re: 1146 error: "_phocagallery_styles doesn't exist"

Posted: 10 Nov 2014, 21:56
by annecampbell
I'm sorry - I never received an email notification that you responded to my post, so I'm returning to this very late.

Jan wrote:
Jan wrote:Hi, did you do the import properly:

Code: Select all

CREATE TABLE IF NOT EXISTS `#__phocagallery_styles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL DEFAULT '',
  `alias` varchar(255) NOT NULL DEFAULT '',
  `filename` varchar(255) NOT NULL DEFAULT '',
  `menulink` text,
  `type` tinyint(1) NOT NULL DEFAULT '0',
  `published` 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',
  `ordering` int(11) NOT NULL DEFAULT '0',
  `params` text,
  `language` char(7) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8 ;

INSERT INTO `#__phocagallery_styles` (`id`, `title`, `alias`, `filename`, `menulink`, `type`, `published`, `checked_out`, `checked_out_time`, `ordering`, `params`, `language`) VALUES
(1, 'Phocagallery', 'phocagallery', 'phocagallery.css', '', 1, 1, 0, '0000-00-00 00:00:00', 1, NULL, '*'),
(2, 'Rating', '', 'rating.css', NULL, 1, 1, 0, '0000-00-00 00:00:00', 2, NULL, '*'),
(3, 'Default', '', 'default.css', NULL, 2, 1, 0, '0000-00-00 00:00:00', 3, NULL, '*'),
(4, 'Bootstrap', '', 'bootstrap.min.css', NULL, 1, 0, 0, '0000-00-00 00:00:00', 4, NULL, '*');
including inserting the values and changing the #__ to your prefix?
I copied this exact code, changed "#_" to the correct table prefix, and ran the query. The prefix I used was mmp_sf_, so the query begins with "CREATE TABLE IF NOT EXISTS `mmp_sf_phocagallery_styles`". When I run the query, nothing at all happens. phpMyAdmin just says "Loading...", then finishes loading, but the table does not appear in the list of database tables.

Is there something important that I'm missing? Is there some alternative way that I can create this table?

Thanks very much -
Anne

Re: 1146 error: "_phocagallery_styles doesn't exist"

Posted: 11 Nov 2014, 20:57
by Jan
Hi, this is standard sql query, after running it and changing the # to your prefix (2x) the table include its data should be displayed in phpMyAdmin

Jan

Re: 1146 error: "_phocagallery_styles doesn't exist"

Posted: 25 Dec 2015, 13:30
by sisifo
I am not writing for a problem. Thank you, Jan. You take a load off my mind. :twisted: