Skip to content

Add patch for content_access

Joachim Valdemar Yde requested to merge jyde-v9.4-2-patch-42622 into v9.4-2

Addresses the following error:

[Tue, 02/14/2023 - 10:58] [Debug] [php] [client: 2001:1458:204:1::102:18dd, Anonymous] 
Deprecated function: unserialize(): Passing null to parameter #1 ($data) of type strin
g is deprecated in content_access_get_settings() (line 225 of /app/web/modules/contrib
/content_access/content_access.module) #0 /app/web/core/includes/bootstrap.inc(347): _
drupal_error_handler_real(8192, 'unserialize(): ...', '/app/web/module...', 225)\n#1 [
internal function]: _drupal_error_handler(8192, 'unserialize(): ...', '/app/web/module
...', 225)\n#2 /app/web/modules/contrib/content_access/content_access.module(225): uns
erialize(NULL)\n#3 /app/web/modules/contrib/content_access/src/Access/ContentAccessNod
ePageAccessCheck.php(26): content_access_get_settings('per_node', 'page')\n#4 [interna
l function]: Drupal\content_access\Access\ContentAccessNodePageAccessCheck->access(Obj
ect(Drupal\Core\Session\AccountProxy), Object(Drupal\Core\Routing\RouteMatch))\n#5 /ap
p/web/core/lib/Drupal/Core/Access/AccessManager.php(160): call_user_func_a...

See https://www.drupal.org/project/content_access/issues/3258804 for more information. The patch is from comment #14 (closed) and while ACL dependencies are unresolved, other comments make it clear that it has never worked (even in the current version) and should thus not be a problem. Additionally, there is ongoing work to remove the ACL integration altogether (see https://www.drupal.org/project/content_access/issues/3306205).

This issue is not directly breaking on the sites we have identified it on, but it likely contributes to other problems, hence this MR.

Merge request reports