Discussions
Site metafields throw no_method_error on type: file fields on engine
over 8 years ago by Tobias Geisler
I have something like this:
slider:
fields:
slider_text:
type: string
slider_bild_1
type: file
(metafields_schema.yml)
On wagon, this works perfectly.
On the engine, I get this (self-hosted and on locomotivehosting):
I, [2016-07-16T17:51:02.759050 #3087] INFO -- : [LocomotiveCMS] [ApplicationError] #<NoMethodError: undefined method `slider_bild_1?' for #<Locomotive::CurrentSiteMetafieldsHelper::SchemaGroup:0x00000005
6cbe20>>
I, [2016-07-16T17:51:02.762500 #3087] INFO -- : Completed 500 Internal Server Error in 87ms
F, [2016-07-16T17:51:02.772287 #3087] FATAL -- :
NoMethodError (undefined method `slider_bild_1?' for #<Locomotive::CurrentSiteMetafieldsHelper::SchemaGroup:0x000000056cbe20>):
(log excerpt from self-hosted engine)
=> The file field causes an error (the text field alone works).
Since it's an image field, I changed it to type: image
, and this seems to solve the issue.
However, I can't get type: file
to work.