Problem/Motivation

Issue #3195679: Provide default options for each content type introduced the usage of backticks in PHP.

The line (215) in node_keep.module

'#title' => t(`Default option for "Prevent this node's alias from being changed"`),

can result in

InvalidArgumentException: $string ("") must be a string. in Drupal\Core\StringTranslation\TranslatableMarkup->__construct() (line 132 of /var/www/html/web/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php).

on some systems when edititng a content type.

It is safer to just use a string instead of "executing" the string.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork node_keep-3380172

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Stefdewa created an issue. See original summary.

stefdewa’s picture

Status: Active » Needs review

Created MR.

keshavv’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, +1 for RTBC

xaa’s picture

Priority: Normal » Major

I confirm patch is working. Thank you. I had same error after update from 2.1.2 to 2.2.0.

I elevate the ticket priority as this issue broke access on some backend pages (eg /admin/structure/types/manage/your_content_type).

tijsdeboeck’s picture

I agree with #5 about bumping it to Major, this issue broke important pages, including /admin/structure/types/add
The MR fixed the issue for us as well, thanks!!

anybody’s picture

Same issue here! Could this please be fixed with a new stable release?

Any active maintainer?

nginex’s picture

Going to create a new release ASAP

anybody’s picture

Thanks for the SUUUUUUUPER fast reaction!! Whao :D
(just wrote the pm)

  • nginex committed c505ecc8 on 2.x authored by Stefdewa
    Issue #3380172: InvalidArgumentException: $string ("") on some systems...
nginex’s picture

Status: Reviewed & tested by the community » Fixed

Here is a new release https://www.drupal.org/project/node_keep/releases/2.2.1

Thank you for reporting and fixing the issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

xaa’s picture