Comments (2)
From the stack trace:
....
activerecord (6.0.2.2) lib/active_record/relation/finder_methods.rb:500:infind_take' activerecord (6.0.2.2) lib/active_record/relation/finder_methods.rb:98:in
take'
activerecord (6.0.2.2) lib/active_record/relation/finder_methods.rb:81:infind_by' spree_static_content (a1e066bc612d) lib/spree_static_content.rb:19:in
matches?'
actionpack (6.0.2.2) lib/action_dispatch/routing/mapper.rb:40:inblock in matches?' actionpack (6.0.2.2) lib/action_dispatch/routing/mapper.rb:39:in
all?'
actionpack (6.0.2.2) lib/action_dispatch/routing/mapper.rb:39:in `matches?'
....
Checked the source of lib/spree_static_content.rb,
694bce5#diff-5627e6f87e4b5791c859c7a51762eef9
It looks like the issue was introduced by commit 694bce5, "Make SpreeGlobalize optional" . The SpreeGlobalize didn't create spree_page_translations.
from spree_static_content.
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
enddef 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?
from spree_static_content.
Related Issues (20)
- Remove the gem HOT 4
- ActiveRecord::StatementInvalid (Could not find table 'spree_pages')
- Error Installing
- Is this working in Spree 3.2.0 HOT 2
- Please specify the Rails release the migration was written for in gem 'spree_static_content', github: 'spree-contrib/spree_static_content' HOT 2
- Readme is not up to date HOT 2
- Problem with Translations HOT 2
- Mysql2::Error: Table 'development.spree_taxonomy_translations' doesn't exist: SHOW FULL FIELDS FROM `spree_taxonomy_translations` HOT 3
- NoMethodError in Spree::Home#index HOT 5
- Meta Description and Meta Keywords Not Being Applied HOT 1
- methods `find_by` stop working HOT 5
- How do I get the Pages menu item in the admin
- Problems with translations, locale used in slug
- Problems with Spree 4.0 HOT 1
- Installation failure with a `Sprockets::Railtie::ManifestNeededError` HOT 1
- I can't translate pages HOT 3
- When trying Foreign link (URL) it doesnt work
- Links in footer doesn't work HOT 1
- after intalling the extension on spree nothing shows
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spree_static_content.