Pointless code: Drupal.node_edit_protection = {}

Created on 20 February 2024, 9 months ago

Problem/Motivation

In the js we find this code:

  Drupal.node_edit_protection = {};

It seems to be useless and should be removed.

Steps to reproduce

Remove the line.
Behavior is the same as before.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

RTBC

Version

1.0

Component

Code

Created by

🇩🇪Germany donquixote

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

Comments & Activities

  • Issue created by @donquixote
  • Status changed to Needs review 9 months ago
  • 🇮🇳India dineshkumarbollu

    Hi @donquixote

    The After removing the unused js file behaviour of module working as expected, created patch and test the behaviour in my system,Attaching Screenshot along with patch, Please review.

  • Status changed to RTBC 9 months ago
  • 🇩🇪Germany donquixote

    Looks good to me.
    I don't know if there are more niche cases we need to test, but I don't see what would go wrong.

    Needs maintainer review.
    It would be good to know why this code was added in the first place. Probably a leftover.

  • 🇩🇪Germany donquixote

    Note on BC:
    Somebody could have custom code that writes to this object.
    Such custom code would no longer work.
    But I don't think this module has any commitment to support such custom code.

Production build 0.71.5 2024