Better handling of credentials not configured

Created on 12 January 2022, over 3 years ago
Updated 23 April 2025, 2 days ago

Problem / Steps to reproduce

On admin/content/entity_share/pull, after selecting a Remote Website, the overview isn't loaded and the following PHP warning is shown: "Warning: Trying to access array offset on value of type null". This is caused by the getCredentials call in BasicAuth::getJsonApiClient returning null. The Basic Auth credentials are stored locally, so copying over a database from another server to your local development environment will trigger this issue.

Proposed resolution

Check if $credentials contains the keys username and password, and show a warning message if they are not filled in. Perhaps link to the relevant admin/config/services/entity_share/remote/ page.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇧🇪Belgium beerendlauwers

Live updates comments and jobs are added and updated live.
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