Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regarding 33047 - Issue with missing id_employee in ps_order_payment table #33108

Closed
2 tasks done
Johnnyx2010 opened this issue Jul 5, 2023 · 13 comments · Fixed by PrestaShop/autoupgrade#595
Closed
2 tasks done
Assignees
Labels
8.0.0 Affected versions Autoupgrade Module: autoupgrade Bug Type: Bug CO Category: Core Module Module Topwatchers Backlog prioritization: issue reported & followed by +6 people

Comments

@Johnnyx2010
Copy link

Prerequisites

Describe the bug and add attachments

I'm logging this here as it was previously logged at 33047. However its unclear was this ticket closed due the poster finding a solution via a manual entry in the db or was this logged as a fix todo at the upgrade level.
On a PS 1.7 there is no id_employee field. So when we upgrade to ps8 this field isn't present. This field needs to be part of the upgrade script as is important as third party modules can use this table.

Expected behavior

id_employee to be added on ps_order_payment table via an upgrade script from 1.7 to PS 8

Steps to reproduce

Upgrade existing PS 1.7 to PS 8 - check for the id_employee field its missing in ps_order_payment table. Clean install of PS8 has this field in the table

PrestaShop version(s) where the bug happened

8

PHP version(s) where the bug happened

8.1

If your bug is related to a module, specify its name and its version

upgrade script

Your company or customer's name goes here (if applicable).

NA

@Johnnyx2010 Johnnyx2010 added Bug Type: Bug New New issue not yet processed by QA labels Jul 5, 2023
@florine2623
Copy link
Contributor

Hello @Johnnyx2010 ,

Could you specify the exact version of PrestaShop before your upgrade ?
As well as send a screenshot of your error ?

The previous issue was closed because it couldn't be reproduced : #33047 (comment)

Waiting for your feedback^^

@florine2623 florine2623 added Waiting for author Status: action required, waiting for author feedback NMI Status: issue needs more information Autoupgrade Module: autoupgrade CO Category: Core 8.0.0 Affected versions and removed New New issue not yet processed by QA labels Jul 5, 2023
@Johnnyx2010
Copy link
Author

its ps 1.7.8.9.
upgrade it to straight to 8.1
Have a look at https://github.com/PrestaShop/PrestaShop/blob/1.7.8.x/install-dev/data/db_structure.sql - there's no mention of the field here
https://github.com/PrestaShop/PrestaShop/blob/8.1.x/install-dev/data/db_structure.sql - line 1594 the field is added

@prestashop-issue-bot prestashop-issue-bot bot removed the Waiting for author Status: action required, waiting for author feedback label Jul 5, 2023
@BenTen
Copy link

BenTen commented Jul 5, 2023

It's a recent update of the structure. It does not exist before 8.1

@okom3pom said "Don't forget autoupgrade."
#28820 (review)

As well as send a screenshot of your error ?

It is an issue with autoupgrade who doesn't update this table.
https://github.com/PrestaShop/autoupgrade/blob/dev/upgrade/sql/8.1.0.sql

Screenshot 2023-07-06 at 05-37-53 Add employee info on the Payments tab when payment is registered by Progi1984 · Pull Request #28820 · PrestaShop_PrestaShop

@aniszr
Copy link

aniszr commented Jul 7, 2023

Hello,

Thanks for reporting this issue!
Ping @PrestaShop/prestashop-core-developers: Could someone please try to reproduce the issue, it's too technical!

Thanks in advance!

@hibatallahAouadni hibatallahAouadni added TBR Status: issue to be reproduced Waiting for dev Status: action required, waiting for tech feedback Module Module and removed NMI Status: issue needs more information labels Jul 7, 2023
@kpodemski
Copy link
Contributor

I can confirm this issue.

@kpodemski kpodemski added Ready Status: Issue is ready to be worked on and removed Waiting for dev Status: action required, waiting for tech feedback TBR Status: issue to be reproduced labels Jul 8, 2023
@kpodemski
Copy link
Contributor

@MatShir @RosaBenouamer @Zoefinders @fabienvallon

The important, easy solvable issue for the autoupgrade module.

@ocio87
Copy link

ocio87 commented Jul 10, 2023

I add the following Bug that was closed that is associated with the same problem:

#33118

By having an initial state checking boxes where it is reported that it was paid, it throws an error 500.

In addition to adding a payment in orders orders. It fails to add the payment and the ps_order_payment table fails to insert rows.

image

Please check if they are independent issues and leave the Bug that I reported as a duplicate.

@BenTen
Copy link

BenTen commented Jul 10, 2023

@ocio87

You have to do that
#33047 (comment)

or ask someone or wait the update.

@FlyMeFR
Copy link

FlyMeFR commented Jul 10, 2023

Thanks a lot, it worked !

@prestashop-issue-bot prestashop-issue-bot bot added the Topwatchers Backlog prioritization: issue reported & followed by +6 people label Jul 10, 2023
@ocio87
Copy link

ocio87 commented Jul 10, 2023

@ocio87

You have to do that #33047 (comment)

or ask someone or wait the update.

Thanks, if it worked with the change.

Does this change not affect future updates where prestashop includes this field?

@LuigiMdg
Copy link

Same problem here, ok that just add the column and it works, but the point of this column?
No value is recorded in it.

@ocio87
Copy link

ocio87 commented Jul 13, 2023

when payment is added from orders, it shows the employee who made the deposit.

@prestashop-issue-bot prestashop-issue-bot bot removed the Ready Status: Issue is ready to be worked on label Jul 14, 2023
@Hlavtox
Copy link
Contributor

Hlavtox commented Jul 14, 2023

Issue will be resolved after release of new version of autoupgrade module.
For existing upgrades, you can fix the issue permanently by running this SQL.

ALTER TABLE `ps_order_payment` ADD `id_employee` INT NULL AFTER `date_add`;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.0.0 Affected versions Autoupgrade Module: autoupgrade Bug Type: Bug CO Category: Core Module Module Topwatchers Backlog prioritization: issue reported & followed by +6 people
Projects
None yet
Development

Successfully merging a pull request may close this issue.