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

vault_payment_token_order_payment_link' doesn't exist #5714

Closed
pstoute opened this issue Jul 20, 2016 · 10 comments
Closed

vault_payment_token_order_payment_link' doesn't exist #5714

pstoute opened this issue Jul 20, 2016 · 10 comments
Assignees
Labels
bug report Component: Payment Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@pstoute
Copy link

pstoute commented Jul 20, 2016

Steps to reproduce

  1. Install Magento from zip or composer
  2. set up braintree payment method
  3. add product to cart
  4. checkout
  5. enter credit card for payment
  6. place order.

Expected result

  1. Braintree to process payment and Magento order generated

Actual result

  1. Braintree processes payment
  2. Magento Error "Could not process order. Try again later"
    2a. Debug Data:
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'table.vault_payment_token_order_payment_link' doesn't exist, query was: SELECTvault_payment_token_order_payment_link.* FROMvault_payment_token_order_payment_linkWHERE (order_payment_id = 23) AND (payment_token_id =7)SQLSTATE[42S02]: Base table or view not found: 1146 Table 'table.vault_payment_token_order_payment_link' doesn't exist, query was: SELECTvault_payment_token_order_payment_link.* FROMvault_payment_token_order_payment_linkWHERE (order_payment_id = 24) AND (payment_token_id =8)

Notes

The error message states that the table is missing, however it's not including the table prefix for this query. There should be table.mg1_vault... not just table.vault...

@pstoute
Copy link
Author

pstoute commented Jul 20, 2016

got this "fixed" well, hacked to work for us... it seems that /vendor/magento/module-vault/Setup/InstallScheme.php doesn't utilize the install's table prefix.

Hacked lines (21-23):

 const PAYMENT_TOKEN_TABLE = 'mg1_vault_payment_token';

    const ORDER_PAYMENT_TO_PAYMENT_TOKEN_TABLE = 'mg1_vault_payment_token_order_payment_link';

@pstoute
Copy link
Author

pstoute commented Jul 20, 2016

This doesn't resolve the issue on the admin create order area though. Just client side.

@YevSent
Copy link
Contributor

YevSent commented Jul 21, 2016

Try to reinstall Magento, seems to \Magento\Vault\Setup\InstallSchema didn't run.

@pstoute
Copy link
Author

pstoute commented Jul 21, 2016

@joni-jones I installed a fresh copy on our server to be sure the install went through successfully and the second install had the same errors.

Installed the second copy from the .tar.gz and the web installer.

Is there a way to run just that section? everything else seems to function perfectly.

@YevSent
Copy link
Contributor

YevSent commented Jul 21, 2016

Do you try to install 2.1 version or develop? On the installation step, did you use table prefixes? If, yes, try to install without them.

@pstoute
Copy link
Author

pstoute commented Jul 21, 2016

2.1
I've tried the following two files. Not including the original install from before this latest update... the original install took place back on 06/23/2016 but the main install was without the sample data.

Magento-CE-2.1.0_sample_data-2016-06-23-02-32-34.tar.gz
Magento-CE-2.1.0_sample_data-2016-06-23-02-32-34.zip

@YevSent
Copy link
Contributor

YevSent commented Aug 3, 2016

Created internal ticket MAGETWO-56344.

@YevSent YevSent added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Aug 3, 2016
@vkorotun vkorotun removed the CS label Aug 4, 2016
@pstoute
Copy link
Author

pstoute commented Aug 23, 2016

Not to be pushy, but do we have an ETA on this update as of yet?

@pstoute
Copy link
Author

pstoute commented Aug 23, 2016

More data on this bug... it seems that if you're using a cPanel server, one that requires a table prefix, the installation for this payment method will fail because it's not currently allowing the use of table prefixes.

If we install this on another server that doesn't require table prefixes, my guess is that it'll work without any modification to the core code.

@alena-marchenko
Copy link

Hi @pstoute

Fix for MAGETWO-56344 ticket is already merged to develop branch.
Closing the issue, please feel free to reopen if the issue still reproducible for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: Payment Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

6 participants