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
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | interdiff-3239827-2-5.txt | 2.05 KB | omkar.podey |
| #5 | deprecated_placeholder_notations-3239827-5.patch | 2.05 KB | omkar.podey |
| #2 | deprecated_placeholder_notations-3239827-2.patch | 2.05 KB | omkar.podey |
| d9_AdSense_Placeholder_errors.png | 245.77 KB | omkar.podey |
Comments
Comment #2
omkar.podey commented| Status | File | Size |
|---|---|---|
| new | deprecated_placeholder_notations-3239827-2.patch | 2.05 KB |
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.
Comment #5
omkar.podey commented| Status | File | Size |
|---|---|---|
| new | deprecated_placeholder_notations-3239827-5.patch | 2.05 KB |
| new | interdiff-3239827-2-5.txt | 2.05 KB |
Updated as per review.
The last submitted patch, 5: deprecated_placeholder_notations-3239827-5.patch, failed testing. View results
Looking great!
Thanks!
- jcnventura committed 0b8121a on 8.x-1.x authored by omkar.podey
Issue #3239827 by omkar.podey, Wim Leers, jcnventura: Deprecated...
Automatically closed - issue fixed for 2 weeks with no activity.
Comment #1
omkar.podey created an issue. See original summary.