Yes, it works now! I don't know what it was, but when I start new Umbraco 7 installation (before, it was the same, but for "playing") it works just fine! Thanks!
As you can see, plugin works with debug=true, but does not with false.
And - what is MOST worse for me - I need to deliver own Umbraco package (wit hincluded datatypes, doctypes, etc) to end-customer and when he gets it, he just install it for clean Umbraco. Customer doesn't have access to web.config or else resources. In "ideal way", he just install it and get ready solution :(
But, for now, when I install package to clean Umbraco (as you see from video), color picker doesn't work (else is fine)
Hi, firstly sorry for being AWOL - very busy period the last couple of weeks. One thing that may help when adding this and other AngularJS based plugins would be to add debug="true" to your web.config file like so:
Just took a look at your video - seems you've used the same technique to fix this. However, you may need to leave debug=true set - I had turned it on, tried it and noted it works in my browsers, then turned it off thinking that it was fixed. Client rings up saying it still isn't working, turn it back on again and then it works for them.
My guess is that turning debug=true on is changing the behaviour of umbraco (or rather ASP.Net) in the way it sends it's headers/cookies to the client which is effectively having the client cache things differently. Or, alternatively, the server is caching the files it serves, but debug=true is effectively bypassing the cache. Setting debug=false may be telling the server it can resume using it's cache, but that cache isn't being updated and is stale. I like to think that's the more likely scenario.
Thanks Max, let me know if anything else breaks (and feel free to mark the appropriate post as the solution for others that may experience the same problem).
I'm having the same problem with the Color Picker not working when debug=false. The issue doesn't seem to be resolved yet in Umbraco v7.1.8.
We are deploying a website to a production server and having debug=true is unacceptable.
Did anybody find some other workaround for now? I can't imagine anyone using this in production with debug mode on.
I am experiencing the same problem. The color picker works fine in Windows, but not on Mac, for some reason. Settung debug to true does not solve it. What to do?
Once you add a new data type and you allow user to choose a color using the spectrum color picker, how can I get the hexa decimal value selected in Content in a razor view to use it as a background-color or a color to an element?
As Dennis mentioned, use the standard Umbraco MVC @CurrentPage.PropertyAlias... to use a picked colour as the background of an element I normally inject the value into the style attribute similar to the following (where PageColor is my ColorPicker property):
To me it looks that you are doing it right. But please make sure that the page that you´re viewing in the browser has a value set on the serviceColour.
@CurrentPage is refers to the page that you are visit in the browser.
Can't make it works
Hi there!
It's good to have independent Color picker for v.7 as True Color picker doesn't work here, but what did I do wrong with instalaltion:
- I used "Install local package";
- Restarted App pool and clear cache;
- Got new "Spectrum color picker" Data type;
- Created generic property;
- have this then: http://screencast.com/t/Z4n2xdbaDTZj
- and these js errors: http://screencast.com/t/TGvDkfsnXJ4
hi, max
did you get it to work?
Hi Tom!
Yes, it works now! I don't know what it was, but when I start new Umbraco 7 installation (before, it was the same, but for "playing") it works just fine!
Thanks!
Hi Tom!
I have experienced this issue/error again with angular js error: http://screencast.com/t/UHq02mbhp
Earlier, when I said it works - I worked at localhost, but now, when I move website to live server, it does not :(
P.S.: I cleared cache twice, but it's not helped
when clearing the cache, did you change the web.config to do it?
I'm not sure, I understood about web.config...
I have captured video to show you what I do: http://screencast.com/t/k9zy4gPO8
As you can see, plugin works with debug=true, but does not with false.
And - what is MOST worse for me - I need to deliver own Umbraco package (wit hincluded datatypes, doctypes, etc) to end-customer and when he gets it, he just install it for clean Umbraco. Customer doesn't have access to web.config or else resources. In "ideal way", he just install it and get ready solution :(
But, for now, when I install package to clean Umbraco (as you see from video), color picker doesn't work (else is fine)
Hi, firstly sorry for being AWOL - very busy period the last couple of weeks. One thing that may help when adding this and other AngularJS based plugins would be to add debug="true" to your web.config file like so:
That seems to solve the problem with Caching on the server side. Hopefully Umbraco will resolve this type of issue with the next version or two.
Just took a look at your video - seems you've used the same technique to fix this. However, you may need to leave debug=true set - I had turned it on, tried it and noted it works in my browsers, then turned it off thinking that it was fixed. Client rings up saying it still isn't working, turn it back on again and then it works for them.
My guess is that turning debug=true on is changing the behaviour of umbraco (or rather ASP.Net) in the way it sends it's headers/cookies to the client which is effectively having the client cache things differently. Or, alternatively, the server is caching the files it serves, but debug=true is effectively bypassing the cache. Setting debug=false may be telling the server it can resume using it's cache, but that cache isn't being updated and is stale. I like to think that's the more likely scenario.
Hi Robert!
Thanks for investigating... Let's hope it could be fixed "automatically" for next version(s) of Umbraco :)
Thanks Max, let me know if anything else breaks (and feel free to mark the appropriate post as the solution for others that may experience the same problem).
Hi,
I'm having the same problem with the Color Picker not working when debug=false. The issue doesn't seem to be resolved yet in Umbraco v7.1.8. We are deploying a website to a production server and having debug=true is unacceptable. Did anybody find some other workaround for now? I can't imagine anyone using this in production with debug mode on.
Regards, Jasper.
Hi,
I am experiencing the same problem. The color picker works fine in Windows, but not on Mac, for some reason. Settung debug to true does not solve it. What to do?
Hi,
Once you add a new data type and you allow user to choose a color using the spectrum color picker, how can I get the hexa decimal value selected in Content in a razor view to use it as a background-color or a color to an element?
Thank you.
Regards
Hi Simon,
When you have add a new data type and on your doucment type add a property, using the Spectrum Colour Picker as the property editor.
The way that you can get the value that you set on the page, is by using this line:
If you give you property on your document type an alias of PickColor then it will be @CurrentPage.PickColor.
Then you will get something like this out #783232, that you can use as a background-color.
Hope this helps,
/Dennis
Hey Simon,
As Dennis mentioned, use the standard Umbraco MVC @CurrentPage.PropertyAlias... to use a picked colour as the background of an element I normally inject the value into the style attribute similar to the following (where PageColor is my ColorPicker property):
Hi,
I have used that approach but I am getting nothing.
Any help?
Hi Simon
Could you perhaps share some of your code so we can see your context? And perhaps some screendumps of your setup of the spectrum color picker?
/Jan
H Simon,
To me it looks that you are doing it right. But please make sure that the page that you´re viewing in the browser has a value set on the serviceColour.
@CurrentPage is refers to the page that you are visit in the browser.
/Dennis
Ok It worked.
Thanks Denis.
is working on a reply...