These are chat archives for locomotivecms/v3

23rd
Nov 2016
Didier Lafforgue
@did
Nov 23 2016 09:05
thanks @jorgesuja!
hi @jordanthomas!
Does a gem have to be published to rubygems to work? => No
did you develop your custom liquid filters for v2 or v3?
Benoit Daloze
@eregon
Nov 23 2016 12:48
Hello, I get this in the log of my engine, do you know what could cause it? That request is legitimate as far as I know.
W, [2016-11-23T06:01:54.760439 #9689]  WARN -- : Can't verify CSRF token authenticity
I, [2016-11-23T06:01:54.761258 #9689]  INFO -- : Completed 422 Unprocessable Entity in 3ms
F, [2016-11-23T06:01:54.763814 #9689] FATAL -- :
ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken):
  vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.6/lib/action_controller/metal/request_forgery_protection.rb:181:in `handle_unverified_request'
  vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.6/lib/action_controller/metal/request_forgery_protection.rb:209:in `handle_unverified_request'
  vendor/bundle/ruby/2.2.0/gems/devise-3.5.10/lib/devise/controllers/helpers.rb:257:in `handle_unverified_request'
  vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.6/lib/action_controller/metal/request_forgery_protection.rb:204:in `verify_authenticity_token'
Would updating the locomotive engine potentially help?
Didier Lafforgue
@did
Nov 23 2016 12:49
hi @eregon
what’s the requested url?
Benoit Daloze
@eregon
Nov 23 2016 12:52
I, [2016-11-23T06:07:01.371388 #9689]  INFO -- : Started POST "/locomotive/sign_in" for 104.237.91.132 at 2016-11-23 06:07:01 +0100
I, [2016-11-23T06:07:01.374584 #9689]  INFO -- : [LocomotiveCMS] [fetch site] host = mysite.com / site_handle = nil / locale = :en
D, [2016-11-23T06:07:01.382463 #9689] DEBUG -- : MONGODB | localhost:27017 | mysite_locomotive_production.find | STARTED | {"find"=>"locomotive_sites", "filter"=>{"domains"=>{"$in"=>["mysite.com"]}}, "limit"=>-1}
D, [2016-11-23T06:07:01.385342 #9689] DEBUG -- : MONGODB | localhost:27017 | mysite_locomotive_production.find | SUCCEEDED | 0.002639253s
I, [2016-11-23T06:07:01.391376 #9689]  INFO -- : Processing by Locomotive::SessionsController#create as HTML
I, [2016-11-23T06:07:01.391451 #9689]  INFO -- :   Parameters: {"utf8"=>"✓", "authenticity_token"=>"WSm6lat4Y7rT3mr3PO08Cm4CObzF1wB1UpnvGsqg95BWGkARXZ9kHfQQn2BiAdRivoqWV1ckip/zr3NfGmKtoA==", "locomotive_account"=>{"remember_me"=>"true", "email"=>"...", "password"=>"[\
FILTERED]"}, "commit"=>"Se connecter"}
So sign_in it seems
Didier Lafforgue
@did
Nov 23 2016 12:52
it’s not sign_in :-)
bundle exec rake routes
Benoit Daloze
@eregon
Nov 23 2016 12:55
Maybe
sign_in GET /sign_in(.:format) locomotive/sessions#new ?
I'm not sure I read the log right, but Locomotive::SessionsController#create might be related to signing in?
do you want the full routes output?
Didier Lafforgue
@did
Nov 23 2016 12:56
hmmm looks good
what’s the context?
Benoit Daloze
@eregon
Nov 23 2016 12:57
Could this be related to a particular browser or location (maybe the user is in China) ?
The user told me he tried editing the site but got as a reply the change you wanted was rejected
Didier Lafforgue
@did
Nov 23 2016 12:58
hmmm
do you have the full activity logs?
Benoit Daloze
@eregon
Nov 23 2016 12:59
I'll try looking exactly what he is doing, since I couldn't replicate by connecting with his account
Didier Lafforgue
@did
Nov 23 2016 12:59
apparently he was able to sign in
Benoit Daloze
@eregon
Nov 23 2016 12:59
yeah I have production.log
Didier Lafforgue
@did
Nov 23 2016 13:00
standard Locomotive installation? No custom code?
Benoit Daloze
@eregon
Nov 23 2016 13:00
as standard as it gets :)
using locomotivecms 3.1.1
I'll ask him more details, thanks for the help
Didier Lafforgue
@did
Nov 23 2016 13:05
you’re welcome
btw, do you use a CDN on top your Locomotive platform?
Benoit Daloze
@eregon
Nov 23 2016 13:06
No, just hosting on a dedicated server
Didier Lafforgue
@did
Nov 23 2016 13:07
the "ActionController::InvalidAuthenticityToken” exception might happen if you try to save a cached form and that your server has been restarted between.
you get the idea I guess
Jordan Thomas
@jordanthomas
Nov 23 2016 17:54
@did Thanks! Would you mind looking at my gem and tell me what I'm missing? Like I said it's working alright locally via Wagon but not once I deploy.
Didier Lafforgue
@did
Nov 23 2016 19:19
@jordanthomas wait a minute. Did you add your gem into your Engine Gemfile?
Jordan Thomas
@jordanthomas
Nov 23 2016 20:45
I added it to my Gemfile, is there a separate Gemfile Engine uses?