Fatal error after editing a user's timezone

Created on 25 September 2024, 6 months ago

Problem/Motivation

Fresh Drupal 10.3.5 standard install with diff module (tried with both 8.x-1.7 and 2.0.0-beta2), enable user_revision_diff, create a user, edit its time zone, go to user/2/revisions and get WSOD:

InvalidArgumentException: The timestamp must be numeric. in Drupal\Component\Datetime\DateTimePlus::createFromTimestamp() (line 201 of core/lib/Drupal/Component/Datetime/DateTimePlus.php).

On other pages of the site I also get this error:

Warning: Attempt to read property "entity" on null in Drupal\user_revision_diff\Form\RevisionOverviewForm->buildForm() (line 217 of modules/contrib/user_revision/modules/user_revision_diff/src/Form/RevisionOverviewForm.php).

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇮🇹Italy kopeboy Milan

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

Comments & Activities

  • Issue created by @kopeboy
  • 🇮🇹Italy kopeboy Milan

    Actually the problem is not related to the timezone at all.

    I created another user, then changed his username, went to revisions and had the same error:
    InvalidArgumentException: The timestamp must be numeric. in Drupal\Component\Datetime\DateTimePlus::createFromTimestamp() (line 201 of core/lib/Drupal/Component/Datetime/DateTimePlus.php).

    I also noted that on other pages the warnings are 2, the one above and:

    Warning: Attempt to read property "value" on null in Drupal\user_revision_diff\Form\RevisionOverviewForm->buildForm() (line 220 of modules/contrib/user_revision/modules/user_revision_diff/src/Form/RevisionOverviewForm.php).
    

    Uninstalling the submodule user_revision_diff fixes those, but ofc one cannot diff compare the revisions :(

    Exact same behaviour happens with both diff 1.8.0 and 2.0.0beta2 (the latest available compatible versions)

  • I have the same issue. Also, you cannot remove the module clearly.

    Be sure to back up your database and configuration before trying this module.

    There were errors validating the config synchronization.                                                                             
      Unable to uninstall the <em class="placeholder">User revision</em> module because: This module cannot be uninstalled because Drupal  
       doesn't support converting an entity type from revisionable to non-revisionable.   
    
Production build 0.71.5 2024