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
{{ message }}
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.
The spree_static_content was added before and working as expected. However after install i18n and globalize today, the pages can not work. I get error when accessing the pages tab on /admin with below information.
`Showing /Users/wangxu/.gem/ruby/2.7.0/bundler/gems/spree_static_content-a1e066bc612d/app/views/spree/admin/pages/index.html.erb where line #28 raised:
checked the migration file of static_content gem, it did try to create the translation table.
This migration comes from spree_static_content (originally 20170827000001)
class AddTranslationToSpreePages < SpreeExtension::Migration[4.2]
def up
params = { title: :string, body: :text, slug: :string, foreign_link: :string, meta_keywords: :string, meta_title: :string, meta_description: :string }
if defined?(SpreeGlobalize)
Spree::Page.create_translation_table!(params, { migrate_data: true })
end
end
def down
if defined?(SpreeGlobalize)
Spree::Page.drop_translation_table! migrate_data: true
end
end
end
I understand the issue I'm facing is I install static_content gem first, and spree globalize gem later. Which makes the translation table not generated.
How shall I do? Is there a way to re-run the migration files and regenerate the translation table?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I just installed i18n and globalize gem, please find below the statement in my Gemfile
The spree_static_content was added before and working as expected. However after install i18n and globalize today, the pages can not work. I get error when accessing the pages tab on /admin with below information.
`Showing /Users/wangxu/.gem/ruby/2.7.0/bundler/gems/spree_static_content-a1e066bc612d/app/views/spree/admin/pages/index.html.erb where line #28 raised:
Mysql2::Error: Table 'myproject_development.spree_page_translations' doesn't exist`
The text was updated successfully, but these errors were encountered: