Tablesort Example just plain doesn't work for non-admin user, I assume because of some type of caching issue.

I updated the tests in #2821387: Convert all tests to BrowserTestBase to do a cache flush between every page load and that make it "run". But it's broken. I've tested as anon and a regular auth user on both firefox and chrome.

Comments

rfay created an issue. See original summary.

alex_optim’s picture

The problem was that the page with table, was cached for non-admin user.

alex_optim’s picture

Status: Active » Needs review
rfay’s picture

Works perfectly.

Rather than removing cache, isn't there a way to cache with URL args?

If not, this is definitely RTBC. After this lands the PHPUnit test in #2821387: Convert all tests to BrowserTestBase can have the cache clears removed from it.

mile23’s picture

Status: Needs review » Postponed

After #2821387: Convert all tests to BrowserTestBase we need to modify the test so it doesn't use drupal_flush_all_caches(), and also so it tries to do the sorting behavior as an anonymous user.

mile23’s picture

Status: Postponed » Needs work

#2821387: Convert all tests to BrowserTestBase is in, so we can resume here.

Needs a test where we perform the sort as an anonymous user.

Needs to remove calls to drupal_flush_all_caches() from tests.

There might also be a better set of cache options, but I don't know what they'd be.

navneet0693’s picture

StatusFileSize
new3.13 KB
navneet0693’s picture

Status: Needs work » Needs review

  • Mile23 committed 6157259 on 8.x-1.x authored by alex_optim
    Issue #2821742 by alex_optim, navneet0693, rfay: Tablesort Example...
mile23’s picture

Status: Needs review » Fixed

In an ideal world, we'd figure out a cache directive that suits this use case, but no_cache works too.

Thanks!

Status: Fixed » Closed (fixed)

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