Welcome to the Locomotive V4 developer hub. You'll find comprehensive guides and documentation to help you start working with Locomotive V4 as quickly as possible, as well as support if you get stuck. Let's jump right in!
hi, I am triying to render a custom content type called posts in the index page, I choose HAML so I 'm getting this error: undefined local variable or method `contents' for # My code to render is: %ul - contents.posts.each do |post| %li = post.title regards
Posted by yohan morales 4 years ago
Hello! I have companies (~300) and categories (~100) in my project and they are in a N:M relationship. Everything works perfectly in Wagon project, but after I synced the data to Engine project the relationship won't work. https://dl.dropboxusercontent.com/u/16954780/Locomotive/n_m_relation_seed.yml (All the other content entries are synced correctly as well as 1:1, 1:N relationships.) Many thanks for any answers! Zsolt
Posted by Zsolt Vad 4 years ago
I'm trying to get the next/previous siblings of a content entry. I have 6 content entries and for each `content_entry.next` and `content_entry.previous` return the `first` and `last` entries (except on the first or last entry where `previous` or `next` returns nil respectively). Any advice?
Posted by Harry Blackett 4 years ago
I have an issue where I can deploy my site and it works perfectly in production, but on syncing the site locally I get the following error: `Malformed YAML in this file /.../Sites/Wagon/.../data/years.yml, error: undefined method 'to_sym' for 2014:Fixnum` The data/years.yml file looks like this: ``` - 2014: _slug: '2014' name: 2014 projects: - residency-works ```
Posted by Harry Blackett 4 years ago
I'm not sure if these questions are read but my love for the CMS part of LocomotiveCMS is being dulled by the obscurity and obtuseness of the Wagon deploy process. Current issue is that unless a file is physically edited it appears to be assumed to be the same. If I drop a new file that has the same name as a previous one it is ignored(skipped). Obviously if it is an image file or similar this becomes problematic. I am trying to force all assets to be redeployed to overwrite the existing ones to get everything in sync. No matter what I have tried ( even deleting all the deployed assets ) every time I run deploy to local engine it skips all the ThemeAssets but appears to push everything else. I suspect some caching issue or failure to reload the current assets or similar may be to blame. Anyway: I worked my way to the file push_theme_assets_command.rb and this appears to be where it is checked. and commenting out this line 26 gets me a bit further. raise SkipPersistingException.new if same?(decorated_entity, _entity) To get round this I commented it out and that gets me a bit further. Perhaps a -f flag on the deploy command could be used to force all assets to be replaced?
Posted by Colin 4 years ago
I have a 'Categories' content type populated with pluralized category names ('movies', 'games', 'videos', etc.). Is it possible to singularize a category name in certain places in the Liquid template? Or is it considered better practice to have a separate field in categories.yml for a singular name?
Posted by Harry Blackett 4 years ago
I am getting this "getaddrinfo: Name or service not known". I think that it is something to do with S3 but I can't tell. If I drag a file onto upload it looks like it is doing something but the the "drop" image shakes which I assume means failure. The S3 bucket works with the same credentials in my Transmit FTP app. Struggling to diagnose this. Regards Colin McGowan Seahorse::Client::NetworkingError in Locomotive::CurrentSiteController#edit getaddrinfo: Name or service not known Extracted source (around line #879): 877 878 879 880 881 882 D "opening connection to #{conn_address}:#{conn_port}..." s = Timeout.timeout(@open_timeout, Net::OpenTimeout) { TCPSocket.open(conn_address, conn_port, @local_host, @local_port) } s.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1) D "opened" Rails.root: /app Application Trace | Framework Trace | Full Trace vendor/ruby-2.2.2/lib/ruby/2.2.0/net/http.rb:879:in `initialize' vendor/ruby-2.2.2/lib/ruby/2.2.0/net/http.rb:879:in `open' vendor/ruby-2.2.2/lib/ruby/2.2.0/net/http.rb:879:in `block in connect' vendor/ruby-2.2.2/lib/ruby/2.2.0/timeout.rb:89:in `block in timeout' vendor/ruby-2.2.2/lib/ruby/2.2.0/timeout.rb:99:in `call' vendor/ruby-2.2.2/lib/ruby/2.2.0/timeout.rb:99:in `timeout' vendor/ruby-2.2.2/lib/ruby/2.2.0/net/http.rb:878:in `connect' vendor/ruby-2.2.2/lib/ruby/2.2.0/net/http.rb:863:in `do_start' vendor/ruby-2.2.2/lib/ruby/2.2.0/net/http.rb:858:in `start'
Posted by Colin 4 years ago
Hi, I really like the look of this CMS and what it is trying to do and hope to use it soon. My question is: Is it possible to create custom functionality ie say I want to include a twitter feed? If it is how would I go about this. I can see how easy it is for the CRUD stuff but bit hazy on new functionality outside of that. Thanks Colin McGowan
Posted by Colin 5 years ago
I have been trying to setup a nav bar in my app (actually migrating locomotivehosting.com to this). I can't get the path_to function to return anything useful. I have page with the handle of "products". I have tried these with all of them returning nothing. I have tried these variations. {% path_to products2 %} {% path_to 'products2' %} {{ path_to products2 }} {{ path_to 'products2' }}
Posted by David Cook 5 years ago
Hi! If I try to access the 'created_at' property in a liquid tag it returns nil (I think). I've tested it both in my Wagon and in my CMS project. My gems: gem 'locomotivecms', '~> 3.0.0' gem 'locomotivecms_steam', '~> 1.0.0' gem 'locomotivecms_wagon', '~> 2.0.0' My custom (faq) content_type: https://dl.dropboxusercontent.com/u/16954780/Locomotive/faqs.yml Liquid template: https://dl.dropboxusercontent.com/u/16954780/Locomotive/faqs.liquid But if I try to access other properties like '_label, _permalink, ...' they returns the correct values. Thanks for any help!
Posted by Zsolt Vad 5 years ago
My site deploys fine, but when I try to sync back to local it tells me this: Malformed YAML in this file /Users/vinniedauer/Sites/Wagon/ChristChurch/app/views/pages/events.liquid, error: (): did not find expected key while parsing a block mapping at line 2 column 1 File: ? Code No code Then lists a bunch of files with messages. The site is just default, hardly any changes made, just 2 pages generated with only Bootstrap template content. Any thoughts?
Posted by Vinnie Dauer 5 years ago
Hi there, I have done some tests directly on https://station.locomotive.works and when I wanted to get my website locally (to start coding), I have tried this : wagon clone altavia_connect https://station.locomotive.works -h lush-meadow-7195 -e [email protected] -a XXXXXXXXXXXXXXXXXXXXXXX But it does not work at all. Any suggestion? Thanks by advance, L.
Posted by Laurent ALTAVIA 5 years ago
Is it possible to group content type fields by tabs, based on a field property for example? You can often end up with a long list of fields and it would be great to have the possibility to visually group them by tabs.
Posted by Victor Stegaru 5 years ago
My custom css and js are fine when running wagon locally but when I deploy them to development (also local), they are edited and interpreted as MIME type text/html instead of css and js. Is there compression happening that is affecting it when published that I can disable or something else?
Posted by Laura Fischer 5 years ago
I've gotten the CMS functioning, but it doesn't seem to find the sites in the databsase. Would love any help possible (will pay). [LocomotiveCMS] [fetch site] host = doryachicago.com / site_handle = nil 2015-11-18T06:01:01.335028+00:00 app[web.1]: 2015-11-18T06:01:01.335033+00:00 app[web.1]: NoMethodError (undefined method `url_redirections' for #<Locomotive::Site:
Posted by Christopher Smith 5 years ago