Problem/Motivation
When I call mydomain.de//de/admin/modules i get an error message:
Call to a member function addClass() on array in claro_preprocess_form_element() (Zeile 783 in /www/htdocs/web/core/themes/claro/claro.theme).
Steps to reproduce
TBD
Proposed resolution
For the moment i helpted me with comment this line:
$variables['description']['attributes']->addClass('is-disabled');
So i could get activated Open Graph from Meta Tag.
I can not say, if the error comes with core ore an other module.
Until today I installed all modules with composer and activated with drush, so i never tried calling this page before.
TBD proposed solution needs to be cleaned up.
Remaining tasks
Update issue summary
Add tests
Review
User interface changes
NA
API changes
NA
Data model changes
NA
Release notes snippet
NA
Comments
Comment #2
nivethitha commentedI am not get this type of issue on this version. Please check it once again.
Comment #3
johnnydarkko commentedI'm getting this error, too, and it's quite annoying. I can't do anything unless I hack the `claro.theme` file. Even when the 'Proposed Solution' is done, I'm getting this error that appears to be related, except my error says 'null' instead of 'array':
I created a patch that checks to see if the `attributes` key exists before invoking `addClass`, but this feels like there's something else that has gone awry...
Comment #4
johnnydarkko commentedComment #5
smustgrave commentedAdded the issue template but there are sections that need to be filled in, mainly steps to reproduce and an agreed solution.
Will need a test case also.
Comment #6
sijumpk commented@johnnydarkko, Normally going to /admin/modules (as said in the issue summary) is not making any errors. Maybe some custom/contributed module's links are generating the problem. Try to recreate the problem by disabling all non-core installed modules.
Comment #7
smustgrave commentedComment #8
prashant.cAttempted to replicate the issue on versions
10.1.xand11.0.xby introducing the German language and exploring various pages, including /admin/modules. However, I was unable to encounter the error. @nivethitha, it would be appreciated if you could provide instructions on how to reproduce this issue. Thank you.Comment #9
prashant.cComment #10
akshayadhavComment #11
johnnydarkko commentedTurns out the issue was due to some bad custom code in a custom module overriding link text in an implementation of hook_preprocess_links for a link that doesn't exist in the variables array of the admin pages that were whitescreening for me. So, the case I described earlier (#3) isn't a valid report and patch, but I'll leave this all here just in case it helps someone else making the same bonehead mistake :)
Comment #12
johnnydarkko commentedComment #13
smustgrave commentedNot deleting the issue just moving to a different bucket.