Issue #3382821: Improve patch from issue 3360661 #3488
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
By mistake, patch from issue 3360661 is partly overriding the fix from patch issue 2930457#comment-13973067 which is causing regression fixed by issue 3360661.
Problem
Error: TypeError: count(): Argument # 1 ($value) must be of type Countable|array, bool given in count() (line 132 of /var/www/html/html/modules/contrib/url_embed/src/Plugin/Filter/ConvertUrlToEmbedFilter.php)
Solution
This commit provides an updated version of patch from issue 3360661 by removing the lines that overrides patch from issue 2930457#comment-13973067. I had some challenges with creating interdiiff (Whitespace damage detected in input) and I did this instead: https://www.diffchecker.com/xacR5wZX/. In the interdiff we can see that we are removing the code that is responsible for falsely code removal that was applied by https://www.drupal.org/files/issues/2021-01-22/urlembed-non-embeddable-urls-2761187-opensocial-combined-21.patch
Issue tracker
3382821
Theme issue tracker
N/A
How to test
HTT3:
Embed\Exceptions\InvalidUrlException: Could not resolve host: example in Embed\Embed::process() (line 144 of /var/www/html/vendor/embed/embed/src/Embed.php).
.Definition of done
Before merge
After merge
Screenshots
Release notes
We resolved the issue that happened when social_embed is enabled and a post with broken url and valid embed url was created.
Change Record
N/A
Translations
N/A