Problem/Motivation

Due to deprecated placeholder notations errors are thrown at Old Code Ads and Old Search tabs.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

omkar.podey created an issue. See original summary.

omkar.podey’s picture

StatusFileSize
new2.05 KB
omkar.podey’s picture

Status: Active » Needs review
wim leers’s picture

Status: Needs review » Needs work

Build Successful is not the same as tests passing … but that apparently is a pre-existing problem: https://www.drupal.org/pift-ci-job/2030375.

Oh … there aren't any tests 🤓🙈


+++ b/oldcode/src/Form/AdsenseOldCodeSettings.php
@@ -155,8 +155,8 @@ class AdsenseOldCodeSettings extends ConfigFormBase {
-      '#description' => $this->t('Enter up to !channels custom channels that you have configured in Google AdSense. If you are not using custom channels, or you are only using URL channels, then leave this empty.',
-        ['!channels' => ADSENSE_OLDCODE_MAX_CHANNELS]),
+      '#description' => $this->t('Enter up to :channels custom channels that you have configured in Google AdSense. If you are not using custom channels, or you are only using URL channels, then leave this empty.',
+        [':channels' => ADSENSE_OLDCODE_MAX_CHANNELS]),

Converting away from !variable is good.

But :variable is wrong: see the docs at \Drupal\Component\Render\FormattableMarkup::placeholderFormat(): this is for attributes containing URLs.

The correct placeholder format to use is @variable in this case.

omkar.podey’s picture

StatusFileSize
new2.05 KB
new2.05 KB

Updated as per review.

omkar.podey’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 5: deprecated_placeholder_notations-3239827-5.patch, failed testing. View results

wim leers’s picture

Status: Needs work » Reviewed & tested by the community

Looking great!

jcnventura’s picture

Thanks!

jcnventura’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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