After installing xmlsitemap on Drupal 8.0.0-beta9, the admin/config page will not load. The following error message is displayed:

Recoverable fatal error: Object of class Drupal\Core\Url could not be converted to string in Drupal\Component\Utility\SafeMarkup::isSafe() (line 94 of core/lib/Drupal/Component/Utility/SafeMarkup.php).

CommentFileSizeAuthor
#1 xmlsitemap-url-tostring-1.patch9.15 KBpaulmckibben
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

paulmckibben’s picture

Title: admin/config does not load » admin/config does not load: Url could not be converted to string
Status: Active » Needs review
FileSize
9.15 KB

The problem is due to the change record at https://www.drupal.org/node/2443461. When a URL string is necessary, it is now required to invoke the Url::toString() method. The attached patch invokes the toString() method where necessary, and it fixes the issue.

Michelle’s picture

Status: Needs review » Reviewed & tested by the community

I was able to reproduce this error and confirmed the patch applies cleanly and fixes the error.

paulmckibben’s picture

Status: Reviewed & tested by the community » Fixed

@Michelle, thanks for the review! I've committed the patch to the 8.x-1.x branch.

  • paulmckibben committed b10e151 on 8.x-1.x
    Issue #2463993 by paulmckibben: admin/config does not load: Url could...

Status: Fixed » Closed (fixed)

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