Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vegantriathlete created an issue. See original summary.

vegantriathlete’s picture

Assigned: vegantriathlete » Unassigned
Status: Active » Needs review
FileSize
834 bytes

Patch attached!

prash_98’s picture

Status: Needs review » Reviewed & tested by the community

The patch applies well and I guess there are no other selling errors as far as I went through the script and so it could be changed to RTBC.
If any more errors please point out.

xjm’s picture

Version: 8.2.x-dev » 8.3.x-dev
Status: Reviewed & tested by the community » Closed (duplicate)

Thanks @vegantriathlete and @prash_98! We need to fix spelling errors as part of #2622992: Run a spellchecker against core and fix all the errors in comments, though. See:
https://www.drupal.org/core/scope#spelling

vegantriathlete’s picture

Status: Closed (duplicate) » Needs review

@xjm: Therefor is technically spelled correctly; I don't know if the spell checker will pick this up. https://www.translegal.com/legal-english-lessons/therefore-vs-therefor

xjm’s picture

Title: Correct spelling in ContentEntityChangedTest.php » Correct spelling/non-standard use of "therefor"
Status: Needs review » Needs work

Hmm, I did not realize that!

So a couple questions then. Regarding @prash_98's review:

I guess there are no other selling errors as far as I went through the script

@prash_98, it would be helpful if you could describe specifically what script you went through and what you were checking for.

If the scope of this issue is to correct mis-usage of a word that is not caught by a spellchecker, then the scope should include checking all of core for that error. I did this:

[ibnsina:drupal | Sat 08:47:37] $ grep -ri "therefor\b" *
core/modules/editor/src/EditorXssFilter/Standard.php:    // can be malicious (and therefor they are inherently unsafe), whereas for
core/modules/editor/src/EditorXssFilter/Standard.php:    // Therefor, we want to be smarter still. We want to take into account which
core/tests/Drupal/KernelTests/Core/Entity/ContentEntityChangedTest.php:    // timestamp every time. Therefor we check if the changed timestamp is
core/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php:      // … and therefor, on *any* tag, really.

So let's at least fix all of those. It would be good to confirm whether the spellcheck meta would catch this or not.

Thanks!

xjm’s picture

xjm’s picture

I guess "therefor" is similar to "thereto" and "therefrom" which I actually do use. I guess I never realized that it was only a homonym of "therefore" and not the same word! And maybe I've spelled it wrong in the past. Today I learned. :)

prash_98’s picture

Ok will surely take care of that @xjm

vegantriathlete’s picture

Version: 8.3.x-dev » 8.4.x-dev
Priority: Normal » Minor
Status: Needs work » Needs review
FileSize
3.44 KB

I think I'm actually supposed to be rolling this against 8.4.x anyway. So, I've made a completely new patch and therefore (see what I did there?) have not created an interdiff.

vegantriathlete’s picture

Issue tags: +dcco2017

I'll queue this up for this weekend's Drupalcamp Colorado and see if we can have somebody look at it on Sunday.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

michaellenahan’s picture

Issue tags: +Novice, +Vienna2017
snte’s picture

DrupalCon Vienna, i am looking into this.

I am going to review the patch according to https://www.drupal.org/contributor-tasks/review

jordana’s picture

I'm mentoring @snte on this at DrupalCon Vienna.

Steffen is working on re-doing the patch for 8.5.x

bendev’s picture

Status: Needs review » Needs work

updated metadata

snte’s picture

Status: Needs work » Needs review
FileSize
3.03 KB

I updated the patch to roll against 8.5.x. No additional changes.

narnua’s picture

I'm testing the patch now at Drupalcon Vienna 2017

narnua’s picture

FileSize
453.71 KB
472.12 KB

* the patch applies cleanly against 8.5.x
* before patch: (in core/modules/editor/src/EditorXssFilter/Standard.php)

Before

* after patch:

After

narnua’s picture

Status: Needs review » Reviewed & tested by the community
lauriii’s picture

Status: Reviewed & tested by the community » Needs work

@narnua Thanks for your review! Reviews are crucial for issue progress.

However, posting screenshots of your codebase is not helpful, since the automated testing infrastructure tells us whether the patch applies correctly. It is more helpful if you first read the issue to understand its purpose and then write a review that contains your thoughts on the change. I haven't given you credit on this issue yet, but if you help us with another review then that's another chance for getting credit.

+++ b/core/modules/editor/src/EditorXssFilter/Standard.php
@@ -41,7 +41,7 @@ public static function filterXss($html, FilterFormatInterface $format, FilterFor
+    // Therefore, we want to be smarter still. We want to take into account which

This line has to be re-wrapped since Drupal coding standards specify 80 characters as the maximum line length. After this fix and a review, this patch should be ready to be committed!

snte’s picture

Status: Needs work » Needs review
FileSize
3.44 KB

@narnua, @lauriii, thanks for testing. Sorry, for missing the coding standards. Re-wrapped the line to meet Drupal coding standards.

narnua’s picture

Checking out patch #22 now:

* patch apply is clean
* patch only affects intended code - diff shows only the lines with the word therefor have been changed
* the following line is now properly wrapped

    // Therefore, we want to be smarter still. We want to take into account
    // which HTML tags are allowed and forbidden by the text format we're

* Reading through the issue, I recognise the need for this change as 'therefor' is semantically different from the word 'therefore' (disclaimer: non-native English speaker so can't dive much deeper into the linguistics). As the proposed change only affects comments, I see no reason to hold back the change.

So, @lauriii & @snte - now looks good to go to me.

narnua’s picture

Status: Needs review » Reviewed & tested by the community

  • Gábor Hojtsy committed 6ffadcb on 8.5.x
    Issue #2857789 by vegantriathlete, snte, narnua, xjm, lauriii: Correct...

  • Gábor Hojtsy committed 620bd06 on 8.4.x
    Issue #2857789 by vegantriathlete, snte, narnua, xjm, lauriii: Correct...
Gábor Hojtsy’s picture

Version: 8.5.x-dev » 8.4.x-dev
Component: other » documentation
Status: Reviewed & tested by the community » Fixed

Thanks all for carefully considering this issue. Credited @narnua following their checklist style review. Thanks!

Status: Fixed » Closed (fixed)

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