I do not know if this is a Panels issue, a CTools issue, a Panels Tabs issue, or something else. My best guess is Panels itself, which is why I am posting it here.

I have marked this issue as 'major' because of its severity for my site.

The environment includes:

  • Drupal 7.22
  • Chaos Tools 7.x-1.3
  • Page Manager 7.x-1.3
  • Panels 7.x-3.3
  • Panels Tabs 7.x-1.x-dev (latest - 2012-Oct-26)
  • Mini Panels 7.x-3.3
  • Search API 7.x-1.4
  • Facet API 7.x-1.3
  • Views 7.x-3.7
  • Views Content Panes 7.x-1.3
  • Adaptive Theme AT Headliner 7.x-3.1
  • AT Headliner is built on AT Core 7.x-3.1

The page architecture consists of:

  • A page with a single panel
  • The page, the panel, and all the panel's panes (except as noted below) are always visible to both anonymous and authenticated users
  • 2 required contexts that are passed to a mini-panel pane: a search index and the logged-in user
  • 2 content regions (Top and Bottom)
  • The issue concerns the Top region
  • Top uses the Tabs style
  • Top contains 6 panes
  • Panes 1 and 2 are always visible
  • Panes 3 and 5 are only visible to authenticated users
  • Panes 4 and 6 are only visible to anonymous users
  • Pane 1 contains a views better-exposed-filters block
  • Pane 2 contains a mini-panel (see below)
  • The Bottom region contains a views content pane, which itself is a search index view

The mini-panel is configured as follows:

  • 2 required contexts, the ones that the page's panel passes to it (search index and logged-in user)
  • A single region (Main)
  • Main uses the Tabs style
  • Main contains 5 search facets
  • Everything in the mini-panel is always visible to both anonymous and authenticated users

The only items that are cached are the panels page's panes 4 and 6, which are custom content panes. Nothing else is cached, because the page is a live search page.

The page displays correctly for authenticated users, as illustrated in these 2 screen shots:

Authenticated user's view of main search criteria

Authenticated user's view of nested search filters mini panel

The page displays INCORRECTLY for anonymous users. Instead of displaying tabs and nested tabs, it displays a series of corresponding anchors. Here is how this looks:

Anonymous users see anchors instead of tabs and nested tabs

This issue exists across all devices and browsers on which it has been tested. These include Chrome, Safari, and Opera on a MacBook Pro laptop. They also include Dolphin, Opera, and WebKit on an Android 4 smartphone.

Note that the 'search index' context is required for the page (and mini-panel) to function properly. Inclusion of the 'logged-in user' context actually makes no difference to how the page displays to anonymous and authenticated users; leaving out this context yields the same results.

Below I will post an issue reply with screen shots of the page's and the mini-panel's configurations.

Let me know of any other information that I might provide.

Thanks in advance,

Bob

CommentFileSizeAuthor
#9 dollar-dot-cookie-is-not-a-function.png100.1 KBAnonymous (not verified)
#3 mini-panel-contexts.png33.68 KBAnonymous (not verified)
#3 mini-panel-content.png148.62 KBAnonymous (not verified)
#2 drupal_validate_utf8-strlen-complaint.png125.46 KBAnonymous (not verified)
#1 panels-page-summary.png97.89 KBAnonymous (not verified)
#1 panel-page-contexts.png128.53 KBAnonymous (not verified)
#1 panels-page-content.png186.85 KBAnonymous (not verified)
events-find-anonymous-user.png96.76 KBAnonymous (not verified)
events-find-authenticated-user-nested-search-filters.png89.57 KBAnonymous (not verified)
events-find-authenticated-user-main-criteria.png120.94 KBAnonymous (not verified)

Comments

Anonymous’s picture

StatusFileSize
new186.85 KB
new128.53 KB
new97.89 KB

These are screen captures of the page's configuration...

page summary

panel contexts

page content

Anonymous’s picture

StatusFileSize
new125.46 KB

The warning that appears whenever the panel's content editor is displayed traces to the following:

drupal_validate_utf8 warning dpm

Anonymous’s picture

StatusFileSize
new148.62 KB
new33.68 KB

Here is how the mini-panel's configuration looks:

mini panel contexts

mini panel content

merlinofchaos’s picture

Can you try the -dev version of CTools? I believe this is fixed there. However, a very similar bug is reproted in #1966794: Can't Figure This Bootstrap.inc Error validate utf8 where the user reports -dev version didn't fix the problem. And it turns out I was wrong. This patch isn't committed yet and almost certainly solves your problem: #1925018: Adding a renderable-array block to a page gives errors in the admin UI

Your picture of the dsm() is *very* helpful, though. A block of some sort is being sent through a filter function as an array instead of a string. If the above patch does not solve your problem, can you add (assuming you are using Views on your site, you almost certainly are) a vsm_trace() when that bug shows up? That will tell you at exactly what line of code. (vsm_trace() is like a very abbreviated version of dsm(debug_backtrace()) which is also very handy for finding where problems are occurring).

If that patch solves your problem, please mark this issue as a duplicate.

merlinofchaos’s picture

As I compare that patch to the problem you're getting, it looks very similar but seems to happen in a different location, so I'm less certain that patch will help you.

merlinofchaos’s picture

Actually, I'm wrong; the strlen patch will fix the admin UI. However it may not be related to the problem you're seeing in the front end.

So I have an additional question: How are those subtabs implemented? Are they just standard Drupal local tasks? Or are you using something like panels tabs or quicktabs to get javascript tabs?

Anonymous’s picture

Both the tabbed region (A) of the panel page and the tabbed region of the mini-panel (B) are using Panels Tabs (7.x-1.x-dev). Mini-panel B is contained by region A of the panel page.

I tried the dev version of CTools. It's use changes nothing. The display issue remains, and the admin strlen warning remains as well.

merlinofchaos’s picture

Okay, what you're seeing is then probably a javascript crash causing Panels tabs to fail to render correctly. It may or may not be related. The patch I pointed to will fix the strlen issue.

Can you look in your browser's javascript console and see if there's a javascript error?

Anonymous’s picture

StatusFileSize
new100.1 KB

Aha! I checked the javascript logs on both Safari and Opera.

There is a JS error when the user is anonymous, but not when the user is authenticated. This dovetails with improper display when user is anonymous, and correct display when authenticated.

It is in sites/all/modules/contrib/facetapi_collapsible, specifically in facetapi_collapsible.js.

javascript error

Thanks for the assistance. I will report this in the right place, as it seems to be the culprit.

Anonymous’s picture

Status: Active » Closed (works as designed)

Nailed it. If you're curious, see http://drupal.org/node/1977982#comment-7335522 (in the facetapi_collapsible issue queue).

FYI, the strlen warning on the configuration page is still there.

merlinofchaos’s picture

As I said. The patch I pointed to will fix the strlen issue.

Anonymous’s picture

Thanks for the reminder. That did the trick.