Problem/Motivation

The login page shows PHP warnings related to Undefined array key social_networks in vartheme_bs5_preprocess_login_with().
In addition, the expected social auth icons (Facebook, Google, etc.) do not load, and foreach() fails because the expected array is null.
Login error

Steps to reproduce

  1. Enable one or more Social Auth modules (e.g., Social Auth Google, Facebook) and disable the Gin Login module.
  2. Visit the login page (/user/login) after enabling social login.
  3. Observe: PHP warning about Undefined array key social_networks and social auth icons do not appear.

Proposed resolution

  • Update the vartheme_bs5_preprocess_login_with() function to use $variables['networks'] instead of social_networks, as per Social Auth module changes.
  • Check if the array is set and iterable before looping.
  • Provide a custom image path to render on UI.
  • Update the Varbase social auth component that used in login-with.html.twig to use networks variable instead of social_networks.

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Release varbase-10.1.0-alpha2, vartheme_bs5-4.0.0-alpha4

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

After the fix
Social Auth login after the fix

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Issue #3530711 by n.ghunaim: Fixed Undefined array key social_networks in vartheme_bs5_preprocess_login_with()
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

n.ghunaim created an issue. See original summary.

n.ghunaim’s picture

Issue summary: View changes
n.ghunaim’s picture

Issue summary: View changes
n.ghunaim’s picture

n.ghunaim’s picture

Issue summary: View changes
n.ghunaim’s picture

Issue summary: View changes

rajab natshah’s picture

Status: Active » Needs review
rajab natshah’s picture

rajab natshah’s picture

Assigned: Unassigned » s.halawani
Issue summary: View changes
Issue tags: +varbase-10.1.0-alpha2, +vartheme_bs5-4.0.0-alpha4
rajab natshah’s picture

Issue summary: View changes
StatusFileSize
new100.59 KB
rajab natshah’s picture

Assigned: s.halawani » Unassigned
Status: Needs review » Fixed
rajab natshah’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

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

rajab natshah’s picture

Issue summary: View changes