When attempting to use Language, Tour Module, and the Tour UI module there is an issue when saving or modifying the language-overview or the language-continue tips will constantly append text to the body regardless if the tips have the provided text that are being appended.
Steps to Reproduce in UI
* Download and Install Tour_UI module
* Enable Language module
* Add Language Module
Go to Tour UI config then edit the language tour. Edit the any tour tip like Adding languages and press save. Then edit the Languages tip and there should be a repeating text. It may take 1-2 times of reproducing the previous before it is noticeable.
The way to programmatically do it is to load the tips and loop through them to see the constant output:
$tour = \Drupal::entityTypeManager()->getStorage('tour')->load('language');
$tips = $tour->getTips();
foreach ($tips AS &$tip){
echo($tip->id());
echo($tip->get('body'));
}
$tips = $tour->getTips();
foreach ($tips AS &$tip){
echo ($tip->id());
echo ($tip->get('body'));
}
The biggest culprit is the language_tour_tips_alter function
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3006356-language-issue_with_tours-3.patch | 1.4 KB | sean_e_dietrich |
Comments
Comment #2
sean_e_dietrichComment #3
sean_e_dietrichI have applied my suggested patch which tests to see if the suggested text already exists.
Comment #4
sean_e_dietrichComment #5
volkswagenchicktagging for badcamp 2018
Comment #14
smustgrave commentedSo just FYI tour is being considered for removal from core and moved to contrib (where hopefully we will fold in Tour UI) so not sure if adding a fix to core for something being removed will work.
But this would need tests also.
Comment #16
sleitner commentedfunction language_tour_tips_alter()moved to Tour contrib modulefunction tour_tour_tips_alter()Comment #17
smustgrave commentedBefore looking into this anyone know still a problem? Tour ui is obsolete now essentially
Comment #18
smustgrave commentedNot sure I'm seeing this and Tour UI is obsolete. If still a bug we can always re-open.