Coder Social home page Coder Social logo

Comments (10)

jarednorman avatar jarednorman commented on August 14, 2024 1

Deface shouldn't be able to do any damage here.

from solidus_social.

flyfy1 avatar flyfy1 commented on August 14, 2024 1

OK my colleague and I has figured out the issue. It's due to rails 5 reload order change.

In Rails 5, when the reload happens, it's following the following steps:

  1. unload the classes;
  2. load the Routes first; if there're any object not loaded / unloaded, load them
  3. and then reload the classes & decorators.

However, the decorator in SolidusSocial is trying to add in omniauthable into the User class, by re-defining devise in the class. Since it's not loaded at the time when routes is defined for devise, the routes would complain (therefore u can see the error above).

There's a quick fix: force the re-loading of models & decorators, before the routes. I've included the fix in this commit.

from solidus_social.

jarednorman avatar jarednorman commented on August 14, 2024

Are you experiencing this in development or production?

(That following was misclick. Absolutely did not mean to close your issue 😃.)

from solidus_social.

MindRave avatar MindRave commented on August 14, 2024

@jarednorman Development. Just started, and this started happening. Do you want the full error trace or my detailed Gemfile (basic, though, as I said)? Any other info I can provide?

from solidus_social.

jarednorman avatar jarednorman commented on August 14, 2024

Stack trace and Gemfile[.lock] might help. A link to the repo if it's public would be fine too.

from solidus_social.

MindRave avatar MindRave commented on August 14, 2024

@jarednorman

Here they are!

Stack trace:
https://gist.github.com/MindRave/28b9fca98fcf750f4bc724d99609a109

Gemfile.lock
https://gist.github.com/MindRave/9ee0b6b0eb8dfc45b6041e51b5cc3ed0

from solidus_social.

jarednorman avatar jarednorman commented on August 14, 2024

Interesting. Looks like some kind of code reloading issue. You aren't doing anything unusual in how you're decorating or handling Spree::User (if you're playing with it at all)?

from solidus_social.

MindRave avatar MindRave commented on August 14, 2024

Nothing special, no. I just started playing around with Solidus and added an override to test Deface, but it's a standard Spree override (app/overrides/temp_text.rb), nothing fancy...

Deface::Override.new( virtual_path: 'spree/user_registrations/new', name: 'temp_text', insert_after: '[data-hook="login_extras"]', text: 'Testing text', disabled: false )

from solidus_social.

MindRave avatar MindRave commented on August 14, 2024

@jarednorman Decided to try with Spree and spree_social. Getting the same error (just by adding a Deface override)... Either it's something on my end or the spree_social gem (if I understand correctly, the solidus_social is a fork of spree_social). I'll either disable the social auth for now, or try and find another solution altogether (developing like this is impossible 😞 ).

If you don't have any ideas, thank you for your help! 😄

from solidus_social.

flyfy1 avatar flyfy1 commented on August 14, 2024

For anyone interested in looking into this issue further, I've created a vanilla solidus and replicated the issue: https://github.com/flyfy1/VanillaSolidus.

Basically, as long as I include the solidus_social gem, the error would popup.

from solidus_social.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.