News:

Looking for documentation? Take a look on our wiki

Main Menu

1146 Database error after enabling Amazon Payment plugin

Started by zinco, June 27, 2015, 19:28:31 PM

Previous topic - Next topic

zinco

I have Joomla 3.4.1 installed and installed VirtueMart 3.0.9.

Everything was going great until I decided to enable the Plugin for Amazon payment.  I am not getting the following error and cannot get anywhere in my Joomla or Virtuemart control panel.  Everything I try it gives me the same error.  It has broken my site as well as the admin section.

QuoteAn error has occurred.
1146 Table 'alteredangle.alt_virtuemart_payment_plg_amazon' doesn't exist SQL=SELECT * FROM alt_virtuemart_payment_plg_amazon WHERE ( ( `amazon_class_response_type` LIKE 'OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse' AND `amazon_response_state` IN ( 'Open', 'Suspended') ) OR ( `amazon_class_response_type` LIKE 'OffAmazonPaymentsService_Model_AuthorizeResponse' AND `amazon_response_state` IN ('Pending', 'Open') ) OR ( `amazon_class_response_type` LIKE 'OffAmazonPaymentsService_Model_CaptureResponse' AND `amazon_response_state` IN ('Pending') ) OR ( `amazon_class_response_type` LIKE 'OffAmazonPaymentsService_Model_RefundResponse' AND `amazon_response_state` IN ('Pending') ) ) AND `id` in (SELECT MAX( id ) FROM alt_virtuemart_payment_plg_amazon GROUP BY virtuemart_order_id ) ORDER BY `created_on` DESC

If I knew what table in the database to edit I could disable it but I don't know where.  A search for amazon only brings up country codes when I search in PHPMyAdmin.

Please any help would be greatly appreciated.  I cannot even get to the configuration or anything.

zinco

I found where to disable it in PHPMyadmin but disabling it doesn't seem to help.

Now I am getting this error......

QuoteWarning: require(JPATH_VM_PLUGINSDSvmpsplugin.php): failed to open stream: No such file or directory in /******/*******/b476/pow.****/htdocs/altered-angle/plugins/vmpayment/paypal/paypal.php on line 24 Fatal error: require(): Failed opening required 'JPATH_VM_PLUGINSDSvmpsplugin.php' (include_path='.:/usr/local/lib/php-5.3.13/lib/php') in /******/******/b476/******/htdocs/altered-angle/plugins/vmpayment/paypal/paypal.php on line 24

The files are there.  Could there be a problem with PHP 5.3 on server with VirtueMart?

zinco

Fixed it by going into PHPMyAdmin and disabling the paypal plugin and the amazon plug in in two places.  The amazon plugin has to entries in DB.  A VM one and a System one.  I think the Amazon was messing things up and I did not notice at first it had to entries.

alatak

hello
Thank you for reporting.
I will fix this issue, and i probably need to do it for all plugins.
I now it is a habit from joomla that you enable the plugin in order to be able to use it. But in VM, you don't need to do that.
All plugins can be disabled. They are enabled automatically when you select the payment method, and click on save.
And when clicking on save, then the payment table is created.



