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

Uncaught ValueError: mb_convert_encoding(): Argument #3 ($from_encoding) #570

Closed
1 of 4 tasks
pattonwebz opened this issue Apr 4, 2024 · 1 comment · Fixed by #587
Closed
1 of 4 tasks

Uncaught ValueError: mb_convert_encoding(): Argument #3 ($from_encoding) #570

pattonwebz opened this issue Apr 4, 2024 · 1 comment · Fixed by #587

Comments

@pattonwebz
Copy link
Collaborator

pattonwebz commented Apr 4, 2024

Please give us a description of what happened.

When a scan is performed on PHP8+ systems certain situations can result in a ValueError being thrown and it is unclear what the specific trigger for it is. This is thrown from the TextStatistics package when trying to produce the grade level.

Uncaught ValueError: mb_convert_encoding(): Argument #3 ($from_encoding)

https://wordpress.org/support/topic/uncaught-valueerror-mb_convert_encoding-argument-3-from_encoding/

Please describe what you expected to happen and why.

Scan to complete without issue and for grade level results to be available.

How can we reproduce this behavior?

It is unclear how exactly to reproduce this but the steps generally to cause it are following normal operations. However in at least one environment (or with some certain content type) it throws the error.

Technical info

  • WordPress version:
  • Accessibility Checker version:
  • If relevant, which editor is affected (or editors):
  • Classic Editor
  • Gutenberg
  • Classic Editor plugin
  • Page Builder (please specify):
  • Relevant plugins in case of a bug:
    • GenerateBlocks
    • Block Visibility
    • Gravity Forms
    • Woocommerce
@pattonwebz
Copy link
Collaborator Author

I have been making itterative changes to the TextStatistics package to deal with this (and other potential issues with php 8 compatability). You can see the updates in the repo here: https://github.com/equalizedigital/textstatistics

Swapping this into the plugin is just a case of defining the repo and setting the version to dev-master or some other branch that we pick on the forked repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant