Port Rules integration from D7

Created on 10 April 2018, almost 7 years ago
Updated 6 July 2024, 7 months ago

This module provided one Rules Condition in Drupal 7, namely "User is in country (based on IP address)" (machine name ip2country_user_country). It also provided one Rules Action in Drupal 7, namely "Sets the user's country"
(machine name ip2country_set_country).

The Rules module is still in alpha for Drupal 8, and one specific feature is still missing that is required for the port of the condition. However, there is a patch for Rules that adds the feature (see ✨ Select lists in action & condition configuration forms Needs work ).

I have ported the ip2country Rules condition and action to D8, and have been using them for many months now, but be aware the condition only works if you have the above patch. I'm sharing the patch here for anyone who needs it or is willing to try it out before it gets committed. I also plan to write some test cases for this condition and action before committing them.

πŸ“Œ Task
Status

Needs review

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States tr Cascadia

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024