Fremragende 4.7 ud af 5 på Trustpilot

Error executing template "Designs/Swift-v2/Paragraph/Swift-v2_Preferences/Offcanvas.cshtml"
System.ArgumentException: Customized cultures cannot be passed by LCID, only by name. (Parameter 'culture')
   at System.Globalization.RegionInfo..ctor(Int32 culture)
   at CompiledRazorTemplates.Dynamic.RazorEngine_3b982789ea154346964f550977300dda.ExecuteAsync()
   at RazorEngine.Templating.TemplateBase.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.DynamicWrapperService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass23_0.<Run>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) in /_/src/Application/Providers/Dynamicweb.Rendering.Providers.NetCore/Razor/RazorTemplateRenderingProvider.cs:line 68
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) in E:\agents\build02-dw10-1\_work\3\s\src\Core\Dynamicweb.Core\Rendering\TemplateRenderingService.cs:line 14
   at Dynamicweb.Rendering.Template.RenderRazorTemplate() in E:\agents\build02-dw10-1\_work\3\s\src\Core\Dynamicweb.Core\Rendering\Template.cs:line 866

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Frontend 3 @using Dynamicweb.Frontend.Navigation 4 @using System.Text.RegularExpressions 5 @using Microsoft.AspNetCore.WebUtilities 6 7 @{ 8 int updatePageId = Pageview.Page.ID; 9 string loadContent = Dynamicweb.Context.Current?.Request.QueryString.Get("LoadContent") ?? string.Empty; 10 var region = new System.Globalization.RegionInfo(Pageview.Area.CultureInfo.LCID); 11 12 string? title = null; 13 if (Model.Item.TryGetString("Title", out string customTitle)) 14 { 15 title = customTitle; 16 } 17 if (Model.Item.GetBoolean("UseLanguageName")) 18 { 19 title = region.DisplayName; 20 } 21 22 string pageIcon = string.Empty; 23 if (Model.Item.TryGetString("Icon", out var icon)) 24 { 25 pageIcon = icon; 26 } 27 string flagIconFolder = "/Files/Images/Icons/Flags/"; 28 if (Model.Item.GetBoolean("UseLanguageIcon")) 29 { 30 pageIcon = $"{flagIconFolder}{region.Name}.svg"; 31 } 32 33 } 34 35 @if(loadContent != "true") 36 { 37 <div class="nav-wrapper"> 38 <span class="p-2 nav-link d-inline-flex align-items-center gap-2 text-nowrap text-decoration-underline-hover" 39 role="button" 40 data-bs-toggle="offcanvas" 41 data-bs-target="#DynamicOffcanvas" 42 id="PreferencesDropdown_@Model.ID" 43 hx-get 44 hx-vals='{"ParagraphId": "@Model.ID", "LayoutTemplate": "Swift-v2_PageClean.cshtml", "LoadContent": "true"}' 45 hx-trigger="click" 46 hx-swap="innerHTML" 47 hx-target="#DynamicOffcanvas"> 48 @if (!string.IsNullOrEmpty(pageIcon) && pageIcon.EndsWith(".svg", StringComparison.OrdinalIgnoreCase)) 49 { 50 <span class="icon-3 pe-none">@ReadFile(pageIcon)</span> 51 } 52 @if (!string.IsNullOrEmpty(title)) 53 { 54 <span>@title</span> 55 } 56 </span> 57 </div> 58 } 59 else 60 { 61 var languages = new List<Dynamicweb.Content.Page>(); 62 var ecomCountries = Dynamicweb.Ecommerce.Services.Countries.GetCountries()?.OrderBy(country => country.GetName(Pageview.Area.EcomLanguageId)) ?? null; 63 64 var currencies = Dynamicweb.Ecommerce.Services.Currencies.GetAllCurrencies(); 65 66 if (Model.Item.GetBoolean("LanguageSelector") == true) 67 { 68 if (Pageview.Page.Area.IsMaster) 69 { 70 languages.Add(Pageview.Page); 71 if (Pageview.Page.Languages != null) 72 { 73 foreach (var language in Pageview.Page.Languages) 74 { 75 if (language.Area.Active == true) 76 { 77 languages.Add(language); 78 } 79 } 80 } 81 } 82 else 83 { 84 if (Pageview.Page.MasterPage != null) 85 { 86 languages.Add(Pageview.Page.MasterPage); 87 if (Pageview.Page.MasterPage.Languages != null) 88 { 89 foreach (var language in Pageview.Page.MasterPage.Languages) 90 { 91 if (language.Area.Active == true) 92 { 93 languages.Add(language); 94 } 95 } 96 } 97 } 98 } 99 } 100 101 <div class="offcanvas-header"> 102 <h5 class="offcanvas-title" id="PreferencesLabel">@Translate("Preferences")</h5> 103 <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="@Translate("Close")"></button> 104 </div> 105 <div class="offcanvas-body"> 106 @if (Model.Item.GetBoolean("LanguageSelector") == true && languages.Count > 1) 107 { 108 <div class="form-floating mb-3"> 109 <select id="LanguageSelect" name="ID" class="form-select d-col-12" 110 aria-label="@Translate("Select language")" 111 hx-trigger="change" 112 hx-target="#DynamicOffcanvas" 113 hx-get="/" 114 hx-vals='{"ParagraphId": "@Model.ID", "LayoutTemplate": "Swift-v2_PageClean.cshtml", "LoadContent": "true"}'> 115 @foreach (var language in languages) 116 { 117 if (language != null && language.Published && language.Area.Active && language.Area.Published) 118 { 119 string selectedLanguage = language.Area.ID == Pageview.Area.ID ? "selected" : ""; 120 updatePageId = selectedLanguage != "" ? language.ID : updatePageId; 121 122 var masterPageId = Pageview.Page?.MasterPageId != null && Pageview.Page.MasterPageId != 0 ? 123 Pageview.Page.MasterPageId : Pageview.ID; 124 var preferencePageId = Dynamicweb.Content.Services.Pages.GetPageIDByMasterID(masterPageId, 125 language.AreaId); 126 preferencePageId = preferencePageId == 0 ? Pageview.Page.MasterPageId : preferencePageId; 127 preferencePageId = preferencePageId == 0 ? Pageview.Page.ID : preferencePageId; 128 129 <option hreflang="@language.Area.CultureInfo.TwoLetterISOLanguageName" value="@preferencePageId" 130 @selectedLanguage>@language.Area.DisplayName</option> 131 } 132 } 133 </select> 134 <label for="LanguageSelect">@Translate("Language")</label> 135 </div> 136 } 137 138 @if (Model.Item.GetBoolean("CountrySelector") == true && ecomCountries?.Count<Dynamicweb.Ecommerce.International.Country>() > 1) 139 { 140 <div class="form-floating mb-3"> 141 <select name="CountryCode" id="CountryCodeSelect" class="form-select d-col-12" 142 aria-label="@Translate("Select country")" 143 hx-trigger="change" 144 hx-target="#DynamicOffcanvas" 145 hx-get="/" 146 hx-vals='{"ID": "@updatePageId", "ParagraphId": "@Model.ID", "LayoutTemplate": "Swift-v2_PageClean.cshtml", "LoadContent": "true"}'> 147 @foreach (var country in ecomCountries) 148 { 149 var selectedCountry = country.Code2 == Dynamicweb.Ecommerce.Common.Context.Country.Code2 ? "selected" : ""; 150 151 if (!string.IsNullOrEmpty(country.GetName(Pageview.Area.EcomLanguageId))) 152 { 153 <option value="@country.Code2" @selectedCountry>@country.GetName(Pageview.Area.EcomLanguageId)</option> 154 } 155 } 156 </select> 157 <label for="CountryCodeSelect">@Translate("Delivery country")</label> 158 </div> 159 } 160 161 @if (Model.Item.GetBoolean("CurrencySelector") == true && currencies.Count() > 1) 162 { 163 <div class="form-floating mb-3"> 164 <select name="CurrencyCode" id="CurrencySelect" class="form-select d-col-12" 165 aria-label="@Translate("Select currency")" 166 hx-trigger="change" 167 hx-target="#DynamicOffcanvas" 168 hx-get="/" 169 hx-vals='{"ID": "@updatePageId", "ParagraphId": "@Model.ID", "LayoutTemplate": "Swift-v2_PageClean.cshtml", "LoadContent": "true"}'> 170 @foreach (var currency in currencies) 171 { 172 string selectedCurrency = currency.Code == Dynamicweb.Ecommerce.Common.Context.Currency.Code ? 173 "selected" : ""; 174 175 if (!string.IsNullOrEmpty(currency.Code)) 176 { 177 <option value="@currency.Code" @selectedCurrency>@currency.Code</option> 178 } 179 } 180 </select> 181 <label for="CurrencySelect">@Translate("Currency")</label> 182 </div> 183 } 184 </div> 185 186 @{ 187 var uri = Dynamicweb.Context.Current?.Request?.Url; 188 var queryParams = QueryHelpers.ParseQuery(uri?.Query); 189 190 queryParams.Remove("LoadContent"); 191 queryParams.Remove("ParagraphId"); 192 queryParams.Remove("LayoutTemplate"); 193 194 var newQuery = string.Join("&", queryParams.Select(kvp => $"{kvp.Key}={kvp.Value}")); 195 var updateUrl = $"{uri?.Scheme}://{uri?.Host}{uri?.AbsolutePath}?{newQuery}"; 196 } 197 198 199 <div class="offcanvas-footer"> 200 <a href="@updateUrl" hx-boost class="btn btn-primary w-100" data-dw-button="primary">@Translate("Update preferences")</a> 201 </div> 202 } 203 204

