Problem/Motivation

When using the "Enable/Disable local tasks display" option as enabled, sometimes the tabs will disappear.

Steps to reproduce

  1. On a fresh install of Drupal install this module
  2. Create a new view with a page and add a path. (Keep all settings for the view)
  3. Create one article piece of content
  4. Visit the default homepage, then flush cache. Toggle "Local tasks", which should appear with nothing.
  5. Visit the created view page. Toggle "Local tasks", again nothing.
  6. Visit the created article in step 3. Toggle "Local tasks", nothing appears.

Proposed resolution

I am still trying to narrow down what is causing this issue.

Article missing local tasks

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

evanjenkins created an issue. See original summary.

evanjenkins’s picture

StatusFileSize
new535 bytes

This patch seemed to do the trick for me.

weseze’s picture

We seem to be experiencing the same issue, although the process of reproducing it is very unclear for us... Nothing to do with views/homepage.

Seem to occur regularly for QA people when doing responsive testing in Firefox, switching between devices in the developer console can sometimes cause this issue...
Clearing the Drupal cache is the only solution we have found so far.

Will try the patch and report back if it helps for our QA people.

dave reid’s picture

Status: Active » Needs review
jrearick’s picture

Feels like it might be an internal Drupal cacheing issue? Has anyone been able to figure out how to reliably replicate the issue and document those steps so the fix can be verified?

dave reid’s picture

I wonder if this is a caching issue, that the toolbar generally doesn't get cached per page, but adding of local tasks, we need to ensure that it *does* get cached per page.

dave reid’s picture

I was also testing out #3323763: Local Tasks menu is shown even when the tray is empty and I couldn't find a way to make this work with the render placeholder, so I ended up ripping out the lazy caching and just outputting the local tasks directly, but this time with proper cache metadata and contexts. My testing so far with all caching turned on seems to be working and solving both issues.

dave reid’s picture

Version: 3.2.1 » 3.x-dev
StatusFileSize
new9.4 KB

Patch for composer workflows against 3.x.

matthand’s picture

Status: Needs review » Reviewed & tested by the community

Confirming the patch in comment 9 applies clean from composer.json and resolves this issue. It also fixes the related issue "Local Tasks menu is shown even when the tray is empty". Moving to status "Reviewed & tested by the community".

dave reid’s picture

I think I was able to narrow down an instance where after a cache clear/invalidation, if the first page I loaded didn't have any local tasks, then subsequent page loads after that would load the cached toolbar without any local tasks even though the page had changed and the local tasks should be visible. I couldn't reliably reproduce this however but this was the one instance I saw.

adriancid made their first commit to this issue’s fork.

adriancid’s picture

Status: Reviewed & tested by the community » Fixed

Thanks

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.