kontent-ai/smart-link

Missing data-kontent-language-codename attribute logs project ID error to console.

kentico-michaelb opened this issue · 0 comments

Brief bug description

While using SmartLink SDK in Web Spotlight, when data-kontent-language-codename is missing, the error:
Logger.js:15 [KSL][Error]: Project ID is required to handle element click.

is logged to the browser console, even if the kontent-data-project-id attribute is set correctly in the markup.

Repro steps

  1. Open up a WSL project with SL SDK
  2. Remove the data-kontent-language-codename attribute using Chrome DevTools
  3. Click a SL SDK edit button
  4. See browser console error in DevTools

Expected behavior

The console should only report that there is an issue with the language codename element, not the project ID.

Test environment

  • Platform/OS: Windows 10, gatsby-starter-kontent-lumen sample site, gatsby-source-kontent 7.2.0, SL SDK v2.1.0
  • Browser Chrome
  • Version 96.0.4664.110

Screenshots

image

image