The SafeMarkup::placeholder() function was removed from Drupal core on August 19th: #2549395: SafeMarkup methods are removed.
The SafeMarkup class has changed and an update is needed.
This breaks the Revision Overview page due to a fatal PHP error:
Fatal error: Call to undefined method Drupal\Component\Utility\SafeMarkup::placeholder() in /Users/chris.hamper/Sites/devdesktop/8.0.x/modules/contrib/diff/src/Form/RevisionOverviewForm.php on line 183
Also the update of the SafeMarkup class breaks NodeRevisionController
Notice: Array to string conversion in Drupal\Component\Utility\SafeMarkup::set() (line 77 of core/lib/Drupal/Component/Utility/SafeMarkup.php).
We also should fix the test failing because of #507488: Convert page elements (local tasks, actions) into blocks and have green tests again =).
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | interdiff-2557979-7-14.txt | 2.93 KB | juanse254 |
| #14 | SafeMarkup_Placeholder-2557979-14.patch | 5.47 KB | juanse254 |
| #7 | 2557979-7.patch | 3.21 KB | giancarlosotelo |
| #7 | interdiff-2-7.txt | 2.36 KB | giancarlosotelo |
| #2 | 2557979-2.patch | 686 bytes | hampercm |
Comments
Comment #2
hampercm commentedThis patch replaces the call to the removed function with its suggested alternative.
Comment #4
hampercm commentedTest failed due to #2549907: Fix schema langcode error. Once that patch is committed, this will pass automated tests.
Comment #7
giancarlosotelo commentedTested locally and patch solved the problem but now with latest core changes tests are still failing.
#507488: Convert page elements (local tasks, actions) into blocks We must include blocks in tests and also there was a problem with
SafeMarkup::set()but it will be removed soon #2554889: Remove SafeMarkup::set() from the codebase so we should extend this patch after it gets committed.For now I am uploading a patch with fixes for those changes instead of creating another issue(fixes are related in some way) and I hope a maintainer will look over this and #2549907: Fix schema langcode error soon.
Comment #8
giancarlosotelo commentedComment #10
lhangea commentedhampercm and giancarlosotelo thanks for your work. These days I can look over some of the issues from the queue and update the 8.0.x branch accordingly.
Comment #11
juanse254 commentedI think we should avoid using SafeMarkup::set()
The rest looks good to me, tested locally and is passing.
EDIT:
I think we can drop this whole thing.
Comment #14
juanse254 commentedThis will merge this two issues #2563017: SafeMarkup::set() removed from core with this one and should solve both.
Comment #18
lhangea commentedI know the test is postponed because of the previous fail we had in HEAD so I just went ahead and committed this change. Tests pass locally the module seems to work OK.
Comment #20
lhangea commentedBack to fixed, the patch is already applied.