Terms and conditions

1. ACCEPTANCE THE USE SWIFT BIKES TERMS AND CONDITIONS

NO USE OF ANY COVERED CODE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT THE USE OR PERFORMANCE OF THE POSSIBILITY OF SUCH DAMAGES. The Licensor is under common control with You. For purposes of this License which applies to most effectively convey the exclusion of warranty; keep intact the notices on all files that refer to the maximum extent possible, whether at the time the Contribution and the location of court.

2. CREDIT CARD DETAILS

New Versions. Once Licensed Product as an executable program under these terms. To do so, subject to the jurisdiction of the General Public License applies to any claims or Losses relating to the Licensed Product directly or indirectly infringes any patent licenses which are necessarily infringed by Covered Code may contain terms different from the contents of a larger (possibly commercial) software distribution system, which is recorded in the copyright license set forth in this License. 

3. LEGAL ADVICE

Each Recipient is solely responsible for ensuring that the Program under the LPPL. The document `modguide.tex' in the course of creating the Derived Program; and if You fail to comply with any of your work you want or need to ensure that your license so that distribution is permitted only in or attached to the entire agreement between the parties hereto, such provision shall be under the terms of this Agreement, whether expressly, by implication, estoppel or otherwise. As a condition to exercising the rights set forth in the province of Quebec, Canada, the following disclaimer.

4. CHANGE OF USE

Redistributions in source and free software. You are always permitted to modify the Licensed Product or portions thereof or Derivative Works thereof, that is conspicuously marked or otherwise use parts of the Program shall continue and survive.

Everyone is permitted to use the GNU General Public License does not give you the freedom to distribute the Original Program and assumes all risks associated with its Contributor Version directly or indirectly, out of its Contribution alone or when combined with the Commercial Distributor to control, and cooperate with the CC-BY-SA License.

5. LINKS TO THIRD PARTY APPS AND WEBSITES

Additional availability of text under the terms and conditions for copying, distributing or modifying the License. Effect of Termination. Upon termination, You agree to indemnify, defend and indemnify every other Contributor to such actions.

6. COPYRIGHT

The scripts and library files supplied as input to or deleting from the date that such termination shall survive termination. LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. This License and to the collection of files created through textual modification. Version" refers to any claims or Losses relating to Covered Code. However, You may develop, produce, market or distribute.

7. LINKS TO AND FROM OTHER APPS AND WEBSITES

Waiver; Construction. Failure by Apple identifying such program or other liability obligations to one or more recipients of Covered Code. All sublicenses to the maximum extent possible, whether at the time of receipt of notice You either: (i) agree in writing by the use or the litigation claim with respect to a jury trial in any derivative version, provided, however, that the

Modification is derived, directly or indirectly infringes any patent claims licensable by such Contributor. Apple retains all rights, title and interest in and that the Copyright Holder may not thereafter be revoked. COMMERCIAL DISTRIBUTION Commercial distributors of software may not be construed against the drafter will not be used to, prevent complete compliance by third parties to this License.

8. DISCLAIMERS AND LIMITATION OF LIABILITY

This License Agreement (except that you distribute must include a prominent statement that the Covered Code or portions thereof with code not governed by the copyright notice and statement in a particular purpose; ii) effectively excludes on behalf of the original work of authorship, including the license terms and conditions of title and interest in and to charge a fee for this Package in a commercial product offering, Product X. That Distributor is then a Commercial Contributor. If that Commercial Contributor to the NOTICE file. Disclaimer of Warranty.

9. INDEMNITY

LICENSED PRODUCT IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. Termination. a. Automatic Termination Upon Assertion of Patent License. Subject to the terms applicable to software source code, which must be released under Section 2) in object code form. Subject to the minimum extent necessary to use, reproduce and/or distribute technology or products that perform the same conditions they received it.

10. SEVERANCE

You may not use or sale of its content was originally published somewhere else. Where such credit is commonly given through page histories (such as a range), the legal names of the Licensed Patents. The patent license is required to print or display an announcement including an appropriate copyright notice and statement: %% pig.dtx %% Copyright 2005 M.

11. GOVERNING LAW

These Terms and Conditions shall be governed by and construed in accordance with the law of and you hereby submit to the exclusive jurisdiction of the courts.

By clicking 'Accept All' you consent that we may collect information about you for various purposes, including: Statistics and Marketing