-
dyvel
-
-
Offline
-
Elite Member
-
- Posts: 200
- Thank you received: 11
-
Karma: 10
-
|
I'm getting this error: SQL=CREATE TABLE IF NOT EXISTS `jos_netatmo_climastations` ( `id` int(11) NOT NULL auto_increment, `name` VARCHAR(255) NOT NULL , `mac_address` VARCHAR(255) NOT NULL , `notes` TEXT , PRIMARY KEY (`id`), UNIQUE(name, mac_address) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
The project worked fine in sandbox last time I worked on it. Now if also fails there. Any idea as to the reason for this?
EDIT: updated joomla to 3.2.1, then tried again - this time it installed, but with these messages:
Warning
JInstaller: :Install: Cannot find Joomla XML setup file
JInstaller: :Install: Cannot find XML setup file
Message
Installing JDOM version 2.6.1, was successfull!
Updating Netatmo was successfull.
Installing component was successful.
|
Last Edit: 19 Dec 2013 19:54 by dyvel.
|
-
dyvel
-
-
Offline
-
Elite Member
-
- Posts: 200
- Thank you received: 11
-
Karma: 10
-
|
Trying to use the component: getting SQL=SELECT a.id,a.address,a.city,a.client_type,a.contact_email,a.contact_person,a.contact_phone,a.name,a.zip_code,_client_type_.name AS `_client_type_name` FROM jos_netatmo_clients AS a LEFT JOIN `jos_netatmo_clienttypes` AS _client_type_ ON _client_type_.id = a.client_type ORDER BY a.client_type asc LIMIT 0, 20 error... and no link from components to the component.
Something is wrong...
Tried to uninstall, then install again. Getting this error again: SQL=CREATE TABLE IF NOT EXISTS `jos_netatmo_climastations` ( `id` int(11) NOT NULL auto_increment, `name` VARCHAR(255) NOT NULL , `mac_address` VARCHAR(255) NOT NULL , `notes` TEXT , PRIMARY KEY (`id`), UNIQUE(name, mac_address) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
Last Edit: 19 Dec 2013 19:52 by dyvel.
|
-
dyvel
-
-
Offline
-
Elite Member
-
- Posts: 200
- Thank you received: 11
-
Karma: 10
-
|
Its been a while - still no answer to this??? Still have this problem
|
|
-
dyvel
-
-
Offline
-
Elite Member
-
- Posts: 200
- Thank you received: 11
-
Karma: 10
-
|
Also, if I flush dataset, and hit run in sandbox, then I get a "component now found" error. Then I have to build again for it to show up. This has happened many times, not just when I flush, but I just noticed it again. It seems to happen the first time I run sandbox when I open the project.
Also attached some error screenshots. (edit: attachment doesn't work for me - linked to dropbox instead).
An example of the db design that generates one of the error pages.
I've tried in both J3.2 and J3.0 - same errors. On 2.5 I can't even build. I get this error:
The content of the 2.5 error is:
JInstaller: :Install: Error SQL DB function failed with error number 1071
Specified key was too long; max key length is 1000 bytes SQL=CREATE TABLE IF NOT EXISTS `kitsr_demo10648_climastations` ( `id` int(11) NOT NULL auto_increment, `name` VARCHAR(255) NOT NULL COMMENT '191921' , `mac_address` VARCHAR(255) NOT NULL COMMENT '191922' , `notes` TEXT COMMENT '191923' , PRIMARY KEY (`id`), UNIQUE(name, mac_address) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='26434';
SQL =
CREATE TABLE IF NOT EXISTS `#__demo10648_climastations` (
`id` int(11) NOT NULL auto_increment,
`name` VARCHAR(255) NOT NULL COMMENT '191921' ,
`mac_address` VARCHAR(255) NOT NULL COMMENT '191922' ,
`notes` TEXT COMMENT '191923' ,
PRIMARY KEY (`id`),
UNIQUE(name, mac_address)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='26434';
Component Install: SQL error file DB function failed with error number 1071
Specified key was too long; max key length is 1000 bytes SQL=CREATE TABLE IF NOT EXISTS `kitsr_demo10648_climastations` ( `id` int(11) NOT NULL auto_increment, `name` VARCHAR(255) NOT NULL COMMENT '191921' , `mac_address` VARCHAR(255) NOT NULL COMMENT '191922' , `notes` TEXT COMMENT '191923' , PRIMARY KEY (`id`), UNIQUE(name, mac_address) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='26434';
SQL =
CREATE TABLE IF NOT EXISTS `#__demo10648_climastations` (
`id` int(11) NOT NULL auto_increment,
`name` VARCHAR(255) NOT NULL COMMENT '191921' ,
`mac_address` VARCHAR(255) NOT NULL COMMENT '191922' ,
`notes` TEXT COMMENT '191923' ,
PRIMARY KEY (`id`),
UNIQUE(name, mac_address)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='26434';
|
Last Edit: 06 Jan 2014 11:35 by dyvel.
|
-
JoomGuy
-
-
Offline
-
Moderator
-
-
Joomla Enthusiast, Lover of Cooking
- Posts: 1115
- Thank you received: 195
-
Karma: 64
-
|
Hi @dyvel,
Fortunately this is an easy one to fix: Your climastations table has exceeded MySQL's key size of 1000bytes. Basically, this is the result of specifying the 'Unique' property on one or more fields who's length exceeds 255 chars.
If you remove the unique property from one of your fields or reduce the overall length of fields to be no greater than 255 chars (varchar) then you'll be OK.
Hope it helps and sorry for not spotting the thread earlier!
Gez
|
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The following user(s) said Thank You: admin, dyvel
|
-
JoomGuy
-
-
Offline
-
Moderator
-
-
Joomla Enthusiast, Lover of Cooking
- Posts: 1115
- Thank you received: 195
-
Karma: 64
-
|
Yep:
here are the offending fields: `name` VARCHAR(255) NOT NULL COMMENT '191921' ,
`mac_address` VARCHAR(255) NOT NULL COMMENT '191922'
Basically, these combined with your auto added id field which is unique too would be racjking up 2050 bytes or so...
G
|
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
|
-
dyvel
-
-
Offline
-
Elite Member
-
- Posts: 200
- Thank you received: 11
-
Karma: 10
-
|
I'll have a look later today, but do you believe that explains the j3.2 / j3.0 errors? I can't use 2.5 (won't) for my project. J2.5 was just to test if it would build
|
|
-
dyvel
-
-
Offline
-
Elite Member
-
- Posts: 200
- Thank you received: 11
-
Karma: 10
-
|
I does solve the problem in 2.5 to remove the "unique" attribute or change max length to 254 for the name field. Low and behold if it didn't also fix the issue in 3.2
Damn! Pardon my french
Thank you very much for the help!
|
|
-
JoomGuy
-
-
Offline
-
Moderator
-
-
Joomla Enthusiast, Lover of Cooking
- Posts: 1115
- Thank you received: 195
-
Karma: 64
-
|
Hey @dyvel,
No worries... Yes, I'm 99.9% certain that the reason for the different errors you receive in 3.2 to those in 2.5 is because of how the cook interface works in the 3.2 sandbox. Yes, it is the same problem - MySQL's index length/size restriction.
Cool, glad it worked!
G
|
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
|
-
admin
-
-
Offline
-
Administrator
-
-
Chef
- Posts: 3711
- Thank you received: 987
-
Karma: 140
-
|
Wait... pardon for my english... is it closed ?
I just have checked. It seems to work.
It is really a stupid bug I should fix as soon as possible.
|
Coding is now a piece of cake
|
-
JoomGuy
-
-
Offline
-
Moderator
-
-
Joomla Enthusiast, Lover of Cooking
- Posts: 1115
- Thank you received: 195
-
Karma: 64
-
|
Hey J, how's it going?
Is it the error reporting that you mean you have to fix? If so, I may have 'jumped the gun' and I'm sorry if I marked as closed prematurely!
I marked the ticket closed because we solved it. It is not really a J-Cook problem. It is a MySQL restriction on index size. I realised this was likely the case when I saw the title of the thread as I too, experienced this a while back. So, when I looked at the thread from the beginning, I could see a difference between the error output in J!2.5 & 3.2. When I'd faced these issues, I didn't check it in 2.5 so I'd not had the benefit of seeing the SQL error in the output.
The problem was due to the index size, specifically that one of the tables in the project had 2 varchar fields each with unique indexes, totalling 510 characters, i.e. over 1000b. Solved by reducing the length of the varchar fields.
|
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
|
-
admin
-
-
Offline
-
Administrator
-
-
Chef
- Posts: 3711
- Thank you received: 987
-
Karma: 140
-
|
You are absolutly right.
I simply meant I need to fix in Cook, So the builder does not permit this.
Thanks for your moderation
K++
|
Coding is now a piece of cake
The following user(s) said Thank You: JoomGuy
|
-
JoomGuy
-
-
Offline
-
Moderator
-
-
Joomla Enthusiast, Lover of Cooking
- Posts: 1115
- Thank you received: 195
-
Karma: 64
-
|
It's a pleasure!
|
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
|
-
admin
-
-
Offline
-
Administrator
-
-
Chef
- Posts: 3711
- Thank you received: 987
-
Karma: 140
-
|
This Issue is finaly fixed.
When you define a unique statement in the field properties, the builder show you how many bytes are left.
www.j-cook.pro/index.php/docs/versions/199-2-7
|
Coding is now a piece of cake
|
|