Author Topic: Getting "1054 Unknown column 'STsameAsBT' in 'field list'...  (Read 2296 times)

JDmpdx

  • Beginner
  • *
  • Posts: 5
  • A beginner
Getting "1054 Unknown column 'STsameAsBT' in 'field list'...
« on: September 19, 2018, 21:43:42 pm »
Hi all- 

Basics:  I'm using VM 3.4.0, Joomla 3.8.12, PHP 7.2.8

When people go to "confirm purchase," they are normally redirected to Paypal. But, currently, it just goes to an error page "1054 Unknown column 'STsameAsBT' in 'field list' "

I've tried:  (1) Disabling any HTML overrides ... same problem / didn't fix, (2) disabling a "One Step Checkout for Virtuemart" plugin ... same problem, didn't fix.

Any thoughts on what might be at play here?

tomaa

  • Beginner
  • *
  • Posts: 7
Re: Getting "1054 Unknown column 'STsameAsBT' in 'field list'...
« Reply #1 on: September 20, 2018, 09:01:05 am »
After update to VM 3.4.0 I got the same problem error when trying to change orderstatus from Payed to Shipped.
I need help to.

p.barg

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 165
    • Barg IT
Re: Getting "1054 Unknown column 'STsameAsBT' in 'field list'...
« Reply #2 on: September 20, 2018, 10:16:02 am »
Same problem here (on a test installation) with standard payment.

Leila

  • Beginner
  • *
  • Posts: 23
  • A beginner
    • Интернет магазин Ковровик
  • VirtueMart Version: 3.4.2.
Re: Getting "1054 Unknown column 'STsameAsBT' in 'field list'...
« Reply #3 on: September 20, 2018, 10:36:36 am »
After update to VM 3.4 I have the same problem. Joomla 3.8.12, VM 3.4, PHP 7.2. Besides I get 404 error on product details page when activate customfileds with price. "Call to undefined method VirtueMartModelCustomfields::_getCustomPrice()".

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3014
  • VirtueMart Version: 3.6.3
Re: Getting "1054 Unknown column 'STsameAsBT' in 'field list'...
« Reply #4 on: September 20, 2018, 10:50:26 am »
Looks like your order table has not been updated

Look in virtuemart_orders table

There should be a field STsameAsBT TINYINT default set to 0
regards
A

Joomla 3.9.12
php 7.2

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9972
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Getting "1054 Unknown column 'STsameAsBT' in 'field list'...
« Reply #5 on: September 20, 2018, 11:00:44 am »
Looks like the updater did not update the order table correctly. The order table has now
`STsameAsBT` tinyint(1) NOT NULL DEFAULT '0',

Usually the updater should also update the table structure. So it is interesting to understand, why that did not work in your case.
After update to VM 3.4 I have the same problem. Joomla 3.8.12, VM 3.4, PHP 7.2. Besides I get 404 error on product details page when activate customfileds with price. "Call to undefined method VirtueMartModelCustomfields::_getCustomPrice()".


This is quite likely an outdated template. The function was set to deprecated a year ago (Revision 9639). I must admit this template change slipped through. 

It was
Code: [Select]
$price = VirtueMartModelCustomfields::_getCustomPrice($productCustom->customfield_price, $currency, $calculator);

and is now
Code: [Select]
$price = VirtueMartModelCustomfields::renderCustomfieldPrice($productCustom, $product, $calculator);
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Leila

  • Beginner
  • *
  • Posts: 23
  • A beginner
    • Интернет магазин Ковровик
  • VirtueMart Version: 3.4.2.
Re: Getting "1054 Unknown column 'STsameAsBT' in 'field list'...
« Reply #6 on: September 20, 2018, 11:24:23 am »
Milbo, thank you very much for help. The problem is solved. Will you help me with another similar question? When I save product in backend I have error " Unknown column 'product_canon_category_id' in 'field list'"
Now I understand that I have to add some data to DB, but i dont know where exactly.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9972
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Getting "1054 Unknown column 'STsameAsBT' in 'field list'...
« Reply #7 on: September 20, 2018, 11:39:03 am »
It seems to be the same problem. The table updater is not executed. You should first try todo that manually. Maybe  set your page offline for that time. Maybe you have a lot visitors, so that the db is not properly updated? I dont know, I can just guess.

Please check  http://docs.virtuemart.net/manual/tools-menu/70-tools-migration.html and use "INSTALL TABLES OR IF NECESSARY UPDATE THEM"
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Leila

  • Beginner
  • *
  • Posts: 23
  • A beginner
    • Интернет магазин Ковровик
  • VirtueMart Version: 3.4.2.
Re: Getting "1054 Unknown column 'STsameAsBT' in 'field list'...
« Reply #8 on: September 20, 2018, 12:32:22 pm »
Thank you! Now everything works fine!  :)

JDmpdx

  • Beginner
  • *
  • Posts: 5
  • A beginner
Re: Getting "1054 Unknown column 'STsameAsBT' in 'field list'...
« Reply #9 on: September 20, 2018, 19:41:07 pm »
Yep, that error is no longer present after running the database tool. Thanks!  I believe I have one further issue, but it appears unrelated, so I'll post a sseparate topic, as the fix here seemed to fix things for everyone.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3014
  • VirtueMart Version: 3.6.3
Re: Getting "1054 Unknown column 'STsameAsBT' in 'field list'...
« Reply #10 on: September 21, 2018, 09:45:52 am »
See above for solution
regards
A

Joomla 3.9.12
php 7.2

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9972
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Getting "1054 Unknown column 'STsameAsBT' in 'field list'...
« Reply #11 on: September 24, 2018, 22:26:28 pm »
This is quite likely an outdated template. The function was set to deprecated a year ago (Revision 9639). I must admit this template change slipped through. 

It was
Code: [Select]
$price = VirtueMartModelCustomfields::_getCustomPrice($productCustom->customfield_price, $currency, $calculator);

and is now
Code: [Select]
$price = VirtueMartModelCustomfields::renderCustomfieldPrice($productCustom, $product, $calculator);

This function will be readded in the next release, coming the next days. We also found the reason that the updater did not update the tables properly.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/