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

Time to Read block showing "this block has encountered an error" #61459

Closed
bradhogan opened this issue May 7, 2024 · 3 comments · Fixed by #61614
Closed

Time to Read block showing "this block has encountered an error" #61459

bradhogan opened this issue May 7, 2024 · 3 comments · Fixed by #61614
Assignees
Labels
[Block] Time to Read Affects the Time to Read Block [Type] Bug An existing feature does not function as intended

Comments

@bradhogan
Copy link

Description

With default WP 2024 theme and Gutenberg, edit your single template and add the "time to read" block and you will see the error.

Step-by-step reproduction instructions

See above.

Screenshots, screen recording, code snippet

https://soapbox.wistia.com/videos/CDGp80DwCd

Environment info

  • wp 6.5.3
  • gutenberg 18.2.0
  • chrome
  • mac

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@bradhogan bradhogan added the [Type] Bug An existing feature does not function as intended label May 7, 2024
@t-hamano
Copy link
Contributor

t-hamano commented May 8, 2024

Thanks for the report. I found the cause and will be filing a PR soon.

@hbhalodia
Copy link
Contributor

Hi @t-hamano @bradhogan, Since I have checked the PR was not already created for the issue, so did work on the same and have raised the PR - #61614. Please take a look on the PR.

Thank You 🙏.

@bradhogan
Copy link
Author

Great thanks @hbhalodia

t-hamano added a commit that referenced this issue May 14, 2024
#61459 (#61614)

* Fix the issue related to replace method for undefined, replace it with optional chaining so undefined can be prevented

* Revert the optional chaining commit for the wordcount pacakges

* Pass empty string if we get content undefined in time to read block

Unlinked contributors: bradhogan.

Co-authored-by: hbhalodia <hbhalodia@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Time to Read Affects the Time to Read Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants