Closed (fixed)
Project:
Drupal 7 to Modern Drupal Module Upgrader
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Nov 2020 at 19:06 UTC
Updated:
7 Mar 2021 at 17:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
bogdog400 commentedI downgraded from the dev version to 1.5 and got the same error.
Comment #3
solideogloria commentedIf you look at the code:
So maybe this is why.
db_or()anddb_like()are both deprecated in 8.0.0 and removed in 9.0.0.Comment #4
solideogloria commentedThough this was a bit tricky to find the right way to do the OR-ing, I figured it out.
The patch replaces the instances of db_or and db_like. I tested it on the module you mentioned, and it works now.
ALSO, I noticed that the
LIKE's weren't escaped properly, because underscores are wildcards in SQL, so I fixed that, too.Comment #5
solideogloria commentedComment #6
solideogloria commentedComment #8
tyler36 commented@solideogloria , almost there.
Patch changes error to
Error: Class 'Drupal\corefake\Driver\Database\corefakeWithAllCustomClasses\Condition' not found in Drupal\drupalmoduleupgrader\Plugin\DMU\Converter\HookFormAlter->convert()I think you forgot to import the class
use Drupal\Core\Database\Query\Condition;(sorry ... not sure how to create patches yet)
Comment #9
solideogloria commented@tyler36 You should read this page: Making a patch | Using Git to Contribute to Drupal.
Comment #10
solideogloria commentedI added the import. Please review again. Thanks.
Also, for reference, change the issue status to "Needs Work" if you find something like that in the future.
Comment #11
jcnventuraAnd interdiffs :)
Would be good to have either @bogdog400 or @tyler36 test and review this. Once you do, please set the status to 'Reviewed and tested by community' if @solideogloria's patch fixed the issue.
Comment #12
solideogloria commentedComment #13
tyler36 commentedConfirmed.
- Reproduced error on Drupal 9.0.3.
- Applied #10 patch
- Run `drush dmu-upgrade annotation`
- Recieved new message
- Code appears to have been updated as expected
PS. @solideogloria, thanks for your patience and guidance
Comment #15
jcnventuraThanks for the work and review, @solideogloria and @tyler36