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

Comment #1

omkar.podey created an issue. See original summary.

omkar.podey’s picture

Comment #2

omkar.podey commented
StatusFileSize
new deprecated_placeholder_notations-3239827-2.patch 2.05 KB
1 file was hidden/shown/deleted
StatusFileSize
hidden d9_AdSense_Placeholder_errors.png 245.77 KB
omkar.podey’s picture

Comment #3

omkar.podey commented
Status: Active » Needs review
wim leers’s picture

Comment #4

wim leers
Location Ghent 🇧🇪🇪🇺
commented
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

Comment #5

omkar.podey commented
StatusFileSize
new deprecated_placeholder_notations-3239827-5.patch 2.05 KB
new interdiff-3239827-2-5.txt 2.05 KB
1 file was hidden/shown/deleted
StatusFileSize
hidden deprecated_placeholder_notations-3239827-2.patch 2.05 KB

Updated as per review.

omkar.podey’s picture

Comment #6

omkar.podey commented
Status: Needs work » Needs review

Comment #7

Status: Needs review » Needs work

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

wim leers’s picture

Comment #8

wim leers
Location Ghent 🇧🇪🇪🇺
commented
Status: Needs work » Reviewed & tested by the community

Looking great!

jcnventura’s picture

Comment #9

jcnventura
Primary language English
commented

Thanks!

Comment #10

jcnventura’s picture

Comment #11

jcnventura
Primary language English
commented
Status: Reviewed & tested by the community » Fixed

Comment #12

Status: Fixed » Closed (fixed)

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