Ottawa
Account created on 4 March 2005, about 20 years ago
#

Merge Requests

More

Recent comments

🇨🇦Canada danrod Ottawa

Thanks a lot @agentrickard much appreciated.

🇨🇦Canada danrod Ottawa

It would be great to commit the .gitlab-ci.yml first.

🇨🇦Canada danrod Ottawa

Since it's a small change, I'll merge and mark it as "Fixed", if anyone is still having issues editing the Event in the form, please let me know and I'll re-open the task.

🇨🇦Canada danrod Ottawa

I pushed a change and I made the field mandatory:

I'll leave it open for review for a while, just in case anyone wants to have a look on it.

🇨🇦Canada danrod Ottawa

I'll close this issue and mark it as "Fixed" for now, any anyone has any questions/concerns about this fix, please let me know and I'll re-open the task.

🇨🇦Canada danrod Ottawa

I would also like to to maintain this module given that I use it for many of my project and it seems like no one is bothering merging/closing the issues and creating releases.

I maintain a good amount of modules, which I update and take care of on a daily basis: https://www.drupal.org/u/danrod

🇨🇦Canada danrod Ottawa

After some thinking, I've decided to just disable the importing of all the calendar events at /calendar/all/import and let the user to sync their calendars at /admin/calendar, there's already a cron hook that imports all the events from all the calendars that can be run at midnight and allowing the user to do it from /calendar/all/import it's an invitation for a potential DoS.

Now, all the requests to /calendar/all/import will go to /admin/calendar.

I still added CSRF tokens for importe single calendars, for example: http://example.com/admin/calendar/1/import?token=Pe1Mz72klJE5yeV9xMaksh32Xj_Kl8FYH_yOyLnbW40

Ready for review.

🇨🇦Canada danrod Ottawa

ok, I'll look into the issues at #3431600 - Automated Drupal 11 compatibility fixes for layout_builder_st 📌 Automated Drupal 11 compatibility fixes for layout_builder_st Needs review and see if I can help there.

🇨🇦Canada danrod Ottawa

I removed the return statement and commented the tests with a message "TOFIX".

I'd like to look on these later, but I am short of time and some of the issues are quite hard to fix. I fixed the other PHPCS and PHPSTAN issues.

🇨🇦Canada danrod Ottawa

I'll move to "Fixed" for now, if anyone has any issues with these tests, please let me know.

🇨🇦Canada danrod Ottawa

Any testers please? I want to merge it to the main branch and create a new release.

🇨🇦Canada danrod Ottawa

I fixed most of the issues (comments issues) but I am looking at the PHPCS issues in the test directory and I see a return statement like this:

 return;
    $this->updateBlockTranslation('.block-system-powered-by-block', 'untranslated label', 'label in translation');

    $assert_session->buttonExists('Save layout');
    $page->pressButton('Save layout');
    $assert_session->addressEquals('it/node/1');
    $assert_session->pageTextContains('label in translation');
    $assert_session->pageTextNotContains('untranslated label');

    // Confirm that untranslated label is still used on default translation.
    $this->drupalGet('node/1');
    $assert_session->pageTextContains('untranslated label');
    $assert_session->pageTextNotContains('label in translation');

    // Update the translations block label.
    $this->drupalGet('it/node/1/layout');
    $this->assertNonTranslationActionsRemoved();
    $this->updateBlockTranslation('.block-system-powered-by-block', 'untranslated label', 'label updated in translation', 'label in translation');

    $assert_session->buttonExists('Save layout');
    $page->pressButton('Save layout');
    $assert_session->addressEquals('it/node/1');
    $assert_session->pageTextContains('label updated in translation');
    $assert_session->pageTextNotContains('label in translation');
  }

Any reason why is that return; statement set up like that? I am assuming the tests below are not passing at all or something.

Sorry to bother on this.

🇨🇦Canada danrod Ottawa

Results of my tests

daniel@drupal:/var/www/html$ ./vendor/bin/phpunit -c /var/www/html/web/core/phpunit.xml /var/www/html/web/modules/contrib/copyscape/
PHPUnit 9.6.22 by Sebastian Bergmann and contributors.

Testing /var/www/html/web/modules/contrib/copyscape
.......                                                             7 / 7 (100%)

Time: 00:24.798, Memory: 10.00 MB

OK (7 tests, 30 assertions)

HTML output was generated
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2007-71178141.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2008-71178141.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2009-71178141.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2010-71178141.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2011-71178141.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2012-71178141.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2013-26816709.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2014-26816709.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2015-26816709.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2016-26816709.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2017-26816709.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2018-26816709.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2019-26816709.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2020-26816709.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2021-26816709.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2022-22668405.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2023-22668405.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2024-58066084.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2025-58066084.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2026-58066084.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2027-58066084.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2028-58066084.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2029-58066084.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2030-58066084.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2031-58066084.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2032-56151013.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2033-56151013.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2034-56151013.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2035-56151013.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2036-19050969.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2037-19050969.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2038-19050969.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2039-19050969.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2040-19050969.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2041-19050969.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2042-19050969.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2043-19050969.html
http://drupal.10.4.1.ddev.site/sites/simpletest/browser_output/Drupal_Tests_copyscape_Functional_CopyscapeAdminUserPagesTest-2044-19050969.html
🇨🇦Canada danrod Ottawa

I created some basic tests for the copyscape module, tests if it was installed ok, checks if the site is up, test the copyscape forms, and does a text search which sometime fails and sometimes work, but I think the test is enough for now.

Needs review.

🇨🇦Canada danrod Ottawa

Tested it and works as expected.

Thanks so much @ex dj !

I'll mark this as "Fixed"

🇨🇦Canada danrod Ottawa

Thank you @anybody

🇨🇦Canada danrod Ottawa

Isn't it a bit too early for that? Still a lot of contrib modules still don't work well on PHP 8.3

🇨🇦Canada danrod Ottawa

Hello @liam morland , this looks great, could I help with fixing some of the phpcs issues that I still see?

🇨🇦Canada danrod Ottawa

@joseph.olstad I see a test where the simulated user (I added an extra admin role to it) tries to add a translation and I get a 403:

I'll follow your advice and set up a vanilla 11.1 instance and do the tests there.

🇨🇦Canada danrod Ottawa

ok @liam morland I'm looking at the Make coding standards fixes 📌 Make coding standards fixes Active issue, all tests are passing, what needs to be done there? I see a bunch of phpcs issues that needs to be addressed, is that the reason why the issue is still in "Needs work"? I can help you with if you want.

🇨🇦Canada danrod Ottawa

I see 7 failed tests myself, maybe there's something wrong with my phpunit settings?

Can we skip these tests? I've spend an inmense amount of time with no results so far.

🇨🇦Canada danrod Ottawa

I'll merge it to the main branch, if anyone has any questions, please let me know and I'll re-open the issue.

🇨🇦Canada danrod Ottawa

Yes !
Is there any chance to reach out to the maintainers for a tagged release?

🇨🇦Canada danrod Ottawa

Looks so much better now

I'll move it to "Fixed" for now, if anyone is still haveing any problems, please let let me know and I'll re-open the task.

Thanks a lot to @prudloff for creating this issue.

🇨🇦Canada danrod Ottawa

I've done a few tests in D11 and works better so far:

I'll move it to "Needs Review" for now.

🇨🇦Canada danrod Ottawa

Ok I'll move this to "Fixed", if anyone finds any additional issues, please let me know and I'll re-open the ticket

🇨🇦Canada danrod Ottawa

Merged to the main branch (8.x-4.x), I'll move this to "Fixed" for now, if anyone is still having validation issues, please let me know and I'll reopen the task.

🇨🇦Canada danrod Ottawa

I merged the suggested fix (and also merged the issue # 3514887) but It seems like the copyscape validator is being bypassed in Drupal 11, in Drupal 10 works fine, so I'll change this to "Needs Work" until we are sure the module is working for D11.

I merged the issue # 3514887 to the main branch and no issues so far.

Thanks again @prudloff for reporting this.

🇨🇦Canada danrod Ottawa

I'll merge this to the main branch, this MR has some deprecation fixes that could fix other issues reported with D11 compatibility

🇨🇦Canada danrod Ottawa

Yes, I can see the error now:

The website encountered an unexpected error. Try again later.

TypeError: strlen(): Argument #1 ($string) must be of type string, Drupal\user\Entity\Role given in strlen() (line 395 of core/lib/Drupal/Component/Utility/Unicode.php).
Drupal\Component\Utility\Unicode::validateUtf8() (Line: 65)
Drupal\Component\Utility\Xss::filter() (Line: 796)
Drupal\Core\Render\Renderer->ensureMarkupIsSafe() (Line: 393)
Drupal\Core\Render\Renderer->doRender() (Line: 203)
Drupal\Core\Render\Renderer->render() (Line: 484)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 55)
__TwigTemplate_217f8ca5fe867fa7ab448440c131316e->doDisplay() (Line: 388)
Twig\Template->yield() (Line: 344)
Twig\Template->display() (Line: 359)
Twig\Template->render() (Line: 51)
Twig\TemplateWrapper->render() (Line: 33)
twig_render_template() (Line: 348)

