Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Knowledge base tags not shown when editing tags #15

Open
hackeresq opened this issue Dec 5, 2023 · 2 comments
Open

Knowledge base tags not shown when editing tags #15

hackeresq opened this issue Dec 5, 2023 · 2 comments

Comments

@hackeresq
Copy link

When trying to edit the tags on an existing article, the KB tags are not shown. Looks like the .KnowledgeBaseTagSelector is not being injected into the modal div element.

Screenshot 2023-12-05 at 2 35 06 PM

When manually adding that class to the div, I see the appropriate tags.

Is this an easy fix?

@hackeresq
Copy link
Author

hackeresq commented Dec 5, 2023

Tracked it down. Should be super easy to resolve. The "edit tags" button is using the TagDiscussionModal class. Rather it should be using the KnowledgeBadeTagModal class.

The relevant code for creating a new article correctly references the KnowledgeBadeTagModal class:

Screenshot 2023-12-05 at 3 02 09 PM

The KnowledgeBadeTagModal class extends the TagDiscussionModal class:

Screenshot 2023-12-05 at 3 00 14 PM

The edit article editor incorrectly uses the underlying TagDiscussionModal class. This should really be usingKnowledgeBadeTagModal:

Screenshot 2023-12-05 at 2 59 28 PM

@hackeresq
Copy link
Author

Anyone else having this issue can use this scriptmonkey script:

// ==UserScript==
// @name         Add modal class for knowledgebase
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://support.lumifylabs.com/knowledgebase/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=lumifylabs.com
// @grant        none
// ==/UserScript==

(function() {

    const $ = document.querySelector.bind(document);


    let int = setInterval(()=>{
        let modal = $('div.TagDiscussionModal:not(.KnowledgeBaseTagSelector)')

        if (modal) {
            console.log('found!')

            modal.classList.add("KnowledgeBaseTagSelector");

            //window.clearInterval(int);

        }
        console.log('still looking')
    }, 1500);

})();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant