Updated to the latest varbase 8.7.0 release. When loading the dashboard:

The website encountered an unexpected error. Please try again later.
Recoverable fatal error: Object of class Drupal\Core\Link could not be converted to string in Drupal\Core\Render\Markup::create() (line 36 of core/lib/Drupal/Component/Render/MarkupTrait.php).
Drupal\Core\Render\Markup::create(Object) (Line: 181)
Drupal\varbase_total_control\Plugin\Block\VarbaseContentOverview->build() (Line: 135)
Drupal\panels\Plugin\DisplayBuilder\StandardDisplayBuilder->buildRegions(Array, Array) (Line: 176)...

Traced it down to: 180 - 184

[
  'data' => Markup::create($link),
  'class' => ['type'],
],

Should be:

[
  'data' => $link->toString(),
  'class' => ['type'],
],

Patch to follow later today.

Comments

devkinetic created an issue. See original summary.

devkinetic’s picture

devkinetic’s picture

Status: Active » Needs review
rajab natshah’s picture

Title: Drupal\Core\Link could not be converted to string in VarbaseContentOverview->build() » Fix Drupal\Core\Link could not be converted to string in VarbaseContentOverview->build()

rajab natshah’s picture

Assigned: Unassigned » mohammed j. razem
Issue tags: +varbase-8.7.1

Committed ... Thank you :) Ryan for reporting and the patch!!
This will go as a quick fix release.

I think we do need to have an automated test for ( When the comment module is enabled or not )
We did a bit of refactoring work at the Total Control module
#3067821: Fix [Total Control Dashboard] uses of deprecated Drupal core APIs and standard Drupal Practice
We had fixed number of issues like this when we started
#3069156: Add Automated Testing for the Total Control Admin Dashboard module

So we did
#3067824: Fix [Varbase Total Control Dashboard] uses of deprecated Drupal core APIs and standard Drupal Practice

After your report. An automated test check is a must.

  • we do need at least 2 testing cases for comments
  • Maybe 2 more for taxonomy too.

Planed to #3076980: Add Automated Testing for the Varbase Total Control Dashboard module

rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
rajab natshah’s picture

Title: Fix Drupal\Core\Link could not be converted to string in VarbaseContentOverview->build() » Fix Drupal\Core\Link could not be converted to string in VarbaseContentOverview->build() when the comment module is enable
Status: Needs review » Fixed
devkinetic’s picture

Awesome, glad this has triggered a bigger initiative! Thanks for rolling in so quickly.

Status: Fixed » Closed (fixed)

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