I am getting a really strange issue with Models builder on a customers live environment.
Say I have a Textstring property on a Document Type called testProperty.
I am then using this property on a view where I pass it into a helper function.
the helper function expects a string e.g
MyHelper.DoSomething(Model.TestProperty)
The type of the testProperty should be automatically recognised as a string and this is the case on my local environment however on the live environment I get an error:
The best overloaded method match for 'MyHelper.DoSomething(string)' has some invalid arguments
Changing the call to the helper to the following works:
My client had changed settings in ~/config/umbracoSettings.config. Not entirely sure what setting was causing the issue though. The settings we changed were:
Strange Issue with Models Builder
Hi Folks,
I am getting a really strange issue with Models builder on a customers live environment.
Say I have a Textstring property on a Document Type called testProperty.
I am then using this property on a view where I pass it into a helper function.
the helper function expects a string e.g
The type of the testProperty should be automatically recognised as a string and this is the case on my local environment however on the live environment I get an error:
The best overloaded method match for 'MyHelper.DoSomething(string)' has some invalid arguments
Changing the call to the helper to the following works:
Anyone have any ideas why this is happening on the live environment?
Cheers,
Marc
Just to add to this, carried out some testing which is making this issue even more confusing.
Running this line of code gives me: System.String
So the type of the variable is recognised however when I pass the variable into the function it is no longer recognised as a string.
Heeeeeelllppppppp!!!
Hi Marc,
Did you figure out why this happens?
I'm seeing the same problem and it bugs me to no end having to do
Alias.ToString()
everything orGetPropertyValue<string>("alias")
.../Chriztian
Hi Christian,
My client had changed settings in ~/config/umbracoSettings.config. Not entirely sure what setting was causing the issue though. The settings we changed were:
1.
changed to
2.
changed to
is working on a reply...