Porting age_checker to Drupal 8.

Maintaining the code on https://github.com/nitesh11/age_checker/tree/8.x-0.x.

CommentFileSizeAuthor
#3 age_checker_d8.patch100.56 KBnehajyoti
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Nitesh Sethia created an issue. See original summary.

Nitesh Sethia’s picture

List of things which are done are:

  • Porting .info to .info.yml
  • Porting hook_permissions
  • Porting hook_menu and creating .routing.yml
    • General Configuration Form
    • Language Country Mapping Configuration Page
    • Country Configuration Page
  • Creating .links.menu.yml file for showing menu on the configuration page
  • Creating .links.task.yml for showing menu in tabs
nehajyoti’s picture

FileSize
100.56 KB

Hi Nitesh,
Please review patch for age checker d8 functionality.
This does not include theming functionality of the module.

Manav’s picture

Status: Active » Needs review

Hi @nehajyoti
I have updated the status for your patch.

nehajyoti’s picture

@manav @nitesh
Here is the updated code of D8 version, including theme as well as functionalities https://github.com/nitesh11/age_checker/pull/2
Would also like to maintain this module further.

Please refer the CODE link for review : https://github.com/nehajyoti04/age_checker.

Manav’s picture

Assigned: Nitesh Sethia » Manav
Status: Needs review » Needs work

Hi @nehajyoti
Sorry for late reply. I have reviewed you d8 module and found some issues. When i installed the module(from https://github.com/nehajyoti04/age_checker) it didn't ask me to setup configuration but its redirect me to http://example.com/age-gate this page. This module works only for anonymous user when they visited the site then this module ask for their date of birth etc and then proceed. According to D7 version without setting any configuration its should not work and also not work for authenticated user. Please check the logic and functionality.

navneet0693’s picture

Assigned: Manav » Unassigned

Hi @manav Jyoti is working on it :-)

Manav’s picture

Hi @navneet0693
I know Jyoti is working on it and sorry i forgotten to un-assign myself from the thread.

nehajyoti’s picture

Hi @manav,
I have fixed the issue : logged in users should not be redirected to age-gate page.
Though i am not displaying any error message to tell users to configure age checker settings page, as it is understood as per ReadMe file to fill up the configuraton.
Thanks for the review. Updated code is available on the same URL i.e https://github.com/nehajyoti04/age_checker
Le'me know if there are other major issues in the D8 version.

nehajyoti’s picture

Status: Needs work » Needs review

  • nehajyoti committed 45c8228 on 8.x-1.x
    Issue #2798393 by nehajyoti: Porting the module to Drupal 8
    

  • nehajyoti committed 71cbc06 on 8.x-1.x
    Issue #2798393 by nehajyoti: Porting the module to Drupal 8
    
  • nehajyoti committed fefd309 on 8.x-1.x
    Merge branch '8.x-1.x' of git.drupal.org:project/age_checker into 8.x-1....
hockey2112’s picture

I installed the D8 version from https://github.com/nehajyoti04/age_checker. I then went to /admin/config/people/age-checker to configure the settings. I added messages, copyright, logo, button text. However, none of that text or the logo is showing up on the front-end. Am I missing a step?

Rangaswini’s picture

Assigned: Unassigned » Rangaswini
pratik_kamble’s picture

I have tried the Drupal 8 version of the module. The porting of the module is not done completely. Changing the status to active.

pratik_kamble’s picture

Status: Needs review » Active
MatthiasO’s picture

Got following error on 8.7.9

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'element_validate_integer' not found or invalid function name in Drupal\Core\Form\FormValidator->doValidateForm() (line 282 of core/lib/Drupal/Core/Form/FormValidator.php).

Fixed it by removing element_validate_integer on the form elements (#element_validation) and changing to number types instead of textfield types (in SettingsForm.php and CountryConfig.php)

Based on https://www.drupal.org/node/1678914