[url="//www.alatak.net"]www.alatak.net[/url]
Extensions for VirtueMart: [url=https://alatak.net/en/extensions.html]https://alatak.net/en/extensions.html[/url]

Studio 42

Hi Valerie,
I don't understand why (because now plugin do not suppport old Joomla releases) the plugin use the Virtuemart method to install tables?
This is so simple with Joomla on install to use
Quote<scriptfile>myplugin.script.php</scriptfile>
in xml
and using the predefined Joomla methods.

or using directly .sql file, if plugin is simple

And another advantage, is that you can remove the trigger.

The problem was before Joomla 2.5, because script was not callable on installing a plugin.
Free XML sitemap generator [url="http://shop.st42.fr/en/catalog/products/virtuemart-2-sitemap.htm"]http://shop.st42.fr/en/catalog/products/virtuemart-2-sitemap.htm[/url]  , Free Unused Image cleaner [url="http://shop.st42.fr/en/products/virtuemart-media-folder-clear.htm"]http://shop.st42.fr/en/products/virtuemart-media-folder-clear.htm[/url]
Language Switch in product & category [url="http://shop.st42.fr/en/categories-tools/multi-language-for-virtuemart.htm"]http://shop.st42.fr/en/categories-tools/multi-language-for-virtuemart.htm[/url]
More extentions [url="http://shop.st42.fr/en/"]http://shop.st42.fr/en/[/url]

alatak

Hello

Quoter has occurred.
1146 Table 'alteredangle.alt_virtuemart_payment_plg_amazon' doesn't exist SQL=SELECT * FROM alt_virtuemart_payment_plg_amazon WHERE ( ( `amazon_class_response_type` LIKE 'OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse' AND `amazon_response_state` IN ( 'Open', 'Suspended') ) OR ( `amazon_class_response_type` LIKE 'OffAmazonPaymentsService_Model_AuthorizeResponse' AND `amazon_response_state` IN ('Pending', 'Open') ) OR ( `amazon_class_response_type` LIKE 'OffAmazonPaymentsService_Model_CaptureResponse' AND `amazon_response_state` IN ('Pending') ) OR ( `amazon_class_response_type` LIKE 'OffAmazonPaymentsService_Model_RefundResponse' AND `amazon_response_state` IN ('Pending') ) ) AND `id` in (SELECT MAX( id ) FROM alt_virtuemart_payment_plg_amazon GROUP BY virtuemart_order_id ) ORDER BY `created_on` DESC

this problem has been fixed.


QuoteWarning: require(JPATH_VM_PLUGINSDSvmpsplugin.php): failed to open stream: No such file or directory in /******/*******/b476/pow.****/htdocs/altered-angle/plugins/vmpayment/paypal/paypal.php on line 24 Fatal error: require(): Failed opening required 'JPATH_VM_PLUGINSDSvmpsplugin.php' (include_path='.:/usr/local/lib/php-5.3.13/lib/php') in /******/******/b476/******/htdocs/altered-angle/plugins/vmpayment/paypal/paypal.php on line 24

it should have been fixed too

QuoteI think the Amazon was messing things up and I did not notice at first it had to entries.
yes.. actually that system plugin should not be enabled if the amazon payment plugin is not used.


QuoteI don't understand why (because now plugin do not suppport old Joomla releases) the plugin use the Virtuemart method to install tables?
i don't understand what you wrote patrick
we do it the way it has always been done. The payment tables are only created if a payment is created.
I think that  zinco published the amazon system plugin, and not the payment one
and the amazon system plugin is used to retreive for IPNs in case of amazon, and in case the merchant do not have HTTPS (which is a requirement in case of amazon), and that he cannot set up a cron.
[url="//www.alatak.net"]www.alatak.net[/url]
Extensions for VirtueMart: [url=https://alatak.net/en/extensions.html]https://alatak.net/en/extensions.html[/url]

mgworld

I have a similar problem, after enabling a payment with 'VM Payment - Realex HPP & API'. I have the following error every time I enter in the "Shop" section in the backend (virtuemart 3.0.9 / joomla 3.4.3):

An error has occurred.
    1146 Table 'my_db.jos_virtuemart_userfield_plg_realex_hpp_api' doesn't exist SQL=SELECT * FROM `jos_virtuemart_userfield_plg_realex_hpp_api` WHERE `virtuemart_user_id` = "516" ORDER BY `modified_on` DESC

How can I solve now?

Studio 42

Hi,
FOR REALEX plugin
If you only enable it on Joomla, then go to:
YOURSITE/administrator/index.php?option=com_virtuemart&view=userfields&task=edit
>Select the realex plugin in the top list
>add the name and title
>Save

IF you have do this and does not work,  try to add the table with phpmyadmin
mysql  query to execute:

CREATE TABLE IF NOT EXISTS `jos_virtuemart_userfield_plg_realex_hpp_api` (
  `id` int(1) unsigned NOT NULL AUTO_INCREMENT,
  `virtuemart_user_id` int(1) unsigned NOT NULL,
  `merchant_id` varchar(128),
  `realex_hpp_api_saved_pmt_type` varchar(20),
  `realex_hpp_api_saved_pmt_ref` char(50),
  `realex_hpp_api_saved_pmt_digits` varchar(128),
  `realex_hpp_api_saved_pmt_expdate` varchar(16),
  `realex_hpp_api_saved_pmt_name` char(255),
  `created_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `created_by` int(11) NOT NULL DEFAULT '0',
  `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `modified_by` int(11) NOT NULL DEFAULT '0',
  `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `locked_by` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='realex userfield Table' ;


Perhaps valerie or max know why, i don't want investigate the full code.
Free XML sitemap generator [url="http://shop.st42.fr/en/catalog/products/virtuemart-2-sitemap.htm"]http://shop.st42.fr/en/catalog/products/virtuemart-2-sitemap.htm[/url]  , Free Unused Image cleaner [url="http://shop.st42.fr/en/products/virtuemart-media-folder-clear.htm"]http://shop.st42.fr/en/products/virtuemart-media-folder-clear.htm[/url]
Language Switch in product & category [url="http://shop.st42.fr/en/categories-tools/multi-language-for-virtuemart.htm"]http://shop.st42.fr/en/categories-tools/multi-language-for-virtuemart.htm[/url]
More extentions [url="http://shop.st42.fr/en/"]http://shop.st42.fr/en/[/url]

mgworld

Hi, thanks Studio 42. Adding that field didn't work, but I discovered that there was another shopper field published (I didn't publish it, I don't know why it was published... Maybe it was published automatically after creating the new payment method) named "realex_hpp_api". I unpublished this field and now I'm able to enter in the Shop section again. :)