Problem/Motivation

We were getting a 'Deprecated function: substr() Passing null to parameter #1' error and I traced this back to line 65 of the domain_simple_sitemap.module file.
This line makes the assumption that if the domain_config module is installed the front page value can fetched from that config, in our case we had that module installed but the actual front page values are stored in the config for the domain_site_settings.

Steps to reproduce

Install both domain_config and domain_site_settings modules and configure the domain sites using the domain_site_settings config.

Proposed resolution

If domain_config is installed and fetch the config, if that config is empty fetch from domain_site_settings.

CommentFileSizeAuthor
#3 domain_simple_sitemap-3460808-17.patch1.54 KBomahm
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

omahm created an issue. See original summary.

omahm’s picture

StatusFileSize
new1.54 KB

Uploaded patch of changes in fork

KevinVb made their first commit to this issue’s fork.

kevinvb’s picture

Status: Active » Needs review

I had the same issue but with only the patch it didn't work because the value page.front can also be NULL while the configuration exists.
I added an additional check so if the configuration value is empty it doesn't throw the deprecation issue anymore.

kevinvb’s picture

Version: 3.0.0-beta1 » 3.0.x-dev
tim-diels’s picture

Assigned: omahm » Unassigned

anselm@minsky made their first commit to this issue’s fork.

i-trokhanenko made their first commit to this issue’s fork.

i-trokhanenko’s picture

Status: Needs review » Reviewed & tested by the community

  • i-trokhanenko committed 547dcfd4 on 3.0.x authored by omahm
    #3460808 Fallback check from when domain_config config does not exist
    
i-trokhanenko’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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