I followed the instructions to install/configure the taxonomy context module. I enabled the modeule, checked the settings and then enabled the blocks. It showed up for a little bit, then I noticed that the non-admin accounts couldn't see it, then when I logged back in with my admin user, it couldn't see the blocks either anymore. Any idea what could be wrong?

Andrew Beaupre
www.gonzotravel.net
gozotravel@1337.ca

Comments

Anonymous’s picture

Turns out the context blocks just aren't showing up on the main page. If you go into the story section, the'll show up along with the other context blocks i've defined.

Andrew Beaupre
www.gonzotravel.net
gozotravel@1337.ca

Uwe Hermann’s picture

handelaar’s picture

Title: Can't get context blocks to show up anymore » Taxonomy_context: Context blocks' contents are invisible to non-admin users
Version: » 4.6.x-1.x-dev

Still broken in 4.6 - changing title to better reflect what the issue's about.

Problem: Blocks do appear for non-admin users, but are empty.

handelaar’s picture

And now the answer:

Taxonomy_context checks for a "View" permission, but provides no hook to allow site admins to set it.

eyos’s picture

I'm having the same issue. In which part of the module code is checked for this permission? As a quick fix, I would like simply like to disable the check.

nedjo’s picture

There is no permission check for the block. The "view" option in a _block hook is not a permission but an argument passed in by Drupal on calling the hook.

Keep in mind that there is a separate block for each vocabulary. The only filtering done is that the block isn't displayed if the current term or node being viewed isn't assigned to the vocabulary being viewed.

After reviewing the code, I don't think this can have to do with permissions. Likely you are viewing pages/categories not in the block's vocabulary.

eyos’s picture

"Likely you are viewing pages/categories not in the block's vocabulary."
That doesn't explain why admin users are able to see the blocks, but non-admin users aren't. As far as I'm able to see, I've not restrict the block to specific content types.

eyos’s picture

"Likely you are viewing pages/categories not in the block's vocabulary."
That doesn't explain why admin users are able to see the blocks, but non-admin users aren't. As far as I'm able to see, I've not restrict the block to specific content types.

nedjo’s picture

Okay. The issue may have to do with taxonomy or node-level security. I'll take another look.

matias’s picture

I have the same issue and tracked down the problem to the function taxonomy_context_show_nodes in the file taxonomy_context.module
As a quick fix I just comment the line 451
// _node_access_join_sql() .

I guess this have to do with the issue described in

http://drupal.org/node/20121

nedjo’s picture

Thanks. The issue is that I've misused the _node_access_join_sql() function, which shouldn't be called directly but instead (as of 4.6) is provided via the db_rewrite_sql() call. I'll fix this when I get a sec.

nedjo’s picture

Now fixed.

Anonymous’s picture