Forums / Setup & design / [SOLVED] Contentclass Attributes missing!

[SOLVED] Contentclass Attributes missing!

Author Message

Nathan Kelly

Tuesday 06 February 2007 7:41:18 pm

Hi All,

I have made some changes to my user class, basically I've added a number of new attributes like country, state, city and also a number of optional surveys for internal user like gender, age etc..

My user class now has 21 attributes, when I view the class in the admin area (<sitename>_admin/class/view/4) All of my attributes are present, they are also present when editing the class.

However when I go to the User Accounts section to edit a user the last 3 attributes are missing, all of which are checkbox datatypes. I have added an extra text line attribute just to test and it is also missing from the user/edit form.

Additionally if I create a new user all of the attributes are present, this only seems to be affecting my existing users. I have done all of the normal debugging procedures and cleared cache etc.. but nothing seems to be wrong according to the system.

Does anyone know why this might have happened? I'm assuming the database may not have been updated properly? If that is the case is there a way to update it manually or is that just asking for trouble?

Any ideas appreciated.

Cheers!

Pardon me while I burst into flames...

Nathan Kelly

Tuesday 06 February 2007 8:27:53 pm

Solved, The database connection was interrupted when I added my new attributes so only some of the new attributes were added. I had to manually edit the database to reset everything and now it's working fine.

Not fun when the DB connection fails in the middle of a big transaction.

Pardon me while I burst into flames...

Bruce Morrison

Tuesday 06 February 2007 9:29:37 pm

Hiya Nathan

Using the InnoDB storage engine and eZ transaction support should eliminate these issues.

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Nathan Kelly

Tuesday 06 February 2007 10:07:55 pm

Yeh, I don't know what happened but when I looked through the database some users had more values than others, but none of the existing users had all of the new attributes so you could literally see where the transaction stopped.

I have to tell you it had my blood pressure up for a minute, but after some tweaking I managed to resolve it, basically I removed the ghost entries from the contentclass_attributes table and the rest of the database seemed to sort itself out.

I''l keep in mind from now on that if I'm adding a large amount of attributes it might be safer to do so in smaller chunks.

Cheers!

Pardon me while I burst into flames...

SA SQLI

Thursday 08 February 2007 2:31:41 am

Hi,

I have the same problem, my user class has 30 attributes and I have deleted 5 of them.
The update process has crashed in the middle of the execution and now ez has some troubles.

The edit mode of the user class is correct (the 5 deleted attributes does not appear)
The edit mode of the user class is incorrect (the 5 deleted attributes always appear)
When I edit a new user, I always see all attributes including my 5 deleted attributes.
When I look my contentclass attributes, my 5 attributes does not appear in my new version user class.

What is wrong ? some ideas ?
What I have to do to restore my configuration without reload my database ?
What I have to check ?

Thanks for your help.
Johann

Claudia Kosny

Thursday 08 February 2007 3:38:58 am

Hi there

It sounds like Nathan might be able to help you to clean up your database manually.

If you know a bit of PHP and the way eZ works you can also adapt this script:
http://ez.no/community/contribs/hacks/update_class_from_command_line

to suit your needs. I once solved a problem quite similar to yours with it (although I had to fiddle around with a bit as I did not have a temporary class definition).

Good luck

Claudia