• Resolved kovacev

    (@kovacev)


    Hello MxChat ,

    I think I noticed several issues in version 3.x that did not exist in version 2.
    I hope you can review them because they significantly affect the usability of the knowledge base feature.

    1. Shortcode handling in WordPress Content import

    I import WordPress pages into the knowledge base using the WordPress Content option.

    Some pages contain dynamic content generated via shortcodes.
    For example: https://bio-vitamini.com/dostava/

    On this page, shipping prices are not stored as plain text but generated via my own shortcodes (e.g. [shortcode-1], [shortcode-2]) so they can be centrally managed.

    On the frontend the HTML appears as:

    Trošak dostave
    InTime – Za sve narudžbe iznad 60,00 € usluga slanja je besplatna, 0 €, manje narudžbe 4,00 €.
    GLS – Za sve narudžbe iznad 60,00 € usluga slanja iznosi 3,00 €, manje narudžbe 6,00 €.
    BoxNow paketomati – Za sve narudžbe iznad 30,00 € usluga slanja je besplatna, manje narudžbe 2,00 €.

    However, after importing the page into MxChat Basic v3, the knowledge base content looks like this:

    Trošak dostave
    – Za sve narudžbe iznad € usluga slanja je €, manje narudžbe €.
    – Za sve narudžbe iznad € usluga slanja iznosi €, manje narudžbe €.
    – Za sve narudžbe iznad € usluga slanja je besplatna, manje narudžbe €.

    It appears that:

    • shortcode content is not parsed
    • values generated by shortcodes are missing
    • part of the HTML structure (e.g. bold text like InTime, GLS, BoxNow) is also removed

    In version 2 of the plugin, at least the shortcode text itself was visible.

    It seems that the current version does not support shortcode parsing or preserving HTML structure during import.

    Ideally:

    • shortcodes should be parsed before storing the content in the knowledge base
      or
    • HTML/shortcodes should at least be preserved in the stored text.


    2. Knowledge Base content can no longer be edited (v3)

    In MxChat v2, it was possible to manually edit knowledge base entries after importing them.

    In version 3.x.x this is no longer possible.

    The only option available is deleting the entire entry, without the ability to modify it.

    This is especially problematic when using DIRECT CONTENT.

    After adding custom content:

    • it can be saved
    • but it cannot be edited later

    The only option is deleting and recreating the entry, which is highly impractical and unnecessarily consumes additional tokens.

    For practical knowledge base management, editing entries is essential.


    3. DIRECT URL – is the content automatically refreshed?

    When adding pages using the DIRECT URL option (for example the shipping page), it is not clear whether the content:

    • automatically refreshes when the page content changes
      or
    • must be manually deleted and re-imported

    If automatic refresh is not implemented, this creates a serious usability issue because:

    • website content can change over time
    • users would need to remember to manually delete and re-import pages
    • which also consumes additional tokens

    Could you please clarify how this currently works?


    4. Debug logs written even when logging is disabled

    The plugin includes options to disable logging.

    However, even with logging disabled, debug messages are still written to the global PHP error_log.

    Example:

    /plugins/mxchat-basic/includes/class-mxchat-integrator.php

    error_log(“=== MXCHAT DEBUG: Starting chat request ===”);
    error_log(“MXCHAT DEBUG: Bot ID received: ” . $b….);

    These entries continuously fill the global error log.

    The issue is that I use this log for real PHP errors and critical plugin issues, so it becomes difficult to locate actual problems.

    In production versions of plugins, debug logging should ideally be:

    • removed or commented out: //error_log(…);
    • or wrapped in a debug condition

    for example:

    if ($debug_enabled) {
    error_log(…);
    }

    I hope you will consider my suggestions for the benefit of all users.
    Kind regards

    Thank you for your time!

    The page I need help with: [log in to see the link]

You must be logged in to reply to this topic.