Open FinnMacCumail opened 7 years ago
What version are you using? Do you actually have a custom Link.Edit.cshtml file? You should have both changes if you didn't do anything special with this file.
I'm using Orchard v.1.10.1.0
Viewing the git history of the files Link.edit.cshtml - the last commit f51c8a72 does not define the var IsRequired?
var isRequired = settings.Required && String.IsNullOrWhiteSpace(settings.DefaultValue);
var isTextRequired = settings.LinkTextMode == LinkTextMode.Required && String.IsNullOrWhiteSpace(settings.TextDefaultValue);
It has been lost during this merge on dev : https://github.com/OrchardCMS/Orchard/commit/c8a4def111065c5bb2039638ce9507604ab51e55
Is someone on this issue? I fixed it for my own Orchard installation. Should I make a pull request?
Upon writing a custom module that uses the following Field migration -
The Link.Edit template renders the error - Compiler Error Message: CS0103: The name 'isRequired' does not exist in the current context
If I include the following line of code from commit be323ab, the code runs fine?
var isRequired = settings.Required && String.IsNullOrWhiteSpace(settings.DefaultValue);