This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-26
Channels
- # admin-announcements (2)
- # aws (1)
- # beginners (21)
- # boot (61)
- # cider (5)
- # cljs-dev (94)
- # cljsrn (35)
- # clojure (106)
- # clojure-austin (3)
- # clojure-belgium (1)
- # clojure-dev (4)
- # clojure-dusseldorf (9)
- # clojure-greece (2)
- # clojure-mexico (1)
- # clojure-russia (40)
- # clojure-spec (61)
- # clojure-uk (17)
- # clojurescript (151)
- # code-art (1)
- # component (7)
- # core-async (4)
- # cursive (1)
- # datomic (9)
- # dirac (55)
- # funcool (12)
- # hoplon (118)
- # incanter (12)
- # jobs (8)
- # juxt (1)
- # lein-figwheel (6)
- # mount (2)
- # off-topic (2)
- # om (76)
- # onyx (28)
- # other-lisps (1)
- # planck (7)
- # re-frame (9)
- # reagent (13)
- # ring-swagger (2)
- # specter (1)
- # yada (22)
@jumblerg: i was using your version of ring cors [jumblerg/ring.middleware.cors "1.0.1"] is it still necessary or the default ring cors middleware is already ok to use?
@onetom: i haven't kept track since i wrote it... is there middleware as part of ring that does this now?
@jumblerg: yeah, this one: https://github.com/r0man/ring-cors i thought yours was a fork
i think there's an issue with the way it handles errors in some cases though, prs welcome.
@flyboarder Oh, the "null" only appear in hoplon files, not html static files
jquery problem?
Does it have anything to do with compojure way of serving routes
(GET "/" req (-> "index.html"
response/resource-response
(response/content-type "text/html")))
vs
(GET "/eglise" [] (io/resource "public/pages/eglise/index.html"))
yes, I'll try alpha14
I still have the problem with either alpha13
alpha14
and alpha15
My public resources files are in /resources/public
maybe that is where it fails
I use :resource-paths #{"resources" "src/clj"}
in build.boot
and
(-> x
(wrap-resource "public")
(wrap-content-type)
(wrap-not-modified)
(d/wrap-defaults d/api-defaults)
(castra/wrap-castra-session "a 16-byte secret")
(castra/wrap-castra 'vpc-hoplon.api))
@dm3 Interesting, the IE console says:
SCRIPT5007: Unable to get value of the property 'EMBED' of undefined or null reference
File: safehtml.js, Line: 311
so it has to do with resources/public
vs assets
Folks, please have a look at hoplon-castra-template and please guys tell me how to fix it while still be able to have files in resources/public
so that we can store config files in resources/private
without exposing it to the browser!!
Thanks!!
@leontalbot: why not have a config
path outside resources? You can add resource/public
to resources and resources/private
to sources and you should have what you want. You will need to tell ring wrap-resources
that the root is ""
instead of "public"
that is the default iirc.
@mynomoto: Thanks. Trying...
@mynomoto: I was wrong the problem seems else where as if I use assets
without public, I still get the error
I'm trying with different version of hoplon now
@leontalbot: is the project public on gh?
yes, hoplon-castra template
if you have IE 11 or any IE, you can test!
oh... with alpha9 it works
as always ☠️
alpha10 ok...
alpha11 ok
alpha12 ok
alpha13 problem
will try to empty my .m2
ok so I got this bug with alpha13 alpha14 and alpha15
@leontalbot: the best way to make things private is not to make a path convention, i don't think
the best way to do that is to have middleware that prevents unwanted things from being sent
you could have middleware in your server stack that whitelists or blacklists by extension
so i never use the public/...
and private/...
convention, because it's a leaky abstraction
(defn wrap-blacklist [handler extensions]
(let [match? (fn [uri] (some #(.endsWith uri %) extensions))]
(fn [request]
(if (match? (:uri request))
{:status 403 :body "Forbidden"}
(handler request)))))
Thanks you!
I still have the "null" issue on IE with alpha13-15 though
Any ideas?
A customer I have alterted me. I don't know for him. But I can reproduce this with http://browserstack.com fresh IE VMs
Null appears both as the first element of <head>
and <body>
^I wonder if it’s a jquery thing?
were there changes from alpha12 to alpha13 that could corroborate this?
@leontalbot: anyway to just not support IE? 😛 …… if only
yep...
i wonder if it happens on Edge tho?
seems like it might be something related to that constructor function for making the singletons
@flyboarder: I see the same problem with IE 13 on windows 10
@micha WOuld there be an easy way out?
i think i introduced this regression while fixing another; most likely fix is to set innerHTML in the singleton ctor to empty string
to something like this: https://github.com/hoplon/hoplon/blob/0c167bc2ea0d219c3d92f8150cf7068b6f12ae03/src/hoplon/core.cljs#L297-L307
i would have chimed in much earlier, but thought i saw upstream that the issue was occurring in previous versions
@jumblerg http://browserstack.com is very convenient for IE tests
hahaha
@micha: incidentally, reload broke completely after i did boot -u
yesterday, i just commented it out and kept going, something induced by the change to the boot template macro as i recall
On another subject
(defmethod do! :selectize [elem _ opts]
(.selectize (js/jQuery elem) (clj->js opts)))
(defelem select-field [{:keys [cell small] :as attrs} data]
(div :selectize
(select)
{:options [(clj->js {"item" "1"})
(clj->js {"item" "2"})]
:valueField "item"
:labelField "item"}))
gives me:
views.cljs:94 Uncaught TypeError: jQuery(...).selectize is not a function
any ideas?Anyone?
Thanks!
@leontalbot: do your problems go away when your roll back to alpha14?
Alpha12 yes
Still a problwm
Yes...
Null yeah
Body and head
this is the case for adding innerHTML = “”
https://github.com/hoplon/hoplon/commit/128dc2134774bd6e3de74de88707745e34f99f5a
@leontalbot: just made a quick commit on master for the sake of expediency that i think may resolve your problem, can you clone and test?
checkout master,`boot build-jar`, then try running your app in ie and let me know if the null in the body goes away.
Ok. I am.on it tonight ! Thanks
@jumblerg: bingo! it works!
Much thanks! Would you or @micha bump a new release?
@micha before the bumping, let me look quick at what is improperly handling the nils on ns’d attributes
this is the boot-reload exception i started getting after upgrading boot, btw:
java.lang.IllegalStateException: template already refers to: #'boot.core/template in namespace: adzerk.boot-reload
@micha: i gave myself another thing i wanted (splitting up the protocols), but can’t seem to reproduce the nil reverting to less-than-sensibles-defaults issue i recall getting before. maybe i fixed it in a previous commit.