Jump to content

Unknown column 'ocr.deleted' in 'where clause'


Donio3d

Recommended Posts

Hey everyone.

I'm working on shop and encountered problem, when accessing specific order, under Orders in backoffice.

For first yes - I'm using custom theme, but they won't provide me support with this. Curious, but in clean local installation everything is working just fine, after importing same products DB.

There is what I see without debug mode:
309487113_Screenshot2021-09-30at13_12_51.thumb.png.3f2c465b52b53fc1fa4cf103c9ecf595.png

Total cost is 45,00zł and none products are visible. Interesting is that, when I click show details and then show cart of guest - I can see products he (me via test) ordered.

Now there's debug screen:
screencapture-merino-sport-admin6131ykk7x-index-php-sell-orders-6575-view-2021-09-30-13_13_02.thumb.png.cdaf41de9f103857d9efaadc0f2b0e23.png

As far as I know there's problem with orders DB. Cart should be all fine, because during checkout everything is perfect.

Some things that may be important:

  • I upgraded Prestashop from 1.7.7.6 to 1.7.7.8 via 1-click upgrade.
  • I imported products from .sql file and overrided tables
    • I did same in test installation, but there everything works fine.
  • Shop is a fresh installation with custom theme.

Yeah, so... Any ideas or at least good direction for searching?
Thanks in advance!

Link to comment
Share on other sites

The field "deleted" was added to this table in Prestashop 1.7.7. That you don't have this field suggests that something went wrong when you did the upgrade. My suggestion is to just add the field with 

ALTER TABLE `PREFIX_order_cart_rule` ADD `deleted` TINYINT(1) UNSIGNED NOT NULL;

And keep your fingers crossed that this was the only thing that went wrong in the upgrade.

Link to comment
Share on other sites

Hey musicmaster! Thanks so much for reply :)

I successfully added row into database. Now I don't have any errors while debuging orders page.
However main problem still occurs. I can't see what the customers ordered. Products displayed = 0, as highlighted in screenshot.

1268748898_Screenshot2021-10-04at12_03_47.thumb.png.c6d390f7781e1ec365cb82767d41e20d.png

Im still interested in fact, that when I click see details of specific customer:
image.png.d77bddcc4508f88a2f71d8ff8e32d390.png

Then head to carts:

image.thumb.png.13fb0e91cbc8a3c5d53f2c63b7eeeeb9.png

and click this cart:

image.thumb.png.d2504ea1920935f526f3b520cbb5c9a7.png

I can actually see the correct order! Anyway it won't fit as workaround, so I still need to fix it somehow.

Any ideas? 😕

Link to comment
Share on other sites

If you look in the file /install/upgrade/sql/1.7.7.0.sql you will see there where a lot more changes with the 1.7.7 upgrade. The character set stuff isn't important but the rest is. Some people succeed by running /install/init.php

BTW. Did you look at the messages of Prestashop's debug bar and in your server's error log?

Link to comment
Share on other sites

I will try to run init.php, but unfortunately I can't find original /install directory. Is it problem if I'll download my current version of Prestashop (1.7.7.8), unzip /install, then upload it via FTP? Then I can try to run init.php.

About debug bar and server log - yes, I looked at it. However I'll do it once more and come back here with informations. I can also attach whole log if it'll help.

Anyway thank you for helping me with this problem.

Link to comment
Share on other sites

Yes, you can copy from a fresh PS copy. However, I am not sure it will work. I heard that it worked for at least one person. But given that you had later upgrades (1.7.7.6->1.7.7.8) there is a good chance that the flags in the system are that everything is up to date. So in that case you might need to check and change things manually.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...