The page freezes while the Real-Time SEO module runs script.

Created on 24 October 2018, over 6 years ago
Updated 13 July 2023, over 1 year ago

The page freezes while the Real-Time SEO module runs script after changing something in a field and trigger onBlur on the field (click outside the field). This makes updating a page take extremely long.

Proposed solution:
Make Real-Time SEO widget auto refresh configurable from module form. If auto refresh is disabled then the button to update the widget will be appeared. An administrator will decide whether should this be turned on or not.

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine knyshuk.vova

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.

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update over 1 year ago
    Composer require-dev failure
  • πŸ‡«πŸ‡·France Nixou Toulon

    Reroll for 2.0.0alpha9

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    It's unbelievable. This critical issue exists since > 2 years and the maintainers just don't care? I think they must have missed this issue. Going to contact them via PM.

    @Nixou could you please provide the patch as MR to make it easier to review and merge for the maintainers?

    Thanks! :)

  • Related issue : πŸ“Œ Page freeze caused by Symfony 6 non-scalar error when tokensNotFound is triggered Needs review . There is a patch which solved this problem.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Thanks @omar_emailat - still this are separate issues. The frontend should never wait for the response, but run async, was written above.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Bumping this major issue.

  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA
  • Status changed to Needs work 5 months ago
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Next step should be to prepare a MR from the latest patch. This is still horrible to use, waiting for the UI.

    For that reason, I'd suggest adding a note to the description of the new setting:

    +    $form['auto_refresh']['auto_refresh_seo_result'] = [
    +      '#type' => 'checkbox',
    +      '#title' => $this->t('Enable auto refresh of the Real Time SEO widget result'),
    +      '#description' => $this->t('You can use this setting to allow or deny auto refreshing of the Real Time SEO widget results after a value of a form field is changed and a field focus is lost.'),
    +      '#default_value' => $config->get('auto_refresh_seo_result'),
    +    ];
    

    like

    Please note that this may cause UI delays, waiting for e.g. the Metatag values to become available to calculate the score

    (A native speaker should improve the sentence).

  • Pipeline finished with Failed
    5 months ago
    Total: 39s
    #287081
  • Merge request !33Applied patch #19 β†’ (Open) created by Anybody
  • Pipeline finished with Failed
    5 months ago
    Total: 39s
    #287084
  • Pipeline finished with Failed
    5 months ago
    Total: 37s
    #287443
  • Pipeline finished with Failed
    5 months ago
    Total: 37s
    #287446
  • πŸ‡©πŸ‡ͺGermany lrwebks Porta Westfalica
  • Pipeline finished with Failed
    5 months ago
    Total: 68s
    #291288
  • πŸ‡©πŸ‡ͺGermany lrwebks Porta Westfalica
  • πŸ‡©πŸ‡ͺGermany Grevil

    LGTM! Tested it and everything seems to be working as expected!

    Added 2 more comments otherwise RTBC.

  • Pipeline finished with Failed
    5 months ago
    Total: 37s
    #292152
  • πŸ‡©πŸ‡ͺGermany lrwebks Porta Westfalica
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Finally :)

  • Pipeline finished with Failed
    5 months ago
    Total: 52s
    #292167
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Perfectly fine now @lrwebks! RTBC from my side, thank you!!

  • Status changed to RTBC about 2 months ago
  • πŸ‡³πŸ‡±Netherlands kingdutch

    I've been hoping for the past time that I'd find the time to fully update the Real-Time SEO module to the now released version of the Yoast SEO library so that we could move to webworkers and fix this issue. However, unfortunately that has required more time (and a better development set-up then I currently have available).

    Given that the first release of Drupal CMS is around the corner and the Real-Time SEO module will be part of it, I'm adding the button and tagging a stable release. However, I do hope that in a future release we can once again remove the button and go back to "Real-Time" while preserving a smooth experience :)

    While merging I've split this issue in two. One to refactor the controller into a SettingsForm and the other to introduce the actual change with the new setting. I also fixed some comments to use more inclusive language.

    Thanks for your contributions everyone!

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Hi and thank you so much @kingdutch for taking the time for this project! We've been waiting years for this to be fixed and never used the project because of the broken state of this issue.

    Reading the comments and the MR, I think we should open a follow-up to also fix the JS-side of this issue.
    The root cause here is blocking JavaScript and I think we might also want to remove jQuery?

    The new option gives us the opportunity to disable the auto-refresh and makes the module usable again, but to have the functionality fixed, the JS needs to be corrected.

    Do you agree? Should we open a follow-up for replacing jQuery by Vanilla JS and remove this blocking implementation combined?

  • πŸ‡³πŸ‡±Netherlands kingdutch

    Hey Anybody,

    Yes I think that follow-up would be πŸ› Update YoastSEO JS to recent version Needs work . The newest release for the Yoast SEO library which finally came somewhere last year moves most of the processing to a webworker and keeps only the UI updates on the main thread. So that ensures that even if the server needs a bit more time we're not blocking.

    My 5 year ago developer idea was to do that update with an overhaul of the widget itself and move that to React so that there's fewer event listeners and a more linear "Updated data comes in" -> "Render UI element top down" approach. One of the features that that should enable in the future is multiple keywords at the same time. However, I think that's a much larger undertaking so it makes sense to refocus the update issue to moving to the newest version as-is and seeing if we can only make smaller improvements to the existing widget, like replacing jQuery with vanilla JS.

  • πŸ‡©πŸ‡ͺGermany stefan.korn Jossgrund

    I suppose this addresses ✨ Allow configuring of manual checking per field Postponed: needs info as well (using a site wide setting instead of form widget setting though). Maybe maintainers should decide whether to close ✨ Allow configuring of manual checking per field Postponed: needs info now as a duplicate or not.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    I added the point from #36 / #37 to πŸ› Update YoastSEO JS to recent version Needs work FYI

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

Production build 0.71.5 2024