When running drush dmu-upgrade diff, there are no errors. However, if you try to enable it, you get the following:

Method Drupal\diff\Controller\DefaultController::diff_diffs_overview() does not exist 

It speaketh the truth; the method is not found in DefaultController. Only a theme function (which is rather bizarre?). However, this was working ok before Ye Greate Refactoringe™ so we need to restore the functionality.

CommentFileSizeAuthor
#8 charlie.gif13.58 KBphenaproxima

Comments

  • phenaproxima committed 1492a9e on master
    Issue #2351495: Method Drupal\diff\Controller\DefaultController::...
phenaproxima’s picture

Status: Active » Needs review
webchick’s picture

Title: Method Drupal\diff\Controller\DefaultController::diff_diffs_overview() does not exist » Hook_menu() conversions of Diff module are no longer working
Status: Needs review » Needs work

Now I get this:

Fatal error: Cannot redeclare Drupal\diff\Controller\DefaultController::diff_admin_global_field_settings() in /Users/webchick/Sites/8.x/modules/diff/src/Controller/DefaultController.php on line 246
Drush command terminated abnormally due to an unrecoverable error.   
webchick’s picture

Er. that's when enabling the diff module that is. The upgrade command runs without error now.

webchick’s picture

After testing this a few times, the actual function it complains about is different each time. The latest run against 5fdefa30 it was:

Fatal error: Cannot redeclare Drupal\diff\Controller\DefaultController::diff_token_info() in /Users/webchick/Sites/8.x/modules/diff/src/Controller/DefaultController.php on line 231
Drush command terminated abnormally due to an unrecoverable error.                                              [error]

Adam also tested it and got a different duplicate function. So something be funky.

phenaproxima’s picture

Status: Needs work » Needs review
webchick’s picture

Status: Needs review » Needs work

Now I'm back to this on drush dmu-upgrade diff. :(

Fatal error: Cannot redeclare diff_block_info() (previously declared in /Users/webchick/Sites/8.x/modules/diff/diff.module:256) in /Users/webchick/Sites/8.x/modules/drupalmoduleupgrader/src/Plugin/DMU/ModuleWide/HookBlockInfo.php(40) : eval()'d code on line 10
phenaproxima’s picture

StatusFileSize
new13.58 KB

WAUGH

(Lest this be interpreted the wrong way: 'tis but a metaphor. You're much nicer than Lucy!)

phenaproxima’s picture

Status: Needs work » Postponed (maintainer needs more info)

I can't reproduce this with diff. It stubbornly works for me. I tried running analyze then upgrade, and then just upgrade, then upgrade with only certain plugins (including HookBlockInfo). Worked every time.

webchick’s picture

Status: Postponed (maintainer needs more info) » Fixed

LOL that's a totally apt analogy. ;)

And, whew! After a good night's sleep, a drush si, and a retry, it's working for me too against the latest master (649838025eb). YAYYYYYY!!!

phenaproxima’s picture

I think figured out what causes that.

If you do the following:

- drush si
- dmu-upgrade diff
- Enable diff
- git reset diff (without turning diff off first)
- dmu-upgrade diff

...I think you will get that error.

Because diff is still turned on. The .module is still being loaded when Drupal is bootstrapped, even though it's in its Drupal 7 state!

This also explains why drush si cleared it.

Status: Fixed » Closed (fixed)

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