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

Issue #3382821: Improve patch from issue 3360661 #3488

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

zanvidmar
Copy link
Contributor

@zanvidmar zanvidmar commented Aug 23, 2023

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:

  • Install clean version of Open Social (11.9.x)
  • enable social_embed module
  • Create a post by visiting post/add/post and insert content: "Broken link example: http://example/idontexist and working Youtube embed example: https://youtu.be/ojafuCcUZzU"
  • Go to homepage and you will see WSOD with an error: Embed\Exceptions\InvalidUrlException: Could not resolve host: example in Embed\Embed::process() (line 144 of /var/www/html/vendor/embed/embed/src/Embed.php)..
  • The expected result (screenshot) is attained when repeating the steps with this fix applied.

Definition of done

Before merge

  • Code/peer review is completed
  • All commit messages are clear and clean. If applicable a rebase was performed
  • All automated tests are green
  • Functional/manual tests of the acceptance criteria are approved
  • All acceptance criteria were met
  • New features or changes to existing features are covered by tests, either unit (preferably) or behat
  • Update path is tested. New hook_updates should respect update order, right naming convention and consider hook_post_update code
  • Module can be safely uninstalled. Update/implement hook_uninstall and make sure that removed configuration or dependencies are removed/uninstalled
  • This pull request has all required labels (team/type/priority)
  • This pull request has a milestone
  • This pull request has an assignee (if applicable)
  • Any front end changes are tested on all major browsers
  • New UI elements, or changes on UI elements are approved by the design team
  • New features, or feature changes are approved by the product owner

After merge

  • Code is tested on all branches that it has been cherry-picked
  • Update hook number might need adjustment, make sure they have the correct order
  • The Drupal.org ticket(s) are updated according to this pull request status

Screenshots

image

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

@zanvidmar zanvidmar added status: needs review This pull request is waiting for a requested review prio: high team: guardians labels Aug 23, 2023
@mergeable
Copy link

mergeable bot commented Aug 23, 2023

Thanks for contributing towards Open Social! A maintainer from the @goalgorilla/maintainers group might not review all changes from all teams/contributors. Please don't be discouraged if it takes a while. In the meantime, we have some automated checks running and it might be that you will see our comments with some tips or requests to speed up the review process. 😊

@zanvidmar zanvidmar added the type: bug Fixes a bug in Open Social label Aug 23, 2023
@mergeable mergeable bot added type: bug Fixes a bug in Open Social blocked: mergeable and removed type: bug Fixes a bug in Open Social blocked: mergeable labels Aug 23, 2023
@mergeable mergeable bot added type: bug Fixes a bug in Open Social blocked: mergeable and removed blocked: mergeable type: bug Fixes a bug in Open Social labels Aug 23, 2023
@zanvidmar zanvidmar added type: bug Fixes a bug in Open Social and removed blocked: mergeable labels Aug 23, 2023
@tbsiqueira tbsiqueira modified the milestones: 11.10.0, 11.10.1 Aug 24, 2023
@tbsiqueira tbsiqueira merged commit b9ea5b6 into main Aug 31, 2023
191 checks passed
@tbsiqueira tbsiqueira deleted the issue/3382821-improve-url-embed-patches branch August 31, 2023 08:05
@tbsiqueira
Copy link
Contributor

Chery-picked to 11.9.x and 11.10.x

@tbsiqueira tbsiqueira added backport: verified This pull request has been back ported to an older minor version status: no action needed and removed status: needs review This pull request is waiting for a requested review labels Aug 31, 2023
@tbsiqueira tbsiqueira modified the milestones: 11.10.1, 11.9.13 Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport: verified This pull request has been back ported to an older minor version prio: high team: guardians type: bug Fixes a bug in Open Social
Development

Successfully merging this pull request may close these issues.

2 participants