Page 1 of 1

Issue with Style option SQL

Posted: 06 Jul 2013, 05:33
by createforme
I can't find help or even mention of this anywhere. I upgraded my site from Joomla 2.5 to Joomla 3.1 today, and I'm getting a funky error with PhocaGallery. When I hit the "Style" option box under the component, I get this error:
1048 Column 'id' cannot be null SQL=INSERT into bscwz_phocagallery_styles (id, title, filename, type, published, ordering, language) VALUES (null, 'Bootstrap.min' , 'bootstrap.min.css' , 1 , 1 , 1 , '*')
I've tried everything I can think of. When I started, I didn't even have a "_styles" table in mysql. I had to add it and each of the columns to even get to this error.

Also, my images are there, but there is no styling. The thumbnails are just piled all on top of each other. PLEASE HELP. :idea:

Re: Issue with Style option SQL

Posted: 08 Jul 2013, 14:05
by Jan
Hi, check your database settings and version. This is common value (Null) which add next higher auto increment ID for the item.

Such is the main sql query (no null - while installation):
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, '*');
When new style is copied, then the system will automatically add it (maybe this is your case):

If you didn't run the sql manually, then the php script tries to add automatically the newly addes css but there there should not be a problem with null as this is standard value for new autoincrement ID :idea:

Try to get to your phpMyAdmin and run the sql there:

Code: Select all

INSERT into bscwz_phocagallery_styles (id, title, filename, type, published, ordering, language) VALUES (null, 'Bootstrap.min' , 'bootstrap.min.css' , 1 , 1 , 1 , '*')
And check if you get more info or if you get it working - to test if in your database there are no some limits, etc (but first of course check your database version if it meets requirements for Joomla! 3)

Testing again this sql query and get no problem, Null will be translated to next higher number (auto_increment) as expected :idea:

EDIT - try to ask your webhosting provider for specific settings of your database too. :idea:
Jan

Re: Issue with Style option SQL

Posted: 08 Jul 2013, 22:05
by createforme
Ok, you're amazing. That may have been simple, but I have no clue how to do much with SQL. I am no longer getting any errors. That helped me a LOT. However, I am not sure what my next step is. The photos are still not styled correctly on the display page and I don't know how to fix that.

the site is flyers.createforme.net/index.php/photos

Re: Issue with Style option SQL

Posted: 12 Jul 2013, 14:58
by Jan
Hi, really not sure what can be a problem there, I think you should check all your Sql settings but this is a question on your webhosting provider (check if all tables are included and if there are no limits on server, etc. :idea: )

Without any error, there is really hard to give some clue advice :-(

https://www.phoca.cz/documents/16-joomla ... ent-errors
Jan