I guess this question may sound easy for you but I can't figure out where to find this info so I try asking you here. I have a backend system that have product info stored. What I like to do is to retrieve that, store it in some kind of structure/table in umbraco (not a content page).
Then I want to create a user interface for the editor to add meta data to these products. Can be images, more selling text, technical data and so on. I'm not building a ecom so going with some eCom solution don't seems right. I will create these tables and what I need by my own, but I need to figure out a best practice for umbraco. Can someone point my nose in a good direction?
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: . Path '', line 0, position 0. at Newtonsoft.Json.JsonTextReader.ParseValue() at Newtonsoft.Json.JsonTextReader.ReadInternal() at Newtonsoft.Json.JsonTextReader.Read() at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value) at Umbraco.Core.Manifest.ManifestParser.CreateManifests(String[] manifestFileContents)
As written, there is some problems with the manifest file. The path seems legit and I can access the url.
My next guess would be that maybe the paths in resouce files is wrong. Don't know how the JfpAddon/ProductApi is routed by umbraco under the backoffice? This could be the problem I guess.
angular.module("umbraco.resources").factory("productResource", function ($http) { return { getById: function (id) { return $http.get("backoffice/JfpAddon/ProductApi/GetById?id=" + id); }, save: function (product) { return $http.post("backoffice/JfpAddon/ProductApi/PostSave", angular.toJson(product)); }, deleteById: function (id) { return $http.delete("backoffice/JfpAddon/ProductApi/DeleteById?id=" + id); } }; });
Sorry for the late reply - Happy to see you figured out what went wrong initially :) - Remember to mark the post as solved so others can jump straight to the solution if they are wondering about how to deal with the same issue.
Adding a comment that was missing in the guide I think. When submitted, you need to add access right to the section under user --> section, or else you can't see it.
Ah yes, I should have mentioned that since it's not mentioned anywhere and it something that's easy to forget about. I have spent a lot of time pulling my hair out double checking the code until I finally remembered :)
Adding metadata to structured data from backend
Hi
I guess this question may sound easy for you but I can't figure out where to find this info so I try asking you here. I have a backend system that have product info stored. What I like to do is to retrieve that, store it in some kind of structure/table in umbraco (not a content page).
Then I want to create a user interface for the editor to add meta data to these products. Can be images, more selling text, technical data and so on. I'm not building a ecom so going with some eCom solution don't seems right. I will create these tables and what I need by my own, but I need to figure out a best practice for umbraco. Can someone point my nose in a good direction?
Hi Jan and welcome to our :)
I think you should consider making a custom section in Umbraco, which you can then use for managing your data without using content nodes for it.
Tim Geyssens from Umbraco HQ has written a blogpost about how to do it in Umbraco 7 here http://www.nibble.be/?p=440
I think that should make a good start - If you're having doubts about anything then please let us know.
/Jan
Thank you for a fast response!
This looks like what I was searching for.
Tried to modify it for a testround but ended up without any new node in admin and with an error with the scripts.
2015-04-01 15:45:24,311 [13] ERROR Umbraco.Core.Manifest.ManifestParser - [Thread 93] An error occurred parsing manifest with contents: {
javascript: [
'~/App_Plugins/JfpAddon/backoffice/producttree/edit.controller.js',
'~/App_Plugins/JfpAddon/backoffice/producttree/delete.controller.js',
'~/App_Plugins/JfpAddon/product.resource.js'
]
}
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: . Path '', line 0, position 0.
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.JsonTextReader.ReadInternal()
at Newtonsoft.Json.JsonTextReader.Read()
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
at Umbraco.Core.Manifest.ManifestParser.CreateManifests(String[] manifestFileContents)
As written, there is some problems with the manifest file. The path seems legit and I can access the url.
My next guess would be that maybe the paths in resouce files is wrong. Don't know how the JfpAddon/ProductApi is routed by umbraco under the backoffice? This could be the problem I guess.
angular.module("umbraco.resources").factory("productResource", function ($http) {
return {
getById: function (id) {
return $http.get("backoffice/JfpAddon/ProductApi/GetById?id=" + id);
},
save: function (product) {
return $http.post("backoffice/JfpAddon/ProductApi/PostSave", angular.toJson(product));
},
deleteById: function (id) {
return $http.delete("backoffice/JfpAddon/ProductApi/DeleteById?id=" + id);
}
};
});
Screen of project files and folders
Ok, just because I posted the solution was found. For reference:
http://issues.umbraco.org/issue/U4-6043?preventRedirect=true
BOM characters did mess upp the manifest file
Hi Jan
Sorry for the late reply - Happy to see you figured out what went wrong initially :) - Remember to mark the post as solved so others can jump straight to the solution if they are wondering about how to deal with the same issue.
Happy coding! :)
/Jan
Adding a comment that was missing in the guide I think. When submitted, you need to add access right to the section under user --> section, or else you can't see it.
Hi Jan
Ah yes, I should have mentioned that since it's not mentioned anywhere and it something that's easy to forget about. I have spent a lot of time pulling my hair out double checking the code until I finally remembered :)
But good you figured it out!
/Jan
is working on a reply...