Library version cannot pe processed, hence JS error "klaro is not defined"

Created on 10 August 2020, over 4 years ago
Updated 5 July 2024, 5 months ago

Problem/Motivation

The klaro JS library cannot be processed correctly. Therefore, the script is not loaded - resulting in a JS error: "klaro is not defined"

Steps to reproduce

Install latest D7, install the current klaro library (v0.4.27) https://github.com/kiprotect/klaro/releases/tag/v0.4.27
install & activate klaro. You should see the status "Not detected" in /admin/reports/libraries and get the JS error already mentioned above when clicking on the "Manage cookie consent" button

Proposed resolution

In hook klaro_libraries_info(), set the value for 'version arguments' => ['lines' => 80] to a much higher value, e.g. 80.

As you can see in the package.json of the current (0.4.27) klaro JS library, the version info is in line 68, right at the end of the file and therefore cannot be processed with the given parameter that allows reading up to 5 lines only. That parameter defaults to 20 so the only way seems to be to adjust this parameter to a much higher value.

πŸ› Bug report
Status

RTBC

Version

1.1

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany kgertz Konstanz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024