3.0.2 'quote selected' links do nothing

Created on 16 August 2023, over 1 year ago
Updated 15 October 2023, about 1 year ago

The module was working well until a recent update. I think it was when I went to the current 3.0.2.
I had to disable the module due to being too busy to troubleshoot at the time.

What's happening now occurs in multiple themes, including Olivero.

In my configuration, I only have "quote selected" enabled in the module configuration quote modes (at admin/config/content/quote).
I have three content types and comments enabled.

I observe the same problem with 'quote selected' links on both nodes and comments.

On both the node and the comments, the 'quote selected' link exists as a URl but doesn't do anything when clicked, and appears to be constructed incorrectly:
With path aliasing enabled, the quote selected links take the format of https://example.com/alias/##
With path aliases disabled for the content type, the 'quote selected' link looks like https://example.com/node/nid##

Some things I've tested:
* Multiple content types
* Changing the text format to CKeditor5 and back
* Switching themes
* Clearing cache

No observed difference so far.

(This might be a duplicate of https://www.drupal.org/project/quote/issues/3369098 πŸ’¬ The module does not work for me Closed: cannot reproduce - but not enough info on that one to tell)

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States aharown07

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

Comments & Activities

  • Issue created by @aharown07
  • πŸ‡ΊπŸ‡ΈUnited States aharown07
  • πŸ‡ΊπŸ‡ΈUnited States aharown07

    Took a look at another test site where I have 3.0.1 version of the module installed.
    The module works as expected there.
    The links also look the same (root/path##), so that's apparently not relevant.
    This other test site has all the same other modules I believe. It is on Drupal 9.5.4 though, if that matters.

    Rewording the issue title to be more vague but less inaccurate.

  • ivnish Kazakhstan

    Hi!

    Do you have any JS errors in browser console?

  • πŸ‡ΊπŸ‡ΈUnited States aharown07

    Yes. On click... Uncaught Error: Syntax error, unrecognized expression: ##
    Here's the whole dump. I do not really know what any of this means.

    Uncaught Error: Syntax error, unrecognized expression: ##
        at se.error (js_Lw8Eex-_h9s3YWHkSTsC-5uusyLUgV2ahMRbERVGoYs.js:2:13911)
        at se.tokenize (js_Lw8Eex-_h9s3YWHkSTsC-5uusyLUgV2ahMRbERVGoYs.js:2:21922)
        at se.select (js_Lw8Eex-_h9s3YWHkSTsC-5uusyLUgV2ahMRbERVGoYs.js:2:22749)
        at Function.se [as find] (js_Lw8Eex-_h9s3YWHkSTsC-5uusyLUgV2ahMRbERVGoYs.js:2:7196)
        at E.fn.init.find (js_Lw8Eex-_h9s3YWHkSTsC-5uusyLUgV2ahMRbERVGoYs.js:2:25319)
        at new E.fn.init (js_Lw8Eex-_h9s3YWHkSTsC-5uusyLUgV2ahMRbERVGoYs.js:2:25808)
        at E (js_Lw8Eex-_h9s3YWHkSTsC-5uusyLUgV2ahMRbERVGoYs.js:2:1051)
        at HTMLAnchorElement.handleFragmentLinkClickOrHashChange (js_vHpQSPK6DLv5mdZ1Zo1ftvC16jeAL1Z9OC_mZWID2dI.js:305:21)
        at HTMLAnchorElement.<anonymous> (js_v5UIu0v1tn9EUi1BL-qTK9PExxraHyDNwfMf2qO1aOY.js:140:21)
        at HTMLDocument.dispatch (js_Lw8Eex-_h9s3YWHkSTsC-5uusyLUgV2ahMRbERVGoYs.js:2:43336)
    se.error @ js_Lw8Eex-_h9s3YWHkSTsC-5uusyLUgV2ahMRbERVGoYs.js:2
    se.tokenize @ js_Lw8Eex-_h9s3YWHkSTsC-5uusyLUgV2ahMRbERVGoYs.js:2
    se.select @ js_Lw8Eex-_h9s3YWHkSTsC-5uusyLUgV2ahMRbERVGoYs.js:2
    se @ js_Lw8Eex-_h9s3YWHkSTsC-5uusyLUgV2ahMRbERVGoYs.js:2
    find @ js_Lw8Eex-_h9s3YWHkSTsC-5uusyLUgV2ahMRbERVGoYs.js:2
    E.fn.init @ js_Lw8Eex-_h9s3YWHkSTsC-5uusyLUgV2ahMRbERVGoYs.js:2
    E @ js_Lw8Eex-_h9s3YWHkSTsC-5uusyLUgV2ahMRbERVGoYs.js:2
    handleFragmentLinkClickOrHashChange @ js_vHpQSPK6DLv5mdZ1Zo1ftvC16jeAL1Z9OC_mZWID2dI.js:305
    (anonymous) @ js_v5UIu0v1tn9EUi1BL-qTK9PExxraHyDNwfMf2qO1aOY.js:140
    dispatch @ js_Lw8Eex-_h9s3YWHkSTsC-5uusyLUgV2ahMRbERVGoYs.js:2
    y.handle @ js_Lw8Eex-_h9s3YWHkSTsC-5uusyLUgV2ahMRbERVGoYs.js:2
  • ivnish Kazakhstan

    Can you disable JA aggregation?

  • πŸ‡ΊπŸ‡ΈUnited States aharown07

    Forgot to mention that I already tried that.
    Just gave it another test though. Disable JS cache, flush caches, flush browser cache: same result.

  • ivnish Kazakhstan

    I'm sorry, but without any errors/information I can't help you. I can't reproduce this problem in my environment

  • πŸ‡ΊπŸ‡ΈUnited States aharown07

    I did a fresh install. The problem still occurs.

    Steps to reproduce:

    Install a new Drupal 9.5.10 codebase in a test folder: composer create-project drupal/recommended-project:^9.5 test
    Install Drupal 9.5.10 using the 'Standard' profile.
    Install Quote module composer require drupal/quote and enable
    At /admin/config/content/quote enable the Article content type.

    Create a test article.
    Add a test comment.
    Select some text in the test comment.
    On using the Quote module links on the test comment...

    • Click quote selected link: nothing happens.
    • Click quote all: nothing happens
    • Click reply and quote all: works as expected

    Two errors occur in the log, but only when executing 'Reply and quote all.' There are no errors in the Drupal log for 'quote selected' or 'quote all' because nothing happens on the back end.

    No errors are showing in the browser console.

    Tested browsers: Edge, Chrome, Firefox

    Test system info:
    PHP version: 8.1.22
    Web server: nginx 1.18.0
    MySQL: Ver 8.0.34-0ubuntu0.22.04.1

  • πŸ‡ΊπŸ‡ΈUnited States aharown07

    I did a fresh Drupal 10 install, standard profile.
    Installed and enabled Quote module as above.

    "Enable for CKEditor" is disabled on the Quote module settings form, as is 'Quote and reply selected.'

    The enabled links again fail to work, though in this case, that's expected since the module is not enabled for CKEditor.
    If I set the text editor to 'none' (the only other option available in D10 if not using CKEditor), the quote links work, though the results are raw html.
    For example...

    <blockquote><strong>d10dev wrote:</strong> This is the body of test article 1.
    
    Some more text.
    
    A bit of formatting and italics and such.</blockquote><p><br/></p>

    So maybe this is a separate issue. Without some additional configuration steps, it does not appear to be possible at the moment to enable 3.0.2 for CKEditor in Drupal 10.1.2.

  • ivnish Kazakhstan

    "Enable for CKEditor" is disabled

    Yes, because CKEditor 5 doesn't support now https://www.drupal.org/project/quote/issues/3329563 ✨ Add CKEditor 5 support Fixed

    the quote links work, though the results are raw html

    Yes, it works as designed without CKEditor support

  • πŸ‡ΊπŸ‡ΈUnited States aharown07

    Got it.
    I misunderstood the scope of the 'CKEditor support' checkbox in the config.
    In #9 above, the problem does not occur if:

    * Install the (deprecated) CKEditor4 module
    * Uninstall CKEditor 5
    * Switch the 'Basic HTML' text format editor to CKEditor 4
    * Re-enable 'CKEditor support' checkbox in the Quote module config.

    For some reason, on my live 9.5.11 site, the Quote selected link is not working, even with CKEditor 4 set for the text format. So there must be a conflict with some other module or something in the theme.

    Also, on the test site I used in #9, I just renabled CKEditor5 and set it as the editor for the Full HTML text format. This did not break 'Quote selected' for the Basic HTML editor using CKEditor4. So probably that second bullet above is not relevant.

    Since I'm mostly working on migration to D10, I'm mostly interested now in getting 'Quote selected' working with CKEditor5. Users have told me they really like that feature, and I like it as well. (If I had the skills to contribute some code for CKE5 compatibility, I would do it for sure.)

  • Status changed to Postponed about 1 year ago
  • Status changed to Fixed about 1 year ago
  • ivnish Kazakhstan

    A lot of problems were fixed in 4.0.0 release

  • πŸ‡ΊπŸ‡ΈUnited States aharown07

    4.0 working for me in my D10 test site.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024