Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Since Bootstrap Tour use name
(check Bootstrap tour API documentation, name
parameter) parameters as prefix for localstorage variable names, it is critical to have unique name for each tour after it's initialization.
This cause a problem when user ended the tour A but also tour B, C, D ... cannot be launched.
Comment | File | Size | Author |
---|---|---|---|
#9 | add_unique_tour_name_to_avoid_local_storage_collisions-2533524-9.patch | 413 bytes | m.stenta |
#5 | add_unique_tour_name_to_avoid_local_storage_collisions-2533524-5.diff | 732 bytes | dstorozhuk |
Comments
Comment #1
dstorozhukComment #2
tripper54 CreditAttribution: tripper54 commentedIssues should not be marked 'needs review' unless a patch has been submitted for review, see https://www.drupal.org/node/156119
Comment #3
dstorozhukComment #4
dstorozhukPlease disregard the #3 patch. I added unique for steps instead if tour.
Comment #5
dstorozhukComment #6
dstorozhukUpdate title.
Comment #7
dstorozhukUpdate title.
Comment #8
dstorozhukAdd link to Bootstrap tour API documentation.
Comment #9
m.stentaI can confirm that this issue exists (ending one tour prevents ALL other tours from starting), and that the patch fixes the issue. I would consider this RTBC.
I am proposing one small change, however: I think we should prepend "tour_" to the name parameter, so that it is prefixed to avoid potential conflicts. I know the potential is very small, given the way they are named, but this is better practice.
Drupal 8 uses a convention for its local storage variable naming: "Drupal.[module_name].[variable_name]"... I tried doing that for this patch, but it didn't work. It looks like the Bootstrap Tour library doesn't support periods in the name.
From the link you provided in the description (emphasis mine):
Ultimately, that should be fixed upstream in the library, but I think this patch will work for now.
@dstorozhuk: please review, and mark this as RTBC if you agree. :-)
Comment #10
candelas CreditAttribution: candelas as a volunteer commentedPatch #9 works. Thanks a lot :)