RTC NPM Resource Changed PR-4.4-dev Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
10 Dec 2023

This is a re-do of #42437 for 4.4 instead of 5.x, since this is actually a bug and not a change request anymore.

Summary of Changes

When typing very fast into the search box and hitting enter, the browser has fired an AJAX call for every character typed and the server might not have responded. When hitting enter, the form is send and all AJAX requests are aborted. This lets the JS code return and run into the failure condition, resulting in a flash of error messages being displayed. While it is nice to know that something failed for a developer, this should not be displayed to the general enduser. The JS code right now can spam the screen with system messages for these failed calls, especially since a call is triggered for each character entered into the search box. This PR removes this error handling.

Testing Instructions

  1. Go to /components/com_finder/src/Controller/SuggestionsController.php and insert
    echo '1';
    in line 43 to create a broken output from the controller.
  2. Type into the search box of mod_finder and see loads of system error messages displayed.
  3. Apply the patch. (remember to run npm)
  4. Type into the search box and don't see the previous messages.
  5. Remove the code from line 43 and type again. See the suggestions appearing again.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar Hackwar Hackwar - open - 10 Dec 2023
avatar Hackwar Hackwar - change - 10 Dec 2023
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 Dec 2023
Category JavaScript Repository NPM Change
avatar Quy Quy - test_item - 10 Dec 2023 - Tested successfully
avatar Quy
Quy - comment - 10 Dec 2023

I have tested this item ✅ successfully on c9ba1ca


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42490.

avatar viocassel viocassel - test_item - 10 Dec 2023 - Tested successfully
avatar viocassel
viocassel - comment - 10 Dec 2023

I have tested this item ✅ successfully on c9ba1ca


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42490.

avatar Quy Quy - change - 10 Dec 2023
Status Pending Ready to Commit
Labels Added: NPM Resource Changed PR-4.4-dev
avatar Quy
Quy - comment - 10 Dec 2023

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42490.

avatar laoneo laoneo - close - 11 Dec 2023
avatar laoneo laoneo - merge - 11 Dec 2023
avatar laoneo laoneo - change - 11 Dec 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-12-11 13:52:51
Closed_By laoneo
Labels Added: RTC
avatar laoneo
laoneo - comment - 11 Dec 2023

Merged it, but I think there should be some debounce before sending an ajax request. But this is another topic. Thanks @Hackwar for the fix.

Add a Comment

Login with GitHub to post a comment