Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
Problem
I just upgrade my Drupal 8 beta15 site to Drupal 8 RC1 (Danish Version). All seems fine except while upgrading got warning (Filters missing).
Now when I tried to configure or try to place any block got this error.
"Recoverable fatal error: Object of class Drupal\Core\Annotation\Translation could not be converted to string in Drupal\Component\Utility\Xss::filter() (line 72 of core/lib/Drupal/Component/Utility/Xss.php)."
Does any one have solution or same issue?
Comments
Comment #2
vorapoap CreditAttribution: vorapoap commentedI have the same problem.. upgraded from beta15 to RC2
For me, it happens when I try to place any block in to any regions (/admin/structure/block)
Comment #3
vorapoap CreditAttribution: vorapoap commentedHmm added this to
/core/lib/Drupal/Core/Annotation/Translation.php
seems to fix the problem
Is this a core bug that should be fixed?
Comment #4
vorapoap CreditAttribution: vorapoap commentedThis is still a problem in Drupal8.0 version
How to propose this into CORE ?
I get lots of this error in php-fpm.d and this can simply fixed by adding __toStrnig to translation object
Comment #5
BerdirDoes the error also say where it is called?
Can you post the output of the following, place it where Xss::filter() is called:
if (is_object($the_argument)) {
debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
}
Also, do you know what string this is, you could print that out also in your __toString()?
Comment #6
umakart CreditAttribution: umakart commentedSame here in 8.0.1 (new installation)
No way to get to the Block configuration page => The website encountered an unexpected error.
And error output mentioned above.
#3 fixed the problem for me, but Core hack!
Comment #7
TrexaSolutions CreditAttribution: TrexaSolutions commentedI had the same problem with a new installation with 2 translations lenguages available. I'm not sure if this could also affect the situation.
#3 Solved the problem just adding the function to /core/lib/Drupal/Core/Annotation/Translation.php.
I hope this fix is included in upcoming releases. Thanks Vorapoap for your help!
Comment #8
dpiReverted
Comment #17
pameeela CreditAttribution: pameeela commentedThanks for reporting this issue. We rely on issue reports like this one to resolve bugs and improve Drupal core.
As part of the Bug Smash Initiative, we are triaging issues that are marked "Postponed (maintainer needs more info)".
Since there were no specific steps to reproduce the issue provided since the issue was postponed in 2015, I'm marking the issue "Closed (cannot reproduce)". If anyone can provide complete steps to reproduce the issue (starting from "Install Drupal core"), document those steps in the issue summary and set the issue status back to "Active".
Thanks!