- Issue created by @chike
- πΊπΈUnited States dianacastillo Miami
i am seeing this issue as well is there an update?
- πΊπΈUnited States dianacastillo Miami
this code in /Drupal/Core/Utility/LinkGenerator.php
explains why it works differently for anonymous users but where is the javascript which seems to be which is what is failing ?
/**
* {@inheritdoc}
*
* For anonymous users, the "active" class will be calculated on the server,
* because most sites serve each anonymous user the same cached page anyway.
* For authenticated users, the "active" class will be calculated on the
* client (through JavaScript), only data- attributes are added to links to
* prevent breaking the render cache. The JavaScript is added in
* system_page_attachments().
* - πΊπΈUnited States dianacastillo Miami
/core/misc/active-link.js. this is the .js file
- πΊπΈUnited States dianacastillo Miami
took away this patch and now it seems to work https://www.drupal.org/files/issues/2021-12-02/2726471-28.patch β
- π³π¬Nigeria chike Nigeria
Hi, do you mean you applied this patch and the issue was solved? Did you write this patch or on which issue was it posted?
- πΊπΈUnited States dianacastillo Miami
I removed this patch which someone had added to the code base ( a previous programmer) . its posted on the drupal site, not sure the issue.
- π³π¬Nigeria chike Nigeria
Was the patch added to Drupal core or Aristotle theme or some other place in Opigno? How can I remove the patch?
- πΊπΈUnited States dianacastillo Miami
its a core patch. check your composer file and see if it was in there. if so remove it from the composer file and update your drupal core with composer.
- π³π¬Nigeria chike Nigeria
I can't find any patch like that in composer.json. I am not sure Opigno shipped with that. Probably someone in your team added the patch.
- πΊπΈUnited States dianacastillo Miami
yes that's what i said.
so if you dont have that patch go to that file /core/misc/active-link.js and debug it. - πΊπΈUnited States dianacastillo Miami
this is a core issue, not a theme issue https://www.drupal.org/project/drupal/issues/3498276 π is-active is not being applied to menu url Active
- π³π¬Nigeria chike Nigeria
This most likely is a theme issue. I have only encountered it with this theme and have not seen it working with many other themes.
- π³π¬Nigeria chike Nigeria
I didn't check but I can bet if you make a clean install of Drupal, you won't see the issue in Olivero.