When nopCommerce is hosted on IIS virtual directory, the WebHelper ModifyQueryString method generates incorrect paths for local URLs.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
When nopCommerce is hosted on IIS virtual directory, the method WebHelper.ModifyQueryString generates incorrect paths for local URLs. The method duplicates the virtual directory path part within the URL.

This happens in:
* nopCommerce version 4.2
* no custom code

Reproduce unit test (put the test into nopCommerce\src\Tests\Nop.Core.Tests\WebHelperTests.cs).

[Test]
public void Can_modify_queryString_in_virtual_directory()
{
  _httpContext.Request.PathBase = "/nopCommercepath";
  _webHelper.ModifyQueryString("/nopCommercepath/Controller/Action", "param1", "value1").ShouldEqual("/nopCommercepath/Controller/Action?param1=value1");
}


In image form:
4 years ago
Thanks for pointing out this bug. Here is a work item.
4 years ago
Done. Please see this commit.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.