Author Topic: Error 1054 - Cannot acces Orders page anymore  (Read 433 times)

radionome

  • Beginner
  • *
  • Posts: 3
  • A beginner
Error 1054 - Cannot acces Orders page anymore
« on: January 16, 2019, 06:58:46 am »
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

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3714
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Error 1054 - Cannot acces Orders page anymore
« Reply #1 on: January 16, 2019, 11:08:32 am »
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

  • Beginner
  • *
  • Posts: 3
  • A beginner
Re: Error 1054 - Cannot acces Orders page anymore
« Reply #2 on: January 16, 2019, 18:49:47 pm »
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

  • Beginner
  • *
  • Posts: 3
  • A beginner
Re: Error 1054 - Cannot acces Orders page anymore
« Reply #3 on: January 16, 2019, 21:15:19 pm »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8834
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Error 1054 - Cannot acces Orders page anymore
« Reply #4 on: January 16, 2019, 23:06:49 pm »
Quote
Quite 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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3714
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Error 1054 - Cannot acces Orders page anymore
« Reply #5 on: January 17, 2019, 01:01:26 am »
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.