umco / umbraco-vorto Goto Github PK
View Code? Open in Web Editor NEW1:1 multilingual property editor wrapper for Umbraco
Home Page: https://our.umbraco.org/projects/backoffice-extensions/vorto
License: MIT License
1:1 multilingual property editor wrapper for Umbraco
Home Page: https://our.umbraco.org/projects/backoffice-extensions/vorto
License: MIT License
Fix for the issue in pull request #61
Umbraco Version 7.2.6 - 7.3.0 (Beta), Vorto Version 1.4.
Problem on saving VortoProperty Media Element.
Randomnly don't save the property. I use text string data type.
We have this scenario where we have one content tree that support multiple languages (say 10). However, some items in the tree should not be available in every language; they should only be available in, say, five.
To accommodate this, we've created a new DataType
with prevalues for available languages. We've then added a property to our base DocumentType
to allow the editor to choose which languages this item should be available in. We've then hooked into the PublishedContentRequest.Prepared
event to filter the item out based on current culture/language.
However, with Vorto, even though we only want this particular item in five languages the Vorto fields show the editor all 10 languages. I so have an idea on how this could work, but I figured I was ask if you have any planned support for this scenario?
//cc: @SeanFeldman
When I try to use Vorto on a Media Type in Umbraco 7.5 I get the following error when I try to save:
Received an error from the server
An error occured
The given key was not present in the dictionary.
EXCEPTION DETAILS
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
STACKTRACE
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Umbraco.Core.Persistence.Repositories.MediaRepository.PersistUpdatedItem(IMedia entity)
at Umbraco.Core.Cache.DefaultRepositoryCachePolicy`2.CreateOrUpdate(TEntity entity, Action`1 persistMethod)
at Umbraco.Core.Persistence.Repositories.RepositoryBase`2.PersistUpdatedItem(IEntity entity)
at Umbraco.Core.Persistence.UnitOfWork.PetaPocoUnitOfWork.Commit(Action`1 transactionCompleting)
at Umbraco.Core.Services.MediaService.Umbraco.Core.Services.IMediaServiceOperations.Save(IMedia media, Int32 userId, Boolean raiseEvents)
at Umbraco.Web.Editors.MediaController.PostSave(MediaItemSave contentItem)
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
We have a problem when trying to get the value with item.GetVortoValue("header") from an empty VortoTextString field. It happens both with new and existing nodes.
Stacktrace:
Header = item.GetVortoValue<string>("header");
[NullReferenceException: Object reference not set to an instance of an object.]
Our.Umbraco.Vorto.Extensions.IPublishedContentExtensions.DoInnerGetVortoValue(IPublishedContent content, String propertyAlias, String cultureName, Boolean recursive, T defaultValue) +223
Our.Umbraco.Vorto.Extensions.IPublishedContentExtensions.GetVortoValue(IPublishedContent content, String propertyAlias, String cultureName, Boolean recursive, T defaultValue, String fallbackCultureName) +115
We can see in the umbraco.config cache that only the dtdguid field exists for the property:
<header><![CDATA[{
"dtdguid": "8e902cf2-a6bc-49bb-9e8f-e37e7d102c2d"
}]]></header>
When we add text to the fields it works fine.
We are using version 1.5 from nuget and Umbraco 7.4.1.
Is it the intention that one should always use item.HasVortoValue("header")
first? I think GetVortoValue()
should return null when there is no value.
This way, current Razor views and C# code will work respectful of whether the Data Type is Vorto enabled or not.
This is also important for mixing Vorto with other 3rd Party plugins that aren't aware of Vorto.
When setting propertyvalue to VortoValue with empty DtdGuid, getting vorto value from frontend breaks. Why is the DtdGuid even required, shouldn't vorto resolve this from the prevalue collection?
Hi Matt,
Thanks for the great project.
is it support Right to left (RTL) language?
Would it be possible to have a new mandatory option, which makes all properties mandatory for the same language across all vorto properties on a document type?
So if I enter a single value for language X I am forced to enter values for all properties for language X?
In 7.4.3, when you wrap a Grid in a Vorto property, the language switcher at the top of the grid is partially covered by the grid itself, so only the top half of the switcher is visible.
Hello,
I created a datatype called "Vorto Related Links", in which I set Vorto as the editor and chose "Related Links" as the datatype to wrap. I then added a field with this new datatype to a document. I then went to enter content. Though the editor displayed correctly, the values were not saving, and would be empty when I reload the page. Checking the UmbracoTraceLog reveals the following error upon "Save and Publish":
2016-12-13 16:21:57,937 [14] ERROR Our.Umbraco.Vorto.Web.PropertyEditors.VortoPropertyEditor+VortoPropertyValueEditor - [Thread 79] Error converting DB value to Editor
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: S. 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.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Our.Umbraco.Vorto.Web.PropertyEditors.VortoPropertyEditor.VortoPropertyValueEditor.ConvertEditorToDb(ContentPropertyData editorValue, Object currentValue)
2016-12-13 16:21:57,984 [14] INFO Umbraco.Core.Publishing.PublishingStrategy - [Thread 79] Content 'Home Page' with Id '1059' has been published.
So it appears there is some issue with using this type. Has anyone else successfully extended Related Links with Vorto?
Thank you,
Michael
I just upgraded to Umbraco 7.3. When the sync is on and I click on another language in the tab nothing happens. Only after disabling the sync checkbox I can switch between languages.
I have some Vorto datatypes, which use the Textstring as the data type to wrap. I'm getting a bunch of errors in the logs relating to these datatypes, such as:
ERROR Our.Umbraco.Vorto.Web.PropertyEditors.VortoPropertyEditor+VortoPropertyValueEditor - Error converting DB value to String
System.NullReferenceException: Object reference not set to an instance of an object.
at Our.Umbraco.Vorto.Web.PropertyEditors.VortoPropertyEditor.VortoPropertyValueEditor.ConvertDbToString(Property property, PropertyType propertyType, IDataTypeService dataTypeService)
I put in some debugging (mainly spitting out the property data) and found that the error is coming from line 152 in VortoPropertyEditor.cs. I've seen 2 strange property data values:
{ "dtdguid": "a8a879d3-69f0-43fd-aab0-07523fbd5286" }
and
{ "dtdGuid": "a8a879d3-69f0-43fd-aab0-07523fbd5286", "dtdguid": "a8a879d3-69f0-43fd-aab0-07523fbd5286" }
I checked the cmsPropertyData table in the DB and found that it happens whenever a Vorto-wrapped Textstring is left blank. If I put in any text, it's fine, but when left blank I get that incorrect data. So it seems that it's not working properly when wrapping a Textstring type in Vorto and leaving it blank.
A great idea from a customer. When doing multi lingual sites and using the grid (and other properties) it makes sense to have a copy/paste function. So copy the english grid to german and then start editing the content. Would take WAY to much time to insert all the grid items again.
Let me know a budget for the function and I can talk to the customer about that. So a win/win :)
Is there a plan to provide a NuGet package for Vorto?
Hi Matt,
I was wondering if you can help me out.
Your documentation tells: "To retrieve the values, Vorto comes with a few handy IPublishedContent extension methods (sorry, no dynamics support yet) namly HasVortoValue and GetVortoValue. These can be used as direct replacements to the built in HasValue and GetPropertyValue methods that come with Umbraco (if the value you are after isn't a Vorto value, it defaults back to the Umbraco implementation)."
As the page summary is shown in my subpage listing, i opened the file "USN_SubPageLisiting" and tried a couple of things to get the votro text for my current language. But everything i do doesn't work.
When i do nothing at all my page shows "Our.Umbraco.Vorto.Models.VortoValue" in place of the value.
I am not a .NET programmer and no Umbraco specialist.
Could you please tell me what to do, to make this work?
See my screenshots below of my current code
I can't think of any reason why you don't want to sync between the language tabs, so it would be good to have an option to hide the sync checkbox.
Any Vorto property causes failure when building POCO models in Zbu.ModelsBuilder giving this error
CS0122: 'Our.Umbraco.Vorto.Models.VortoValue' is inaccessible due to its protection level
I checked the code and found that VortoValue
is marked as internal
in VortoValue.cs
We need to set the path to '/' so the cookie wont be set at '/umbraco/'
Updated to nuget version 1.5.3 and exspected the VortoValue to be public, as changed about 3 months ago.
Does not appear to be public.
The .dll from the zip-package does have a constructor on VortoValue that is public
But doesn't have the #63 fix.
Hi There, awesome editor. Though i can't get it to work with any datatypes on a member?
I found the following code returns null.
vortoResources.getDataTypeByAlias(currentSection, nodeContext.contentTypeAlias, $scope.model.alias).then(function (dataType2) {
$scope.model.value.dtdGuid = dataType2.guid;
At this point dataType2 is "null"
Hi guys.
I can update a property of my content type using code behind and then save the value in each language ?
If so, how can I do?
thank you
Paulo
Hi Matt, We're using Umbraco 7.4.1 and from time to time get different Vorto-related errors. It seems to happen "over night" and not specifically when coding and deploying. The errors are present both locally and in out Test-environment in Azure.
In Umbraco backoffice the properties show up empty, and in our logs and console in Chrome we find at least these 3 errors below. Any chance for som work on Vorto + Umbraco 7.4? We're mid-project and can change to dictionary-items, but it will cost us a day or two, plus different workflow with customer for translations. Thank you.
2016-08-16 12:28:54,592 [70] WARN Odin.Extensions.VortoUrl.ExtensionsForIPublishedContent - System.NullReferenceException: Object reference not set to an instance of an object. at Our.Umbraco.Vorto.Extensions.IPublishedContentExtensions.DoHasVortoValue(IPublishedContent content, String propertyAlias, String cultureName, Boolean recursive) at Our.Umbraco.Vorto.Extensions.IPublishedContentExtensions.HasVortoValue(IPublishedContent content, String propertyAlias, String cultureName, Boolean recursive, String fallbackCultureName) at Our.Umbraco.Vorto.Extensions.IPublishedContentExtensions.DoGetVortoValue[T](IPublishedContent content, String propertyAlias, String cultureName, Boolean recursive, T defaultValue) at Our.Umbraco.Vorto.Extensions.IPublishedContentExtensions.GetVortoValue[T](IPublishedContent content, String propertyAlias, String cultureName, Boolean recursive, T defaultValue, String fallbackCultureName) at Odin.Extensions.VortoUrl.ExtensionsForIPublishedContent.UrlPart(IPublishedContent this, String culture) in C:\projects\ODIN online\Umbraco\Odin\Extensions\VortoUrl\ExtensionsForIPublishedContent.cs:line 20
angular.min.js?cdv=1930127862:63 TypeError: Cannot read property 'values' of undefined at link (http://dev.odinonline.no/App_Plugins/Vorto/js/vorto.js?cdv=1930127862:392:44) at k (http://dev.odinonline.no/umbraco/lib/angular/1.1.5/angular.min.js?cdv=1930127862:44:444) at e (http://dev.odinonline.no/umbraco/lib/angular/1.1.5/angular.min.js?cdv=1930127862:40:139) at k (http://dev.odinonline.no/umbraco/lib/angular/1.1.5/angular.min.js?cdv=1930127862:44:382) at e (http://dev.odinonline.no/umbraco/lib/angular/1.1.5/angular.min.js?cdv=1930127862:40:139) at http://dev.odinonline.no/umbraco/lib/angular/1.1.5/angular.min.js?cdv=1930127862:39:205 at http://dev.odinonline.no/umbraco/lib/angular/1.1.5/angular.min.js?cdv=1930127862:162:213 at Object.fn (http://dev.odinonline.no/umbraco/lib/angular/1.1.5/angular.min.js?cdv=1930127862:90:12) at Object.$digest (http://dev.odinonline.no/umbraco/lib/angular/1.1.5/angular.min.js?cdv=1930127862:90:356) at Object.$apply (http://dev.odinonline.no/umbraco/lib/angular/1.1.5/angular.min.js?cdv=1930127862:92:431)
TypeError: Cannot read property 'no' of undefined at link (http://dev.odinonline.no/App_Plugins/Vorto/js/vorto.js?cdv=1930127862:392:51) at k (http://dev.odinonline.no/umbraco/lib/angular/1.1.5/angular.min.js?cdv=1930127862:44:444) at e (http://dev.odinonline.no/umbraco/lib/angular/1.1.5/angular.min.js?cdv=1930127862:40:139) at k (http://dev.odinonline.no/umbraco/lib/angular/1.1.5/angular.min.js?cdv=1930127862:44:382) at e (http://dev.odinonline.no/umbraco/lib/angular/1.1.5/angular.min.js?cdv=1930127862:40:139) at http://dev.odinonline.no/umbraco/lib/angular/1.1.5/angular.min.js?cdv=1930127862:39:205 at http://dev.odinonline.no/umbraco/lib/angular/1.1.5/angular.min.js?cdv=1930127862:162:213 at Object.fn (http://dev.odinonline.no/umbraco/lib/angular/1.1.5/angular.min.js?cdv=1930127862:90:12) at Object.$digest (http://dev.odinonline.no/umbraco/lib/angular/1.1.5/angular.min.js?cdv=1930127862:90:356) at Object.$apply (http://dev.odinonline.no/umbraco/lib/angular/1.1.5/angular.min.js?cdv=1930127862:92:431)
Hey chum,
We're getting error logs shown in our install. Which is Vorto for Umbraco 1.4.0 on Umbraco 7.3.1
Our.Umbraco.Vorto.Converters.VortoValueConverter - Error converting Vorto value
Newtonsoft.Json.JsonSerializationException: Error converting value 0 to type 'System.Guid'. Path 'dtdguid', line 5, position 15. ---> System.ArgumentException: Could not cast or convert from System.Int64 to System.Guid.
at Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable(Object value, Type initialType, Type targetType)
at Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast(Object initialValue, CultureInfo culture, Type targetType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
This is getting thrown here:
https://github.com/mattbrailsford/Vorto/blob/938c9e6a8c1c1f74819726eef9a6948a3ec85b06/Src/Our.Umbraco.Vorto/Converters/VortoValueConverter.cs#L32
Now I have noticed that the default value in your JavaScript is not a valid guid but I don't know what would cause that property to not be populated. Any idea?
https://github.com/mattbrailsford/Vorto/blob/938c9e6a8c1c1f74819726eef9a6948a3ec85b06/Src/Our.Umbraco.Vorto/Web/UI/App_Plugins/Vorto/js/vorto.js#L31
The way around this, is by adding
if (!angular.isObject($scope.model.value))
$scope.model.value = {};
> before
$scope.model.value = $scope.model.value || {
values: {},
dtdGuid: "00000000-0000-0000-0000-000000000000"
};
Great project!
It would be handy if the VortoValue model was public as for advanced tasks (such as creating content directly using the ContentService) this is necessary. Is there any reason why it's internal?
I am unable to select multiple nodes when using a Vorto-wrapped multi-node tree picker.
The dialog buttons for 'Cancel' and 'Select' are not displayed in the bottom right handside.
Thanks,
Sam
angular.min.js?cdv=1555615759:106 GET http://localhost:24292/umbraco/backoffice/VortoApi/VortoApi/GetLanguages?section=settings&id=149349&parentId=148761&dtdGuid=undefined 400 (Bad Request)
I created a Vorto type that uses a multimediapicker data type, but I am unable to actually add any images. The MMP is configured to start in a specific media folder, but when trying to add an image the Select Media modal window does not actually start in that folder. And if I try to drag/drop or upload an image, it just changes my browser URL to the location of the file on my local system. And if I try to click the Media link in that modal window (to go back to the root media folder), it actually redirects me to the backoffice default landing page (/umbraco/#/).
I have tried it with the Legacy Media Picker and am getting the same results. Seems my only option right now is to use a MNTP, but unfortunately that does not show the selected image in the backoffice.
Running v7.4.3 on Umbraco as a Service with Vorto 1.5.2 and ImageProcessor using an Azure storage CDN.
When marking a field as mandatory, the validation is not triggered when indeed left empty.
Sam
I might be doing this the wrong way - but I have 7 languages specified, and I always want to default to english if a value isn't specified for culture X, so I have to do this all the time
var something = CurrentPage.HasVortoValue("field", "en-US") ? CurrentPage.GetVortoValue("field", "en-US") : "something else - maybe CurentPage.Name";
It would be very comfortable :o) if it was possible to specify "en-US" in web.config or if the "Primary language" dropdown could serve this purpose as well (right now it seem to be indicating which language to show the user as default). Is that possible? I find it tedious to write "en-US" all the time, so I suspect I'm just doing it plain wrong :o)
BR, Jan
The implementation of Vorto for all my input values was successfull.
Now i am trying to create alternative urls for pages in differrent languages, so the navigation-menu's and the links made on the website are picked from the translated Alternative url field.
I am a little bit in the dark here. Can you tell me what's the best approach on this?
Thanks in advance
Just noticed I get an Macro Render Error if the Sting is empty and I call HasVortoValue
Hi!
I'm using Vorto 1.5.3 on Umbraco 7.5.4 and have addeda grid editor to the view. Works fine to load it the first time, add content and so on but when switching back and forth between the language-tabs I get this error after a while:
Cannot read property 'getContent' of null
The error comes from the Umbraco Directives-file (from the RTE-property editor):
var unsubscribe = scope.$on("formSubmitting", function () {
scope.value = tinyMceEditor.getContent();
});
and are thrown when Vorto broadcasts the formSubmitting-event.
var unsubscribe = scope.$on("vortoSyncLanguageValue", function (ev, args) {
if (args.language === scope.language) {
scope.$broadcast("formSubmitting", { scope: scope });
scope.value.values[scope.language] = scope.model.value;
}
});
I guess that the editor is removed from the view and that is why the editor can't find the tinyMceEditor-variable?
Hi Matt
I have been digging around the source for both Vorto and Core about this and I am still a bit uncertain about what causes the problem.
Steps to reproduce:
@using Our.Umbraco.Vorto.Extensions
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
Layout = null;
}
@Model.Content.GetVortoValue("vortoTest")
<hr>
@Model.Content["gridTest"]
This renders these values for the same content. Note the missing properties on editor:
With Vorto
{ "name": "1 column layout", "sections": [ { "grid": 12, "rows": [ { "name": "Headline", "areas": [ { "grid": 12, "controls": [ { "value": "With Vorto", "editor": { "alias": "headline" } } ] } ], "id": "ba6a15a3-1153-299e-1aa8-6fa3915f8f88" } ] } ] }`
Without Vorto
{ "name": "1 column layout", "sections": [ { "grid": 12, "rows": [ { "name": "Headline", "areas": [ { "grid": 12, "controls": [ { "value": "Without Vorto", "editor": { "name": "Headline", "alias": "headline", "view": "textstring", "render": null, "icon": "icon-coin", "config": { "style": "font-size: 36px; line-height: 45px; font-weight: bold", "markup": "<h1>#value#</h1>" } } } ] } ], "id": "13c3e858-eb3f-8efd-df6e-3c9a63a4b924" } ] } ] }
The symptoms are described here http://issues.umbraco.org/issue/U4-7304 but it looks like you inherit from the needed PropertyValueEditorWrapper that should set the missing values?
https://github.com/mattbrailsford/umbraco-vorto/blob/master/Src/Our.Umbraco.Vorto/Web/PropertyEditors/VortoPropertyEditor.cs#L89
Can you tell if this could be related to the converters mentioned here:
https://github.com/mattbrailsford/umbraco-vorto/blob/master/Src/Our.Umbraco.Vorto/Extensions/IPublishedContentExtensions.cs#L130
or if it might be a core issue? I will be happy to submit a pull request, but haven't touched this part of the Umbraco codebase before.
Best regards
Frederik
How to setting custom field for index in Examine?
Now i can't search with field names in NestedContent field.
Please help this for search content in multi lang site!
Thanks you.
Hey,
I am trying to create nodes from code. These nodes have e.g VortoTextField (aka TextString wrapped in Vorto).
Are there any guidelines on how to set the values for all languages?
I found this: #9 , but maybe there were some changes regarding the model classes (VortoValue still seems to be internal)
When specifying language node in the Language Nodes XPath field I have been using the variable $ancestorOrSelf to find the startpage of the site. This works fine when first creating a page, but when choosing to just save the page, not publish, the languages disappear from my properties. If I choose to publish the page the languages are displayed again.
This is my xpath:
$ancestorOrSelf/ancestor-or-self::StartPage
I'm using Vorto 1.5.3 and Umbraco 7.5.7.
I just installed the most recent 1.4 package and I am getting the following error:
CS0121: The call is ambiguous between the following methods or properties: 'Our.Umbraco.Vorto.Extensions.IPublishedContentExtensions.GetVortoValue(Umbraco.Core.Models.IPublishedContent, string, string, bool, object)' and 'Our.Umbraco.Vorto.Extensions.IPublishedContentExtensions.GetVortoValue(Umbraco.Core.Models.IPublishedContent, string, string, string, bool, object)'
I am running Umbraco 7.1.9.
Also, if I force the method by calling @Model.Content.GetVortoValue("vortoTitle"), null, null, false, null) I get the dreaded Object reference not set to an instance of an object that was detailed here - https://our.umbraco.org/projects/backoffice-extensions/vorto/bugs-feedback-suggestions/55572-Strange-GetVortoValue%28%29-nullreference-Exception?p=0
.
When Vorto tries to convert the data to the source preview is set to false. When you try to preview the content you will still see the preview version of the content (because that is what Vorto is trying to convert), but internal links in the RTE to unpublished content will not will work.
I tried to upgrade the 1-1 multilingual example to Vorto 1.5.
When I have an empty value in Vorto I get an Object reference not set to an instance of an object.
The error happens with the following code:
var urlSegment = this.GetVortoValue<string>("urlSegment", culture);
https://github.com/jbreuer/1-1-multilingual-example/blob/master/Sources/Umbraco.Extensions/Models/UmbMaster.cs#L55
This is the stack trace:
at Our.Umbraco.Vorto.Extensions.IPublishedContentExtensions.DoInnerGetVortoValue[T](IPublishedContent content, String propertyAlias, String cultureName, Boolean recursive, T defaultValue)
at Our.Umbraco.Vorto.Extensions.IPublishedContentExtensions.DoGetVortoValue[T](IPublishedContent content, String propertyAlias, String cultureName, Boolean recursive, T defaultValue)
at Our.Umbraco.Vorto.Extensions.IPublishedContentExtensions.GetVortoValue[T](IPublishedContent content, String propertyAlias, String cultureName, Boolean recursive, T defaultValue, String fallbackCultureName)
at Umbraco.Extensions.Models.UmbMaster.GetUrlSegment(String culture) in d:\data\inetpub\1-1-multilingual-example\Sources\Umbraco.Extensions\Models\UmbMaster.cs:line 55
at Umbraco.Extensions.UrlProviders.MultilingualUrlProvider.<>c__DisplayClass3.<GetUrl>b__0() in d:\data\inetpub\1-1-multilingual-example\Sources\Umbraco.Extensions\UrlProviders\MultilingualUrlProvider.cs:line 80
at Umbraco.Core.Cache.CacheProviderExtensions.<>c__DisplayClass9`1.<GetCacheItem>b__8()
at Umbraco.Core.Cache.DictionaryCacheProviderBase.<>c__DisplayClass1.<GetSafeLazy>b__0()
Do you need any more info?
If I have a simple text field in multiple languages, and I empty the value of the text field in all languages, the Vorto JS breaks when publishing twice in a row.
Steps:
I think it's the assignment of undefined
that causes the issue. If you replace undefined
with {}
, it seems to work just fine.
Hi Matt,
We see above error in the console of the browser with Vorto fields that doesn't have values yet.
Steps to reproduce
I noticed in the umbraco.config file that the value is null.
<title></title>Using Umbraco 7.4.3 with latest Vorto release.
Hi,
this code throws the following exception. If there is a value in the property, it works but without, I got the error.
if(Model.Content.HasVortoValue("keywords", recursive: true))
{
keywords = Model.Content.GetVortoValue("keywords", recursive: true).ToString();
}
Exception:
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei Our.Umbraco.Vorto.Extensions.IPublishedContentExtensions.DoInnerGetVortoValue[T](IPublishedContent content, String propertyAlias, String cultureName, Boolean recursive, T defaultValue)
bei Our.Umbraco.Vorto.Extensions.IPublishedContentExtensions.GetVortoValue[T](IPublishedContent content, String propertyAlias, String cultureName, Boolean recursive, T defaultValue, String fallbackCultureName)
bei Our.Umbraco.Vorto.Extensions.IPublishedContentExtensions.GetVortoValue(IPublishedContent content, String propertyAlias, String cultureName, Boolean recursive, Object defaultValue, String fallbackCultureName)
bei ASP._Page_Views_MacroPartials_Metatags_cshtml.Execute()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.