I tried recently to upgrade my website from U7.15.6 to U8. I just copied /bin /umbraco /config to my current website using FileZilla
When I tried to roll back to U7.15.6 I got the following error:
The call is ambiguous between the following methods or properties: 'Umbraco.Web.UmbracoHelper.Media(params int[])' and 'Umbraco.Web.UmbracoHelper.Media(params string[])' Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: The call is ambiguous between the following methods or properties: 'Umbraco.Web.UmbracoHelper.Media(params int[])' and 'Umbraco.Web.UmbracoHelper.Media(params string[])'
Source Error:
Line 20: var section_node = Umbraco.Content(1xxx);
Line 21: var Section_pagesToList = @Section_node.Children.Where("Visible");
Line 22: Section_pagesToList = Section_node.DescendantsOrSelf().Where("NodeTypeAlias == @0", "NewsPage");
So what I did, I changed Line 21 as follow:
string[] Section_pagesToList = @Section_node.Children.Where("Visible");
But now I'm getting another error in other part of the page - where I display the feature image of this section:
Line 81: <div class="col-xl-6 col-lg-6 col-md-4 MainNewsBox">
Line 82: <figure>
Line 83: @if (Section_pagesToList.Last().HasValue("articleImg"))
The error in line 83 is:
Compiler Error Message: CS1929: 'string' does not contain a definition for 'HasValue' and the best extension method overload 'PublishedContentExtensions.HasValue(IPublishedContent, string)' requires a receiver of type 'IPublishedContent'
How can I resolved it and bring my website back?
Thanks.