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

ActionView::Template::Error (Mysql2::Error: Unknown column 'spree_promotion_rules.tenant_id' in 'where clause': SELECT spree_product_promotion_rules.* FROM spree_product_promotion_rules WHERE spree_promotion_rules.tenant_id = 3 AND spree_product_promotion_rules.product_id IN (18, 19)): #19

Open
mezbahalam opened this issue Jan 23, 2017 · 0 comments

Comments

@mezbahalam
Copy link

i'm getting this error, is there any way to use this with spree 3-1-stable ??

  Spree::Product Load (1.6ms)  SELECT  DISTINCT `spree_products`.* FROM `spree_products` INNER JOIN `spree_variants` ON `spree_variants`.`product_id` = `spree_products`.`id` AND `spree_variants`.`is_master` = 1 AND `spree_variants`.`deleted_at` IS NULL AND `spree_variants`.`tenant_id` = 3 INNER JOIN `spree_prices` ON `spree_prices`.`variant_id` = `spree_variants`.`id` AND `spree_prices`.`deleted_at` IS NULL WHERE `spree_products`.`deleted_at` IS NULL AND `spree_products`.`tenant_id` = 3 AND (`spree_products`.discontinue_on IS NULL or `spree_products`.discontinue_on >= '2017-01-23 18:56:13.025204') AND (`spree_products`.discontinue_on IS NULL or `spree_products`.discontinue_on >= '2017-01-23 18:56:13.028759') AND (`spree_products`.available_on <= '2017-01-23 18:56:13.028733') AND `spree_products`.`tenant_id` = 3 AND (spree_prices.amount IS NOT NULL) AND `spree_prices`.`currency` = 'USD' LIMIT 12 OFFSET 0
  Spree::ProductPromotionRule Load (2.0ms)  SELECT `spree_product_promotion_rules`.* FROM `spree_product_promotion_rules` WHERE `spree_promotion_rules`.`tenant_id` = 3 AND `spree_product_promotion_rules`.`product_id` IN (18, 19)
  Rendered /Users/mezbah/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spree_frontend-3.1.3/app/views/spree/shared/_products.html.erb (148.3ms)
  Rendered /Users/mezbah/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spree_frontend-3.1.3/app/views/spree/home/index.html.erb within spree/layouts/spree_application (565.7ms)
Completed 500 Internal Server Error in 1155ms (ActiveRecord: 312.1ms)

ActionView::Template::Error (Mysql2::Error: Unknown column 'spree_promotion_rules.tenant_id' in 'where clause': SELECT `spree_product_promotion_rules`.* FROM `spree_product_promotion_rules` WHERE `spree_promotion_rules`.`tenant_id` = 3 AND `spree_product_promotion_rules`.`product_id` IN (18, 19)):
    18: 
    19: <% if products.any? %>
    20:   <div id="products" class="row" data-hook>
    21:     <% products.each do |product| %>
    22:       <% url = spree.product_path(product, taxon_id: @taxon.try(:id)) %>
    23:       <div id="product_<%= product.id %>" class="col-md-3 col-sm-6 col-xs-6 product-list-item" data-hook="products_list_item" itemscope itemtype="https://schema.org/Product">
    24:         <div class="panel panel-default">
  mysql2 (0.4.5) lib/mysql2/client.rb:120:in `_query'
  mysql2 (0.4.5) lib/mysql2/client.rb:120:in `block in query'
  mysql2 (0.4.5) lib/mysql2/client.rb:119:in `handle_interrupt'
  mysql2 (0.4.5) lib/mysql2/client.rb:119:in `query'
  activerecord (4.2.7.1) lib/active_record/connection_adapters/abstract_mysql_adapter.rb:309:in `block in execute'
  activerecord (4.2.7.1) lib/active_record/connection_adapters/abstract_adapter.rb:484:in `block in log'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant