Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This module sometimes seems to cause multiple unwanted empty brackets at the start of the title element during page load (which then appear in browser tab headings). Sometimes just a single pair, sometimes lots nested like this:
( ) ) ) ) ) ) ) Foo | My Site
Could we add something to prevent that from happening? The thing is, it goes away without fail if you disable it, but I've just been looking through the source code and I can't see any javascript that updates that part of the DOM, so I'm wondering if it's impacting something else…
(Drupal 8.7.5 core)
Comment | File | Size | Author |
---|---|---|---|
#17 | 3069162_12-17.txt | 1.87 KB | andy-blum |
#17 | 3069162_17.patch | 8.3 KB | andy-blum |
#9 | safari-anon-2022-02-08-0939am.png | 240.16 KB | miwayha |
#4 | config-2.png | 179.18 KB | abhisekmazumdar |
#4 | config-1.png | 210.96 KB | abhisekmazumdar |
Comments
Comment #2
wturrell CreditAttribution: wturrell as a volunteer commented(minor issue summary fix)
Comment #3
joco_sp CreditAttribution: joco_sp commentedI have the same issue, but it appears only in Safari.
Comment #4
abhisekmazumdarI tried to re-create this issue but wasn't able to. Sharing my configuration setup:
Tested on Safari and Chrome.
Comment #5
joco_sp CreditAttribution: joco_sp commentedabhisekmazumdar it happens for users that don't have the permission to see it.
The problem is that I can't figure exactly the reason why and how it happens. For example the client always sees the (), there are even more of them like (((((((((( )))))))))). For now, I just uninstalled the module on this project, where I have those problems. Will try to test it also on the other ones and share my results.
Comment #6
extect CreditAttribution: extect commentedRan into this as well. Seeing the brackets when logged in as admin. So, quite unlikely it's a permission issue. Really weird.
Comment #7
andy-blumThe brackets/parentheses added to
document.title
is coming from the tinycon repository. There are no issues on that repository about duplicate characters and after some step debugging I've been unable to replicate the issue. If anyone is still encountering this issue and is willing to share the exact values involved (environment name, document title, etc) I'd be willing to dig a bit deeper.Comment #8
e0ipsoThanks for the testing everyone! I will close the issue. Let's reopen this if anyone can provide additional info to reproduce this.
Comment #9
miwayha CreditAttribution: miwayha as a volunteer commentedThis continues to happen to me. Here's what I did:
A picture of my anonymous user screen:
At no point did I touch the settings.php file.
The unwanted parens do not appear for me in Chrome 98 or Firefox 96.0.3
Comment #10
andy-blumThanks @miwayha for the replication steps! I'll take a look at this.
Comment #11
andy-blumComment #12
andy-blumThanks again @miwayha for the replication steps!
The key here was to look for it in Safari, as the tinycon library doesn't attempt to generate a new icon from the Canvas API. The attached patch makes two key changes:
This patch also updates to the latest version of the TinyCon lib from https://github.com/tommoor/tinycon
Comment #13
e0ipsoI do not have access to a Safari browser. But code looks good from my perspective.
Comment #14
e0ipsoI just noticed this is using the new once library. Will this make this module D9.2+ only? I think we cannot afford this yet.
Comment #15
miwayha CreditAttribution: miwayha as a volunteer commentedI have access to Safari and can confirm the patch works as expected on a fresh install of drupal and module version 4.0.3
Comment #16
andy-blumWorking right now on replacing `once` with `jquery.once`. Should have a new patch shortly
Comment #17
andy-blumReplaced the drupal/once library with drupal/jquery.once
Comment #19
e0ipsoThanks all!