SilverCart Forum

We moderate this Forum and we're here to help. Have you already run a forum search to check if your problem has already been solved?

You can help us helping you by providing detailed error messages, screenshots and logfile entries.

SebastianRamon

Page: 1 , 2 , 3 , 4 , 5
Topic Install Error :: Unknown column 'Member.Salutation' in 'field list' 12378 Views

Re: Install Error :: Unknown column 'Member.Salutation' in 'field list'

18 May 2011 at 5:55pm

Hello Terry,

we just released SilverCart version 1.0 RC2 which fixes this bug.

You can download it at "http://code.silvercart.org/silvercart/downloads".

Here's a brief explanation of what caused the error:

The problem was a call to the method "Member::currentUser()" in the constructor of the class "SilvercartShoppingCart". The method "currentUser()" fires a SQL query to gather all data of the current user from the database.
Since we decorate Silverstripes' "Member" object with the class "SilvercartCustomerRole" the query tries to read all the additional fields defined in "SilvercartCustomerRole".
On the first installation of the SilverCart module those additional fields are not yet written to the database, still the manifest builder already has knowledge of the fields via the decorator. That results in "Member::currentUser()" trying to read fields that are not present in the "Member" table, what caused the error message you got.

The error didn't occur on our installations on Linux and MacOS X operating systems. We could reproduce them reliably on Windows XP and 7 systems though. We assume that this behaviour originates from the way the different operating systems handle the order in which files are executed.

Our solution to this problem is a new static method "isInstallationCompleted" in the "SilvercartConfig" class. We call this method in the "SilvercartShoppingCart" constructor so that the call to "Member::currentUser()" gets executed only when the SilverCart installation is complete.

Greetings,
Sascha

Re: Install Error :: Unknown column 'Member.Salutation' in 'field list'

18 May 2011 at 6:09pm

Thank you all (Ramon, Roland and Sascha) for working so diligently on this! I will be testing this out on my Windows machines today and will give feedback as soon as I have a successful install!

Most excellent! and I am very excited!

-Terry

Re: Install Error :: Unknown column 'Member.Salutation' in 'field list'

19 May 2011 at 12:27am

Send me a tab....I owe you guys some beers!!! Oh wait, you Germans can put some beer away...just like the Irish! Maybe a couple each! ;)

It works now, even on my local Windows machine. Don't make too much fun of the fact that I still use windows!!! (I have a full time job writing ASP.NET/C#, but freelance on the side and in the evenings.)

Thanks again for getting this fixed. I guess these two threads can be marked as SOLVED if you want.

-Terry