Hi,

hook_enable and hook_disable were removed in Drupal 8, so content should be moved to hook_install and hook_uninstall.

Best regards,

Leandro L. Isotton

Comments

lisotton created an issue. See original summary.

mgoncalves’s picture

Assigned: Unassigned » mgoncalves
mgoncalves’s picture

Besides hook_enable to hook_install, was change language_list() to \Drupal::languageManager()->getLanguages().

mgoncalves’s picture

Assigned: mgoncalves » Unassigned
Status: Active » Needs review
rickyoh’s picture

Status: Needs review » Needs work

Can you please resubmit a patch that only fixes the issue stated in this ticket?

Fixing occurrences of "language_list()" is not useful as the current functions and methods that implement them are no longer used and need to be either pulled out or significantly altered for D8 anyways.

mgoncalves’s picture

Hello @rickyoh,

You cannot install the module without change the language_list().
When you are installing Cloudwords for Multilingual Drupal, the first error will be "Fatal error: Call to undefined function language_list()".

Do you want the only occurrences listed even so ?

Thank you

rickyoh’s picture

@mgoncalves

Yes, please leave those occurrences and I'll remove them shortly with a commit.

Can you rework your patch so it only addresses this issue at hand and make sure it can apply cleanly against the latest version of 8.x-1.x-dev?

Thanks!

mgoncalves’s picture

Assigned: Unassigned » mgoncalves
mgoncalves’s picture

StatusFileSize
new536 bytes

Just changed the hook install.

mgoncalves’s picture

Assigned: mgoncalves » Unassigned
Status: Needs work » Needs review

  • rickyoh committed 718c6a5 on 8.x-1.x authored by mgoncalves
    Issue #2861260 by mgoncalves: Move code from hook_enable and...
rickyoh’s picture

Status: Needs review » Fixed
rickyoh’s picture

Status: Fixed » Closed (fixed)