report not working in Gin/Claro admin theme

Created on 11 April 2024, 12 months ago

Problem/Motivation

When visiting /admin/reports/w3c_validator after I generating a report the page errors with:
TypeError: in_array(): Argument #2 ($haystack) must be of type array, string given in in_array() (line 196 of [doc_root]/web/core/themes/claro/src/ClaroPreRender.php).

The report page does display using Stark as admin theme.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom John_B London (UK), Worthing (UK), Innsbruck (Tirol)

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @John_B
  • 🇮🇳India rajdip_755 kolkata

    @John_B Can you please attach screenshots so that I can exactly see where it is breaking for you?
    Also can you please mention the Drupal version and the steps to reproduce the issue?
    Thank you!

  • 🇬🇧United Kingdom John_B London (UK), Worthing (UK), Innsbruck (Tirol)

    I am on current D10, 10.2.5.

    Steps: set admin theme to Claro or Gin; install the module. Set to use the external validator.nu. Vist /admin/reports/w3c_validator. Click to validate all pages.

    A bit abusive I know but I was struggling to install the binaries, HTML5 validator seems to need Java, and even the Debian package for the HTML4 validator was a struggle to get working. I was not banned but the validator tended to return a 502 from time to time. Anyway I completed one run.

    Reload /admin/reports/w3c_validator. See WSOD with 'Website has encountered an error, please try again later.' Check db log and see error in the description. Switch admin theme to something else, like Stark. The result of the validation run appear. Set admin them back to Claro or Gin. See WSOD again.

  • Assigned to rajdip_755
  • 🇮🇳India rajdip_755 kolkata

    Thanks @John_B for providing the details.
    I can replicate the issue and working on it !

  • Merge request !73440145: Resolve the array related issue. → (Merged) created by rajdip_755
  • Issue was unassigned.
  • Status changed to Needs review 12 months ago
  • 🇮🇳India rajdip_755 kolkata

    I have raised the MR for resolving the issue, attaching here the screenshot of the admin/reports/w3c_validator page in gin and claro theme after applying the changes.
    Please review the MR .

  • Status changed to RTBC 12 months ago
  • 🇬🇧United Kingdom John_B London (UK), Worthing (UK), Innsbruck (Tirol)

    Thanks. Tested in both Gin admin theme (child theme of Claro), and in Stark theme. It is fine.

  • Status changed to Fixed 6 months ago
  • 🇫🇷France Dom.

    Thanks a lot for your contribution, fix and test

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

Production build 0.71.5 2024