Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Joshua Tyree
    @Josh_Tyree_twitter
    My best / most performant solution was to host videos off-platform making the end user responsible for sorting that out then lazy load the videos after doc ready
    Storing the video as a localizable string in the event of bi-ligual videos
    It’s on my rainy day list to extend engine to support our video transcoding service
    Joshua Tyree
    @Josh_Tyree_twitter
    Since we started using Locomotive several years ago, I’ve gone through many ideas/implementations on hosting engine in a clustered environment. Some worked “good”, but not great, some pretty bad. What have others done to host Locomotive in a cluster or load-balanced configuration? How have you managed synchronization between the nodes without requiring a deploy to each node?
    Peter Salomon
    @patternpoints
    @Josh_Tyree_twitter Maybe i am not really the right person to answer your question due to lack of experience, however by concept i think that locomotive comes already with pretty much everything you need: under the hood it uses mongodb, which is easily scalable. It´s default setup is heroku-ready, which is as well already a load balanced environment. Since assets are hosted on S3, i don´t see any extra configuration with that. The only thing i haven´t read much about is caching, but i remember, it uses racks caching methods, and i will add memcache to my project and give that a try, because i made once extremely good experiences with it. But maybe this is all pure therory. I am runnig locomotivecms on a single instance right now. Worth mentioning maybe that the memory consumption has become way less since version 4.
    Joshua Tyree
    @Josh_Tyree_twitter
    My questions pertain more towards the hyper-optimized distrobution rather than default. You can roll out a deployment like you’ve described, but there you’re going to find large pockets of slow down which then leads to your websites being way slower than they need to be. MongoDB while scalable, is slow, so if you use a lot of snippets, use heavy data-binding like is common in large enterprise websites, you’re going to see very slow load speeds.
    What I’ve found with Mongo is that if it’s not running on the same node, it’s way too slow.
    Joshua Tyree
    @Josh_Tyree_twitter
    Our operating parameters dictate that all pages / sites that we build and host must be able to have a fully-loaded time at a max of 1s. Part of that is solved by indexing data and lazy-loading all content outside of the first viewport, heavy caching implementations, and extremely optimized VPSs/Kubernetes configs. All these extra steps create problems with continuous integration / deployment because the margin for error if not done perfectly is too high. So being able to deploy to all nodes in a cluster simultaneously without issues would be a good start at fixing our CI/CD pipeline.
    Peter Salomon
    @patternpoints
    I have no clue about running locomotivecms in larger scales honestly. So, sorry, no experiences to share here from my side. But its an interesting scenario that you are dealing with. About how many nodes are we talking and what are the issues you are experiencing with simultaneous deployments?
    Alex Wellnitz
    @alexohneander
    Hello, how can I read the metafields from my Gem?
    I have built an Instagram Client and now I want to read the apikey from the metafields
    Peter Salomon
    @patternpoints
    @alexohneander „gem“ ?
    @alexohneander But i guess this answers your question: https://doc.locomotivecms.com/docs/site-metafields
    Alex Wellnitz
    @alexohneander

    @patternpoints I built an Instagram client as Ruby-Gem.
    I linked this Gem to my Locomotive page.

    The Ruby-Gem serves as a plugin and provides a Liquid-Drop, with these drop I can display my Instagram Postings.
    In this gem I would like to access the metafields. If I see it right, this only works with Coal?

    ProgrammerGuy
    @guy_programmer_twitter
    I'm trying to deploy a project to multiple sites. Lets say I have 100 sites and 1 project. All 100 sites are identical, except the content for each is different. I made a change to the project, added a section. Thus I would have to deploy the changes to all sites.... I don't want to 'wagon deploy' 100 times lol is there away that i can deploy to all sites at once ?
    Nikolay Bonev
    @DonKoko
    I dont think wagon has such a feature
    you can make a simple ruby script that loops over the your deploy file and runs wagon deploy for each
    Alexander Ryhlitsky
    @alexander-rykhlitskiy
    Hello everybody
    I've just updated my locomotive engine from 2 to 4. Before update I could edit every page right inside of locomotive admin panel. But now every page, except the main one, says "No editable elements found".
    Can it be related to migrations scripts? Is there a way to make all the content in all pages editable?
    Thanks a lot in advance
    Nikolay Bonev
    @DonKoko

    Anybody had the issue with the page editor crashing with the follwing error in browser console:

    TypeError: can't access property "settings", e is undefined

    so i cant edit the page anymore
    but it renders just fine on the frontend
    Benoit Molenda
    @proxygear
    My quick guess is that you have a section that miss some settings in the definition.
    https://doc.locomotivecms.com/docs/json-definition
    Nikolay Bonev
    @DonKoko
    That was not the issue. Settings were there, but the section attributes were missing from the html
    so thats why it was giving the error
    Benoit Molenda
    @proxygear
    the section attributes ? in the top meta data ?
    Nikolay Bonev
    @DonKoko
    no in the actual html
    Benoit Molenda
    @proxygear
    I see
    Asad Dhamani
    @dhamaniasad
    Hello
    My engine is stuck on "Waiting for the preview pane to be ready"
    Pete Fealey
    @peterfealey

    `undefined method 'sections_content' for #<Locomotive::Coal::Resource:0x00007feda1f3f890>

    I'm having trouble syncing content from a staging site to local - The staging site/local site has no sections. Any idea?

    Petri Heikura
    @p3tricom_twitter

    Hello all again. I've tried to get started with the new way of building Loco-sites with Sections. We're running latest master both server side and locally. I've followed the documentation on doc.locomotivecms.com regarding sections. I wanted to learn the basics with Sections and therefor I've tried to follow the examples that follow the generated section. These are the steps I've done:

    • Created new fresh site in Loco production server administration.
    • Cloned down the site to my computer.
    • I noticed that /app/assets with necessary javascript-files were not created (even with generate section-command), so I ran the command bundle exec wagon generate webpack.
    • I created new section wagon generate section test.
    • I replaced all sample-file-references in app/views/sections/test.liquid with an existing image-file test.png.
    • I added {% sections_dropzone %} to index.liquid with example sections_dropzone_content as instructed in section-comment.
    • I deployed all to production server.

    When I ran the server (wagon) locally, it works and shows expected data on index.liquid page/section.

    When I access editor on production server for index.liquid (or 404.liquid) it just hangs and "Waiting for the preview pane to be ready" to finish. No errors in console or network. I have no access points domains yet and no redirects activated.

    What have I've missed? Thank you in advance.

    Chris Dyer
    @dyerc
    @p3tricom_twitter @dhamaniasad I just came to the Gitter room to see if anyone else was experiencing this error. I've submitted a Github issue with what I found the problem to be and a workaround of sorts locomotivecms/engine#1371
    Petri Heikura
    @p3tricom_twitter
    @dyerc Thanks for feedback. I hope your ticket will be solved soon. :)
    Petri Heikura
    @p3tricom_twitter
    @dyerc FYI: I added a host/domain to the site on production server (tried with and without redirect to first domain) but I still get the same behaviour with "Waiting for the preview pane to be ready" when trying to edit pages.
    Chris Dyer
    @dyerc
    @p3tricom_twitter @dhamaniasad just had the same error again myself today and updated the issue with a write-up of what the problem ended up being this time. It's probably not the exact issue you're having but it might help
    jacoblyw
    @jacoblyw

    Hello,
    Is there a way to bind the backend to a particular domain?

    This so that admin.example.com/locomotive will serve up the backend but mysite.example.com/locomotive will not.

    I was looking around in rails routing, but haven’t found routing based on the domain.

    Cristian Livadaru
    @lcx
    Hi everyone. Is there some way to cache data and access it via locomotive / liquid?
    I have a huge list of companies that are being loaded and served as a javascript variable.
    There are two things I don't like about this, it needs to load the data every time the page is accessed
        <script type="text/javascript">
          var companies = [
            {% for company in contents.company %}
              {"name": "{{ company.name }}", "url": "{% path_to company %}"}{% unless forloop.last %},{% endunless %}
            {% endfor %}
          ];
        </script>
    the second thing I don't like about this, I have a huge JS file I'm sending to the browser.
    What I would need is a way to send an ajax request for the typeahead to work and dynamically fetch the data from some cache.
    I would know how to do this in rails, but not sure if it can be accomplished via liquid / locomotive
    Cristian Livadaru
    @lcx
    the other way I could come up with a solution is to create some intermediate app in rails that fetches and caches this stuff from locomotive via API and the typeahead implementation would request if from there. Not really the nicest way.
    Sander Schekman
    @SuperSchek
    Hey everyone, I am having to dive back into a (very) old instance of engine running on Heroku. It uses the mlab plugin which will cease to exist soon. I migrated the DB to Atlas successfully. The issue is that when I update the MONGO_URL in the config vars of my app, I get an error:
    Bad URI: mongodb+srv://my-name:my-pass@my-atlas-cluster.mongodb.net/heroku_db Invalid scheme. Scheme must be 'mongodb' or 'mongodb+srv' MongoDB URI must be in the following format: mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]
    As far as I can see, I am adhering to the proper format
    Any ideas?
    James
    @thejame

    @SuperSchek Once you have your DB up at Atlas, use the link to the cluster, not the URI that is shown in the Atlas config. I got it to work using this:

    mongodb+srv://<USER>:<PASSWORD>@<CLUSTER ID>.mongodb.net/<DATABASE>?retryWrites=true&w=majority

    James
    @thejame
    Just curious @SuperSchek, what did you use instead of Heroku? I'm 100% fed up with their setup right now- with the Atlas conversion I am having so many problems.
    Nikolay Bonev
    @DonKoko
    @thejame I am really curious what issues you are having with the Atlas conversion. I have 3 different engines on heroku, running different versions of Loco and the migration was so easy and smooth, i couldnt believe it. If you ask me its a huge improvement compared to mlab.