0

I'm using rules module with drupal 8 in order to redirect anonymous users to the login page after registration form submission, so I created a rule with react on event "After saving new user (rules_entity_insert:user)" because my account creation settings are : "Visitors, but administrator approval is required"

enter image description here Events: After saving new user (rules_entity_insert:user)

Conditions: User has role(s) - Parameter: User: @user.current_user_context:current_user, Roles: anonymous user

Actions: Page redirect - Parameter: URL: user/login

But its giving : WSOD with warning

Warning: Cannot use a scalar value as an array in Drupal\Core\Field\WidgetBase->extractFormValues() (line 366 of /var/www/html/D8/core/lib/Drupal/Core/Field/WidgetBase.php).

Any suggestion where i am missing something.

  • whats the point of redirecting them to login page if administrator approval is required? – No Sssweat May 19 '16 at 9:14
  • On this point After submitting registration form user is not logged in automatically. Still behave as "anonymous user " – visabhishek May 19 '16 at 9:19
  • 1
    @Pierre.Vriens all I was trying to do is make him realize that perhaps doing that wasn't the best choice. But if it's out of his control, then fair enough. – No Sssweat May 19 '16 at 9:45
  • 2
    @NoSssweat: fully agree with you on that. But, the customer is always right ... if if the customer is wrong, correct??? Anyway, IMO Rules for D8 is not stable enough, which is also why I'm not surprised about such WSODs. What's your experience with rules usability in D8? – Pierre.Vriens May 19 '16 at 9:49
  • 2
    @Pierre.Vriens my experience is that it is not usable. It's like trying to play with a broken toy that doesn't work. – No Sssweat May 19 '16 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.