Rowby Goren
asked on
Unable to save a table in Mysql
Hello,
I am trying to figure out why my Joomla Content Management system is not saving a table.
I am not having a problem saving anything else, except for this issue. I am not an expert at all in mysql so I am not sure how much help I can be to you in troubleshooting the issue.
But let's try.
First the error:
I turned on Debugging in the content management system so I am hoping it will be of help. Attached is a copy and paste of the debugging.
I am able to use phpmyadmin but am not sure where to look to make the fixes.
I of course have a backup of everything, and the site is not live. So maybe with your expert help we can arrive at a solution.
I did a google search and on one forum I found this snippet which may or may not apply in this case: "Indeed, that is causing this error. The 258 definitons of the table lacks column "language" which is why you get an error."
The link to the forum page regarding the above is at this link: Link to joomla forum
:
Thanks,
Rowby
debug.txt
I am trying to figure out why my Joomla Content Management system is not saving a table.
I am not having a problem saving anything else, except for this issue. I am not an expert at all in mysql so I am not sure how much help I can be to you in troubleshooting the issue.
But let's try.
First the error:
Error
Save failed with the following error: SQL=INSERT INTO bcio_modules_menu (moduleid, menuid) VALUES (185,0),(185,484),(185,388),(185,0),(185,244),(185,0),(185,407),(185,251),(185,134),(185,0)
I turned on Debugging in the content management system so I am hoping it will be of help. Attached is a copy and paste of the debugging.
I am able to use phpmyadmin but am not sure where to look to make the fixes.
I of course have a backup of everything, and the site is not live. So maybe with your expert help we can arrive at a solution.
I did a google search and on one forum I found this snippet which may or may not apply in this case: "Indeed, that is causing this error. The 258 definitons of the table lacks column "language" which is why you get an error."
The link to the forum page regarding the above is at this link: Link to joomla forum
:
Thanks,
Rowby
debug.txt
Can you show the structure of the table? Is there any chance that moduleid is a primary key?
ASKER
Hi yodercm,
Thanks for helping.
I can do a screen capture of the table. Or I could export something. I'll see if I can do the screen capture.
BTW here is some server info:
Thanks for helping.
I can do a screen capture of the table. Or I could export something. I'll see if I can do the screen capture.
BTW here is some server info:
PHP Built On Linux enclave.websitewelcome.com 3.2.45 #1 SMP Tue May 14 10:21:52 CDT 2013 x86_64
Database Version 5.5.23-55
Database Collation utf8_general_ci
PHP Version 5.3.26
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 3.1.1 Stable [ Ember ] 26-April-2013 14:00 GMT
Joomla! Platform Version Joomla Platform 12.2.0 Stable [ Neil Armstrong ] 21-September-2012 00:00 GMT
User Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0
ASKER
Hi
Here's an export of the table that I assume is having the problem.
I have to be gone for a few hours but will return :)
Thanks
Rowby
Here's an export of the table that I assume is having the problem.
I have to be gone for a few hours but will return :)
Thanks
Rowby
Hmmmm, where?
ASKER
Sorry, here it is.
bcio-menu.sql
bcio-menu.sql
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Ooops, I sent the wrong mysql file. Also here is a screen capture that might help.
experts-exchange-capture.png
bcio-modules-menu.sql
experts-exchange-capture.png
bcio-modules-menu.sql
Here is your problem:
PRIMARY KEY (`moduleid`,`menuid`)
and your failing query:
INSERT INTO bcio_modules_menu (moduleid, menuid) VALUES (185,0),(185,484),(185,388 ),(185,0), (185,244), (185,0),(1 85,407),(1 85,251),(1 85,134),(1 85,0)
is attempting to insert rows with (185,0) more than once. Since these fields are Primary Key fields, you can only have one row with each combination.
When I created your table and tried this INSERT, I got the message:
Duplicate entry '185-0' for key 1
I don't know much about joomla, but see if you can figure out how to make it give you the full MySQL error messages.
PRIMARY KEY (`moduleid`,`menuid`)
and your failing query:
INSERT INTO bcio_modules_menu (moduleid, menuid) VALUES (185,0),(185,484),(185,388
is attempting to insert rows with (185,0) more than once. Since these fields are Primary Key fields, you can only have one row with each combination.
When I created your table and tried this INSERT, I got the message:
Duplicate entry '185-0' for key 1
I don't know much about joomla, but see if you can figure out how to make it give you the full MySQL error messages.
ASKER
Hi
I turned on all of joomla's built in de-bugging as possible.
I copied it all to the attached.
Rowby
database-debug.txt
I turned on all of joomla's built in de-bugging as possible.
I copied it all to the attached.
Rowby
database-debug.txt
Well, the duplicate key is the MySQL problem with that query. If Joomla can't tell you that, I have a hard time understanding how they expect you to debug it.
ASKER
Hi
As a test I put up a brand new site. It's a clean install of Joomla. -- and took a look at it in phpmyadmin.
I did a screen capture and an export of the structure. Perhaps you can see if there are any differences between the old site and the clean installed site.
I also attached a copy of the new site's mysql debug
Rowby
new-site.jpg
joom-menu-types--new-site-.sql
newsite-mysql-debug.txt
As a test I put up a brand new site. It's a clean install of Joomla. -- and took a look at it in phpmyadmin.
I did a screen capture and an export of the structure. Perhaps you can see if there are any differences between the old site and the clean installed site.
I also attached a copy of the new site's mysql debug
Rowby
new-site.jpg
joom-menu-types--new-site-.sql
newsite-mysql-debug.txt
ASKER
p.s. in tbe clean install site I don't get the error when saving the item.
I'm sorry, I am an expert in MySQL, but I know almost nothing about Joomla. I cannot believe that even a new clean installation would allow you to INSERT duplicate keys, though.
ASKER
Hi
Let's keep this question open. I'll continue to do some "troubleshooting" and see what I can come up with.
Rowby
Let's keep this question open. I'll continue to do some "troubleshooting" and see what I can come up with.
Rowby
Actually, since no one but me has answered, I'd suggest you close this question and open a new one on Joomla debugging and error messages, and put it in a category where Joomla experts are more common.
ASKER
Good idea.
ASKER
Thanks for point out where the issue is.
I'll be updating this on a Joomla ee section
Rowby
I'll be updating this on a Joomla ee section
Rowby