Trouble with embedding


(Jay Pfaffman) #1

I have a client trying to do an embed. They are getting this error:

"ActionView::Template::Error (undefined method custom_stylesheet' for #<Class:0x007f2e2c99d480>) 
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/dynamic_matchers.rb:26:inmethod_missing'"

I’d gather more info, but this looks like it might be related to the new style sheet changes. Could this be a bug?


(Sam Saffron) #2

I am not finding the phrase custom_stylesheet anywhere in our repo, are you installing latest?

Need more context for that error.


(Jay Pfaffman) #3

Aha. So perhaps I was right. They’re on v1.8.0.beta10 +46, and ./app/views/layouts/embed.html.erb does contain

      <%= Theme.custom_stylesheet(session[:preview_style], :embedded) %>

I’ll rebuild and see if that fixes it. Of course, they’ve deleted all of the sample embed posts, so I won’t be able to tell anything.


(Jay Pfaffman) #4

The embed code looks like what admin/customize/embedding recommends, but I’m getting “Error Embedding.”

The code in the example on admin/customize/embedding uses http: for the discourse URL, though the site is https, and the discourseUrl: uses https.

Could it be that the Discourse site is https and the other site is http?