I'll apply the suggested fix and let's see how it goes

🇨🇦Canada danrod Ottawa

Thanks for reporting this @prudloff , did you try the DEV release and got this error? I'll check now.

🇨🇦Canada danrod Ottawa

I fixed all the issues reported in the Jobs, I'll leave it to "Needs Review" just in case someone wants to test this and get extra credits.

🇨🇦Canada danrod Ottawa

The pipeline ran without issues, there are some ESLINT / PHPCS / .. issues to fix, but I'll do that in another issue: https://git.drupalcode.org/project/indexing_api/-/merge_requests/4

I'll merge this MR to the 1.0.x branch and mark it as "Fixed"

🇨🇦Canada danrod Ottawa

Seems like finally the tests have passed: https://git.drupalcode.org/project/copyscape/-/merge_requests/6 !!!

I'll leave this for review for a while, just in case anyone wants to double-check this.

🇨🇦Canada danrod Ottawa

Thanks @somesh1999 , I also pushed some english fixes, but it looks great, I'll merge this to the main branch and move it to "Fixed".

Thanks!

🇨🇦Canada danrod Ottawa

danrod changed the visibility of the branch 3514888-replace-readme.txt-with to hidden.

🇨🇦Canada danrod Ottawa

I actually made another test by trying to create a new node taking the content from the page: https://reactfordrupal.com/ and I can see the copyscape warning about the content being from that page:

I can see my copyscape balance being depleted as well.

I'll close this as "Fixed", I can re-open the ticket if some is still having issues with this module

🇨🇦Canada danrod Ottawa

I'll move it to "Fixed" now, if anyone has any suggestions, please let me know and I'll re-open the issue.

🇨🇦Canada danrod Ottawa

Merged, I allowed some tests to fail in order to merge the MR to the main branch. I'll fix that in another issue.

🇨🇦Canada danrod Ottawa

It looks like it's working now: https://git.drupalcode.org/project/copyscape/-/pipelines/455440

I'll open a new ticket for fixing the PHPCS / CSPELL / ESLINT issues...

🇨🇦Canada danrod Ottawa

I'll merge it to the main branch now because I need this file for setting up the GilabCI process, but I'll move this to "Needs Review" just in case someone has suggestions on this.

🇨🇦Canada danrod Ottawa

I added a composer.json file with some basic but important information:

{
  "name": "drupal/copyscape",
  "type": "drupal-module",
  "keywords": ["Drupal", "Plagiarism"],
  "description": "This module integrates the Copyscape API and checks the originality of content published.",
  "homepage": "https://git.drupalcode.org/project/copyscape",
  "authors": [
    {
      "name": "Daniel Rodriguez",
      "homepage": "https://www.drupal.org/u/danrod",
      "role": "Maintainer"
    }
  ],
  "support": {
      "issues": "https://www.drupal.org/project/copyscape",
      "source": "https://git.drupalcode.org/project/copyscape"
  },
  "license": "GPL-2.0-or-later",
  "minimum-stability": "dev",
  "require": {
    "php": "^8.1"
  }
}
🇨🇦Canada danrod Ottawa

I'll leave it to "Needs Review" for a while @xamount , hope you still there, it's been a long time but no one had time/resources to fix these issues.

🇨🇦Canada danrod Ottawa

I made some updates (mostly D10/11 compatibility changes) and it seems like it is working now (I had to purchase copyscape credits):

🇨🇦Canada danrod Ottawa

Short, but powerful:

This module integrates the <a href="http://www.copyscape.com/">Copyscape API</a> and checks the originality of content published.
Production build 0.71.5 2024