Kentico / xperience-by-kentico-tag-manager

Enabling marketers to include prebuilt and custom tags into a website channel. Prebuilt are GTM, GA4, VWO, Intercom, MS Clarity
MIT License
2 stars 1 forks source link

Application is referencing nonexistent file `ktc-tagmanager.js` #30

Closed Lahvac closed 1 week ago

Lahvac commented 1 month ago

Describe the bug The application shows 404 in browser console for file _content/Kentico.Xperience.TagManager/js/ktc-tagmanager.js

The file was removed in commit https://github.com/Kentico/xperience-by-kentico-tag-manager/pull/18/commits/49eb5ba3a2bc919298e254a73da975d2d6bf4494 but the scritp tag pointing to this location is still rendered by https://github.com/Kentico/xperience-by-kentico-tag-manager/blob/main/src/Kentico.Xperience.TagManager/Rendering/CodeSnippetTagHelperComponent.cs

To Reproduce Steps to reproduce the behavior:

  1. Install Kentico.Xperience.TagManager 3.0 or later
  2. run the app
  3. Open browser console on any page
  4. It contains the 404 error

Expected behavior The file was removed in commit https://github.com/Kentico/xperience-by-kentico-tag-manager/pull/18/commits/49eb5ba3a2bc919298e254a73da975d2d6bf4494 but the scritp tag pointing to this location is still rendered by https://github.com/Kentico/xperience-by-kentico-tag-manager/blob/main/src/Kentico.Xperience.TagManager/Rendering/CodeSnippetTagHelperComponent.cs

The file should either be provided by the nuget or the script tag should not be rendered.

Library Version 3.0.0-3.1.0

seangwright commented 4 weeks ago

I believe the Kentico.Xperience.TagManager.csproj has a copy/pasted line that is incorrect.

BeforeTargets="NpmBuildClient" should be BeforeTargets="NpmBuildHelpScript"

After this change, someone needs to validate that a Release build creates a ktc-tagmanager.js in the wwwroot folder of the build output and that file is included in the generated NuGet package.