spree-contrib / spree_globalize

Adds support for model translations (multi-language stores) using Globalize gem
https://spreecommerce.org
BSD 3-Clause "New" or "Revised" License
24 stars 102 forks source link

I can't translate pages #77

Open apradillap opened 3 years ago

apradillap commented 3 years ago

The output is

ActiveModel::UnknownAttributeError in Spree::Admin::PagesController#create
unknown attribute 'page_id' for Spree::Page::Translation.

Sorry but I have

ruby 2.7.1
rails 6.0.3.2

and I have

gem 'spree', '~> 4.1'
gem 'spree_auth_devise', '~> 4.1'
gem 'spree_gateway', '~> 3.7'
gem 'spree_static_content', github: 'spree-contrib/spree_static_content'
gem 'spree_i18n', github: 'spree-contrib/spree_i18n'
gem 'spree_globalize', github: 'spree-contrib/spree_globalize'
and I have problem with spree_page_translatiosn

Trying to solve it, firstly I had to execute ALTER TABLE spree_page_translations RENAME spree_page_id TO page_id; because didn't recognize spree_page_id and then, when I tried to translate a page I can't and It returned me

Spree::Page::Translation Exists? (0.2ms)  SELECT 1 AS one FROM "spree_page_translations" WHERE "spree_page_translations"."slug" = $1 AND "spree_page_translations"."locale" = $2 LIMIT $3  [["slug", "prueba buena"], ["locale", "en"], ["LIMIT", 1]]
(0.2ms)  ROLLBACK
00:29

Can anyone help me? Thank you very much. Do I have to download versions of rails? Someone has worked out spree_static_content and spree_globalize? thanks for all