I am reporting http://drupal.org/documentation/modules/block to moderators because: I have Drupal 7.14 and like many other users have problems filtering block display by content type. GUI is straightforward, but it doesn't work and in spite of multiple forum posts; moderators continue to sweep it under the rug as a user error or offering php coding to fix...perhaps it is, but when so many make the same error then I think Moderators need to take another look. Most of us don't understand or do php...besides, the GUI offers filtering by content type, so it should be fixed! In the module documentation, this subject "content type filtering" is omitted! Like others who have reported this problem, the block shows latest posts of ALL content if no filter boxes for content type are checked; but check ANY box to filter on, and NOTHING is displayed!!! even though that content type exists. Thanks for listening THIS TIME!!!

Comments

batigolix’s picture

Title: Moderation report for Working with blocks (content in regions) » Block display by content type doesn't work
Project: Documentation » Drupal core
Version: » 7.14
Component: Missing documentation » block.module
Category: bug » support
Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)

I'm not 100% what you are referring to but if it is the "Show block for specific content types" option in the block edit page, then I must say that it works fine for me.

Can you be more specific about the problem you are encountering? Maybe include some screenshots and detailed steps to reproduce the error.

Who are the "moderators" you are referring to? Are these fellow Drupal users? Do you have links of other posts that discuss this issue?

chanderbhushan’s picture

I'm not getting you 100% .what,s your actual issue. but check the block setting properly . it will be work.

deepsoulstarfish’s picture

I'm getting the same issue. If you try to use the feature "Show block for specific content types" ie: tick any or all of the content types, the block will not display at all.
This is when using the default news, or Recent Content block. I upgraded to 7.15 and it does not help.

deepsoulstarfish’s picture

Version: 7.14 » 7.15
salade-de-phalanges’s picture

Hello,
For me it's work fine.
Could you look at this list of point ;).
Your block return content ? if block do not have content to display generally the block is not displaying

Have you a personnal theme or a generic theme( garland, bartik) ? if you have a personnal theme control that your block template is write correctly.
This code work,
echo $block->content;

This code never display the content
$block->content

Look that the 'region' variable is in code.

Have you look at the permissions?

Have you look at the log in the back office ?

Otherwise, i need more informations to help you
Regards,

CowTownFarmBoy’s picture

I can replicate the issue exactly as it is described. What has been written is clear and there is an error to be found and fixed.

I created a block. I am using Danland. I put a label and description on the block and made it available to the front page main content. I saved the block and went to the front page and the block title and the test I put in the body of the block worked perfectly.

Next I returned to the block and selected to filter the content the block would show and selected one of the custom content types on my site. I then saved the block and went again to the front page. Where the block title and body showed before there was nothing. But I wanted confirmation.

I returned again to the block and selected to filter again and took out the custom content type and selected page. I saved the block and again returned to the Front page. Again the block failed to show anything.

I then returned to the block took out the filtering save it and it works on the front page.

If you have questions about this please ask but I can independently confirm that there is an issue and the filtering does not work correctly.

FYI - I do not use this feature of the Block.module and have used views to control the content of the blocks since there is better control over content and formatting. But that does not take away from the described problem being an issue.

Sorry for the length post but the developer needed more information and I felt this level of detail might be necessary. Good luck getting this fixed.

c7210’s picture

same here,mark.

shakylegz’s picture

Same issue here.

dddave’s picture

Version: 7.15 » 7.x-dev
Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Unless this can be confirmed against the dev with core themes I am setting this to "cannot reproduce".

wolf_22’s picture

In the "Show block on specific pages" screen, you have 2 options:
() All pages except those listed
() Only the listed pages

If you have the second option selected but with no pages listed in the text box underneath, the block is still excluded from the page. So in other words, if you select the second option with no listed pages, it will not show. This tripped me up and when I changed it to the first option, it then displayed appropriately per-content type.

(Hope this helps.)

markosef’s picture

Version: 7.x-dev » 7.15

I have similar problem. When combining content type and specific page filters block disappears like I can't combine the two. For example I set it to be visible only for page and blog type. Than also put that is displays on all some_view/* views and then it is a no show everywhere. When I remove one of those it works, but combined it doesn't. This is on drupal 7.15 so maybe it is fixed? will try to update soon.

geoo’s picture

I also have this problem in Drupal 7.23.
I try to disable the main content block for specific content type but the block always appears.
The only way to achieve this seems to be by creating a "node--[node_machine_name].tpl.php" file with content: echo "<div></div>";