This error fills my log.

Created on 5 June 2023, about 1 year ago
Updated 17 August 2023, 11 months ago

Problem/Motivation

PHP Deprecated: Optional parameter $langcode declared before required parameter $grantDelete is implicitly treated as a required parameter in /home/***/public_html/****.com/web/modules/contrib/permissions_by_term/src/Factory/NodeAccessRecordFactory.php on line 9

Versiรณn de
Drupal 10.0.9

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Closed: duplicate

Version

3.1

Component

Code

Created by

๐Ÿ‡ช๐Ÿ‡ธSpain ady1503

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

Comments & Activities

  • Issue created by @ady1503
  • Assigned to omkar_yewale
  • Status changed to Needs work about 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia omkar_yewale Mumbai
  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia omkar_yewale Mumbai

    Please review this patch.

  • ๐Ÿ‡ช๐Ÿ‡ธSpain ady1503

    The last patch not working.

    This is the error:

    [06-Jun-2023 21:44:41 Europe/Madrid] Uncaught PHP Exception Drupal\Core\Entity\EntityStorageException: "SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'es' for column `***_com`.`node_access`.`grant_update` at row 1: INSERT INTO "node_access" ("nid", "langcode", "fallback", "realm", "gid", "grant_view", "grant_update", "grant_delete") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array
    (
    [:db_insert_placeholder_0] => 219
    [:db_insert_placeholder_1] => es
    [:db_insert_placeholder_2] => 1
    [:db_insert_placeholder_3] => permissions_by_term
    [:db_insert_placeholder_4] => 219
    [:db_insert_placeholder_5] => 1
    [:db_insert_placeholder_6] => es
    [:db_insert_placeholder_7] => 0
    )
    " at /home/***/public_html/***.com/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php line 815
    [06-Jun-2023 21:45:50 Europe/Madrid] PHP Deprecated: Optional parameter $langcode declared before required parameter $grantDelete is implicitly treated as a required parameter in /home/***/public_html/***.com/web/modules/contrib/permissions_by_term/src/Factory/NodeAccessRecordFactory.php on line 9

    I revert to original.

    Thanks

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States crutch

    I'm getting the same error on production as original problem/motivation. When changing roles for a user...

    An AJAX HTTP error occurred.
    HTTP Result Code: 200
    Debugging information follows.
    Path: /batch?id=317&op=do_nojs&op=do
    StatusText: OK
    ResponseText: 
    Deprecated:  Optional parameter $langcode declared before required parameter $grantDelete is implicitly treated as a required parameter in /modules/contrib/permissions_by_term/src/Factory/NodeAccessRecordFactory.php on line 9
    {"status":true,"percentage":"20","message":"Completed 0 of 1.","label":""}
    
    The content access permissions have not been properly rebuilt.

    ...the role changes for a user are applied but I'm not confident all is well with permissions.

  • ๐Ÿ‡ช๐Ÿ‡ธSpain ady1503

    Tienes razon

    Here is the solution:

    https://www.drupal.org/project/permissions_by_term/issues/3231556 ๐Ÿ› PHP Deprecated: Required parameter $grantUpdate follows optional parameter $langcode Fixed

    Thanks

  • Status changed to Closed: duplicate 11 months ago
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany marcoliver Neuss, NRW, Germany

    Marking as duplicate of https://www.drupal.org/project/permissions_by_term/issues/3231556 ๐Ÿ› PHP Deprecated: Required parameter $grantUpdate follows optional parameter $langcode Fixed .

    Issue should be fixed as of version 3.1.23.

Production build 0.69.0 2024