1054 Unknown Column file_pos

  • Posts: 14
  • Thank you received: 0
10 years 3 months ago #165204

-- url of the page with the problem -- : www.peteshardwoodfloors.com/Shop-for-Pro...Online/checkout.html
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.1
-- PHP version -- : 5.4.30
-- Browser(s) name and version -- : Chrome
-- Error-message(debug-mod must be tuned on) -- :
1054 - Unknown column 'file_pos' in 'order clause' SQL=SELECT b.*,a.* FROM jml_hikashop_file AS a LEFT JOIN jml_hikashop_download AS b ON b.order_id=45 AND a.file_id = b.file_id WHERE a.file_ref_id IN (1) AND a.file_type='file' ORDER BY file_ref_id ASC, file_ordering, file_pos ASC

Whenever you try and order anything from the site since upgrading Hikashop, I get this error. That column shouldn't even exist in the DB so I have no idea why it is there. I can email any credential you want, just get me an address. I don't know how to fix this though, please help

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 3 months ago #165208

Hello,
1. Can you download the last Hikashop version through our website, manually install it (extension manager), and test it again ?

2. Also, checking that documentation will probably help you : www.hikashop.com/support/support/documen...lity-issues.html#SQL

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
10 years 3 months ago #165331

That is what I did. I tried the latest version. I also read that doc, and it doesn't help.

Look at the error

1054 - Unknown column 'file_pos'

To truly test, I did a fresh install on a blank site. There is no column named that that is supposed to be there. How can I fix?

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 3 months ago #165339

Hi,

Please edit the file "administrator/components/com_hikashop/classes/order.php" and replace

$query = 'SELECT b.*,a.* FROM '.hikashop_table('file').' AS a LEFT JOIN '.hikashop_table('download').' AS b ON b.order_id='.$order->order_id.' AND a.file_id = b.file_id WHERE '.implode(' AND ',$filters).' ORDER BY file_ref_id ASC, file_ordering, file_pos ASC';
By
$query = 'SELECT b.*,a.* FROM '.hikashop_table('file').' AS a LEFT JOIN '.hikashop_table('download').' AS b ON b.order_id='.$order->order_id.' AND a.file_id = b.file_id WHERE '.implode(' AND ',$filters).' ORDER BY a.file_ref_id ASC, a.file_ordering ASC, b.file_pos ASC';

And please check that your table "hikashop_download" right contain a column named "file_pos".

HikaShop 2.3.2 now contain a new feature called "database check", the button is available in the HikaShop configuration toolbar. This feature can help you to create the missing columns in the tables (if you had problems during an HikaShop update).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
10 years 3 months ago #165450

Thank you. That did the trick

Please Log in or Create an account to join the conversation.

Time to create page: 0.069 seconds
Powered by Kunena Forum