2

I have a simple problem that has me stumped. I created a block with custom "login" and "create an account" links, which I only want to display to anonymous users, naturally. I deployed the block using a Glazed Builder drag&drop feature, but it's showing up for all users. I also set the block so that it should not show up on /user/ or /user/* but it is showing up on http://example.com/user and http://example.com/user/login, etc.

I used drush cc all and am using an incognito window in Chrome, but cleared the browser cache anyway.

I'm on Drupal 7.54. I am using Glazed Theme from SooperThemes, which allows us to place blocks using a drag & drop editor. The block is still in the "disabled" list in the block list for some reason.

Screenshot of page settings Screenshot of role settings Screenshot of block Screenshot of Glazed Builder

  • 2
    This sounds like a typically "block visibility"-issue to me. Assuming you did all this with the typical Admin UI (not via custom code), would you mind adding a screenprint of how exactly those block visibily settings look like in your setup? If it is what I suspect it to be, I'd be happy to post an answer with a solution how I get these kinds of things to work. – Pierre.Vriens Apr 8 '17 at 8:32
  • Edited. I'm on 7.54. – Christia Apr 10 '17 at 16:14
  • 1
    merci for doing so (replacing the original 'x' (which disappeared) by '4'). No further edits to add more details as I suggested in my prior comment? – Pierre.Vriens Apr 10 '17 at 16:44
  • Hm, interesting details you added ... (merci). But there is somewhere an inconsistency that I don't get yet: "I deployed the block" (sounds like 'enabled the block') while later on you wrote 'The block is still in the "disabled" list in the block list'. Am I missing something (or is either one not correct)? Apart from that, I'm not familiar with that " Glazed" theme, but start to think that there is something unusual in that theme which causes your block visibility settings to get lost somehow. You want me to post a "possible" (not sure yet) work around you may want to try? – Pierre.Vriens Apr 10 '17 at 17:31
  • Since I'm not familiar with that "Glazed" theme, I hesitate to post an actual answer (I might convert this comment later on to it if it does help). But have a look at my answer to this question to see if you want to consider that rules related module to check if you can get it to work with that (instead of the current block visibility settings you're using). If you do, let me know the results you achieved, ok? – Pierre.Vriens Apr 11 '17 at 10:03
2

First of all, you have to remove the first slash in the show block on specific pages text area :

user/
user/*

will hide your blocks in user pages as expected, while /user/ /user/* won't.

This will solve half your issue. Then check if maybe your theme was complaining because of this misconfiguration detail, and may show now your block for anonymous users only.

| improve this answer | |
  • HI thank you. I removed the first forward slash, which shouldn't have been there but I am having the same problem. – Christia Apr 13 '17 at 16:52
  • The problem went away so I'm going to guess that this was the problem. Thanks! – Christia Apr 25 '17 at 6:50
  • Glad to know you solved it :) – Kojo Apr 25 '17 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.