You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, I try to get an fresh installed Spree Shop running with "spree_globalize".
• When I am logged in as admin
• and I click on products
• Then I see this error:
ActiveRecord::StatementInvalid in Spree::Admin::Products#index
Showing /Users/janjezek/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/spree_backend-3.6.4/app/views/spree/admin/products/index.html.erb where line #68 raised:
Mysql2::Error: Expression #1 of ORDER BY clause is not in SELECT list, references column 'demo520-spree_development.spree_products.name' which is not in SELECT list; this is incompatible with DISTINCT: SELECT DISTINCT `spree_products`.`id`, `spree_products`.`available_on`, `spree_products`.`discontinue_on`, `spree_products`.`deleted_at`, `spree_products`.`tax_category_id`, `spree_products`.`shipping_category_id`, `spree_products`.`created_at`, `spree_products`.`updated_at`, `spree_products`.`promotionable` FROM `spree_products` WHERE `spree_products`.`deleted_at` IS NULL AND (`spree_products`.discontinue_on IS NULL or `spree_products`.discontinue_on >= '2018-10-14 19:08:22.259918') ORDER BY `spree_products`.`name` ASC LIMIT 25 OFFSET 0
129 | def query(sql, options = {})
130 Thread.handle_interrupt(::Mysql2::Util::TIMEOUT_ERROR_CLASS => :never) do
131 _query(sql, @query_options.merge(options))
132 end
133 end
• git clone [email protected]:exocode/demo520-spree364.git
• cd demo520-spree364
• bundle install
• nano database.yml to your needs
• rake db:snapshot:restore to restore same state where it fails
I hope someone can help me.
The text was updated successfully, but these errors were encountered:
I had the same issue. What's interesting - problem appears only on postgres database with i18n/globalize gems. When I create local demo on default sqlite3 - everything is ok.
It has to do with Postgres, which is stricter on proper SQL, I have the same issue(s). Looking for a solution as well, because it comes up through multiple paths (different methods of friendly_id and the globalize version of it).
It seems the main culprit is the *-globalize gems.
I also get ActiveRecord::StatementInvalid: PG::GroupingError: ERROR: column "spree_product_translations.id" must appear in the GROUP BY clause or be used in an aggregate function for a different query.
Hi there, I try to get an fresh installed Spree Shop running with "spree_globalize".
• When I am logged in as admin
• and I click on products
• Then I see this error:
ActiveRecord::StatementInvalid in Spree::Admin::Products#index
Full Stacktrace here: http://pasted.co/2c4be2fa
What I've done
activemodel-serializers-xml
andglobalize
to resolve the dependenies)I uploaded a git Repo to jumpstart:
https://github.com/exocode/demo520-spree364
•
git clone [email protected]:exocode/demo520-spree364.git
•
cd demo520-spree364
•
bundle install
•
nano database.yml
to your needs•
rake db:snapshot:restore
to restore same state where it failsI hope someone can help me.
The text was updated successfully, but these errors were encountered: