News:

Support the VirtueMart project and become a member

Main Menu

Error 1054 - Cannot acces Orders page anymore

Started by radionome, January 16, 2019, 06:58:46 AM

Previous topic - Next topic

radionome

Hi,
after (way too) many hours looking for a solution, I decided to post here, even if that problem has already been adressed ; I couldn't fix it myself.

After deleting a few Shopper Fields from VirtueMart (just updated to 3.4.2) on Joomla (3.9.2), I found myself prevented from accessing the Orders tab in VM with the following error message : Unknown column 'u.company' in 'field list'.
So I read a lotta topics on the internet and - being a french speaker and knowing only little on SQL databases - I think I understood that I need to replace the deleted column named u.company im my DB because some Registered Shopper (me) is calling on that value while the entry does not exist anymore. Correct?

What I did :
- try using the 'Install or if necessary update tables' tool
> tool operates but problem persists
- Browsing in MySQL to #_virtuemart_userinfos, I deleted the value of that u.company field/tried to set it to NULL/ Deleted the_DELETED fields from DB.
- Used the method posted by Jenkin Hill, downloading fresh files from here : http://dev.virtuemart.net/attachments/download/1143/com_virtuemart.3.4.2.9966.zip and sending a request from install_essential_data
> the SQL request couldn't go through though the named table does exist (screenshot)
- Created manually a column named u.company in #_virtuemart_userfields and #_virtuemart_userinfos  (screenshot2)

I still cannot access my Orders tab. I just don't want to lose every item I created in my shop, and here I don't know what to do to resolve this issue.

Any help is welcome.
Thanks.

Simon

Studio 42

You need to add or remove the field in your virtuemart_order_userinfos table too.
The field name in virtuemart_userfields table  have to exist in virtuemart_order_userinfos and virtuemart_userinfos tables.

radionome

#2
Ok, so I created a 'u.company' field in
- virtuemart_order_userinfos
- virtuemart_userinfos
- virtuemart_userfields
> Error still here.

So I deleted those 3 fields, deleted all my Orders and all my Users.
> Error still here.

Please help!

EDIT: Maybe I shouldn't have done that because it seems like my Joomla credentials to login into my website are now wiped.... Can't acces my website anymore...
Quite unbelievable the trouble caused by a shopper field deleted....

EDIT2: I managed to create a new administrator user through my DB. Back to the original problem.

radionome

Well, I'm not the kind that give up, so.... I resolved the problem.

I did 2 things in the same session so I don't know which one worked:

1: deleted 2 empty fields in #_virtuemart_userfield_values
2: changed the name of the 'u.company' fields I created in virtuemart_order_userinfos, virtuemart_userinfos and virtuemart_userfields to 'company'.

I can access my Orders page again.

Thanks. Let's hope this thread will help someone someday.

GJC Web Design

QuoteQuite unbelievable the trouble caused by a shopper field deleted....

this is why when you "delete" the field you must do it via the admin interface so the scripts know what fields to expect .. you will see it just gets renamed
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Studio 42

u.company is when you access the database and not an existing field.
u. is the prefix to get field from the right table (virtuemart userinfo table alias in this case) in the mysql query.
Vm/Joomla never set a field with a prefix in the field name.