- Issue created by @ramu_bharu
- ๐ฎ๐ณIndia sarwan_verma
Hi @ramu_bharu,
I have resolve this issue "TypeError: strlen(): Argument #1 ($string) must be of type string, array given in strlen()" and also attache patch ,
kindly review and verify . - Status changed to Needs review
5 months ago 7:00am 2 July 2024 - Assigned to Grevil
- ๐ฉ๐ชGermany Anybody Porta Westfalica
@grevil: Could you also take a short look at this, before we tag a new D11 compatible release?
- Status changed to Needs work
3 months ago 8:34am 19 August 2024 - ๐ฉ๐ชGermany Anybody Porta Westfalica
Should be a MR and code style seems to be wrong
- ๐ฉ๐ชGermany Grevil
I've added a custom attribute of type formatted text [...]
There is no form element of type
formatted text / formatted_text
, see https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21... for a full list of all form elements. Did you mean to add a field of typetextfield / textarea
? But of course, a wrong type shouldn't throw an error. I'll take a look. - Issue was unassigned.
- Status changed to Postponed: needs info
3 months ago 9:16am 19 August 2024 - ๐ฉ๐ชGermany Grevil
Can not reproduce this issue. Using the incorrect "formatted_text" type, simply doesn't render the form element as expected. Maybe the indentation of the configuration throws an internal YAML error which isn't catched?
@ramu_bharu, could you give us further information to reproduce?
PHP Version, Drupal Version, Your configuration in (/admin/config/menu_link_attributes/config).
- ๐ง๐ชBelgium setki
I have this same error.
I installed latest version of all: Drupal 10.3.2 / PHP 8.2.12 / 10.4.32-MariaDBIt is triggerd when i use a special character (unicode), in casu รช in the input field that is provided by a URL parameter like :...?parm=รชtre
TypeError: strlen(): Argument #1 ($string) must be of type string, array given in strlen() (line 395 of core\lib\Drupal\Component\Utility\Unicode.php). Drupal\Component\Utility\Unicode::validateUtf8(Array) (Line: 65) Drupal\Component\Utility\Xss::filter(Array, Array) (Line: 841) Drupal\Core\Render\Renderer->ensureMarkupIsSafe(Array) (Line: 438) Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 248) Drupal\Core\Render\Renderer->render(Array, ) (Line: 238) Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 638) Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 231) Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 128) Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90) Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object) call_user_func(Array, Object, 'kernel.view', Object) (Line: 111) Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 186) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28) Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32) Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36) Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 741) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- ๐ฉ๐ชGermany Grevil
Thanks @setki!
Could you share your configuration in "admin/config/menu_link_attributes/config" and provide clear steps to reproduce?