SOLVED: Problem with id element - list unaccessable

Status
Not open for further replies.

juuser

Well-Known Member
Hello,

I have a problem with couple of my lists. After changing "order by" settings and saving the list, the following error message is displayed.

1054 Unknown column '4980' in 'prefix_tootmisseadmed_hooldusplaan' SQL=ALTER TABLE `prefix_tootmisseadmed_hooldusplaan` CHANGE `4980` `4980` int(11) NOT NULL

Also lists data comes unaccessable after that. Tried changing another list settings also in my local site and the same happens again.

When i look into phpmyadmin, the list tables id element is not AUTO_INCREMENT anymore. When manually changin it back, list is still unaccessable.

In my test site the list name is "Seadmete hoolduspaan". Please help!

Thanks,
Martin
 
I can't replicate this, so I'll need to get at your system, but as Troester says, it looks like the login has been changed. I can't get past the initial "white page with just a login prompt" stage.

FireShot Pro Screen Capture #010 - 'Avaleht' - www_flexcom_ee.png
-- hugh
 
Sorry, I mirrored my main site and forgot to add usergroups to the admin user. Now it should be ok.
 
In your list "Seadmete hooldusplaan" you have no primary key selected (and autoincrement is set to NO).
Try with setting the correct values there.
The column name in your error is the element id (4980) of your internalid element (which should be set as PK element).

BTW: you still have a bunch of unpublished elements without name/label/group
 
Thanks Troester, I think i forgot to set these setting back to their original state when i was playin with these after the problem started. Changed them back now, but that doesn't solve the issue :(
I'll look into these unpublished elements. Strange as i just cleared these a while ago.
 
After your change I can see no problem to access the list data in the backend, it's displaying correctly.
But if I try to change the order by from asc to desc I get
1075 Incorrect table definition; there can be only one auto column and it must be defined as a key SQL=ALTER TABLE `plastone_tootmisseadmed_hooldusplaan` CHANGE `id` `id` int(11) NOT NULL AUTO_INCREMENT

Did you change any primary key/ set a column to autoincrement directly in phpMyAdmin?
 
Hi Troesetr, I changed id column to AUTO_INCREMENT in PhpMyadmin after it was removed by Fabrik.

..and yes, this site is a test site, so you can mess with it as much as needed :)
 
I think I've fixed it on your site, I did:
set "Alter field types"= no
save --> will show error message "...only one auto column..", ignore it
check that id is selected as primary key and autoincrement
save --> no error
reset "Alter field types" to "global"
save again --> no error
change your order by --> no problem

@Hugh: but this doesn't explain why the PK and autoincrement had vanished before. Maybe some JS loading problem?
 
Unfortunately this did not help in my local site .Tried twice step by step according to your instruction.
Final result is that ion PhpMyadmin, id column still has no AUTO-INCEREMENT and the list shows
mysql error message mentioned above :(
 
Check the id element itself.
Does it have set its name correctly, the correct plugin type (internalid) etc.?
 
Unfortunately no. After settin AUTO_INCREMENT in PhpMyAdmin and editing / saving list i get the same error "1054 Unknown column '4980'..."
and the list is still not accessable :(
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top