I also got this same issue with Drupal 10.3.1 upgrade, using PHP 8.1.28 on Acquia, and the Gutenberg module 8.x-2.9. Whenever I add a media block and upload a file to it, I can see the Ajax request to "/editor/media/upload/gutenberg". Not sure if it's the same Ajax error as the others that were reported, but before the JSON object is returned by the request above, I can see the following deprecation warning in the response:
<br/><b>Deprecated</b>: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in <b>/mnt/www/html/hpdevportal3dev/docroot/core/lib/Drupal/Component/Utility/Bytes.php</b> on line <b>76</b><br/><br/><b>Deprecated</b>: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in <b>/mnt/www/html/hpdevportal3dev/docroot/core/lib/Drupal/Component/Utility/Bytes.php</b> on line <b>78</b><br/>
The error persists, even after applying the patch that includes the "media_library.opener" tag to the "gutenberg.media_library.opener" service. The error wasn't happening in the 10.2.4, and curiously enough, it's happening only in our dev environment on Acquia Cloud, not happening in our local environments with Docksal.
Is it something from the Drupal 10.3 upgrade? Or maybe something related with how PHP is configured to show notifications or not?
leomontenegro6 β made their first commit to this issueβs fork.
Just tried the patch that disables JS aggregation for Gutenberg libraries, and I confirm it worked for resolving JS Errors when using Gutenberg in Drupal 10.
+1 for RTBC as well.
So, the "getGroupRoles" method present in 1.0.0 was deleted in 2.0.0, and replaced by the "getNonAdminRoles" method, right?
I was taking a look at both methods, to check their differences. Although both are listing group roles, are they indeed equal? The latter seems to ignore admin roles, with the former seeming to get all roles without distinction. Will it give the same results regardless, or should we take that into consideration when updating 1.0.0 to 2.0.0 as well?
I'm also interested in having a "me aliases" equivalent for Drupal 9, preferably through aliases instead of redirects. Any progress in the porting process?
I confirm the solution from @djg_tram works. I created a local patch and applied it to my module, and now the block display is properly obeying this setting.
leomontenegro6 β made their first commit to this issueβs fork.